Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slight changes with latest Youtube API #1

Open
samantp opened this issue May 23, 2015 · 3 comments
Open

Slight changes with latest Youtube API #1

samantp opened this issue May 23, 2015 · 3 comments

Comments

@samantp
Copy link
Contributor

samantp commented May 23, 2015

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.

@samantp samantp changed the title Slight changes with latest Slight changes with latest Youtube API May 23, 2015
@mdebbar
Copy link
Owner

mdebbar commented May 23, 2015

Thanks for spotting the issue 👍
If you could send a pull request, I'd appreciate it :)

@samantp
Copy link
Contributor Author

samantp commented May 24, 2015

Certainly Mouad, will do so.

Regards,
Parikshit

-----Original Message-----
From: "Mouad Debbar" [email protected]
Sent: ‎24-‎05-‎2015 01:44 AM
To: "mdebbar/YoutubePlayer.react" [email protected]
Cc: "samantp" [email protected]
Subject: Re: [YoutubePlayer.react] Slight changes with latest Youtube API (#1)

Thanks for spotting the issue
If you could send a pull request, I'd appreciate it :)

Reply to this email directly or view it on GitHub.

@samantp
Copy link
Contributor Author

samantp commented May 24, 2015

Created pull request: #2.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants