Skip to content

Slight changes with latest Youtube API #1

Description

@samantp

Hi, First of all,

Thanks for this component. Saved a lot of effort!!

Just one thing I noticed with the latest API. Seems Google Youtube API has slightly changed and now needs a global "onYouTubeIframeAPIReady" that is called (ref: https://developers.google.com/youtube/iframe_api_reference) on the API being ready.

So, the following minor changes in YoutubePlayer.react.js get it working again:
Instead of:
script.src = 'https://www.youtube.com/player_api?playerapiid=ytplayer';
script.onload = onload;

Replace:
script.src = 'https://www.youtube.com/iframe_api';
onYouTubeIframeAPIReady = onload;

Regards,
--Parikshit N. Samant.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions