Adding any events in youtube embedOptions stops the Player onReady event from ever triggering
See original GitHub issueCurrent Behavior
Youtube embedOptions are completely overwritten with the config value ( src )
causing this handler to never run.
onReady: () => {
if (loop) {
this.player.setLoop(true) // Enable playlist looping
}
this.props.onReady()
},
the ready handler never running stops a couple things from working, one of them is changing the url (I’ve ran into this warning, though this particular problem can be circumvented by setting the url to empty first, and then to the new value), and the progress update won’t fire either.
Expected Behavior
both the event handlers passed in through the props, and the event handlers added in the Youtube
class are classed
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Youtube iframe player API 'onReady' event does not get ...
I'm using the youtube iframe player API for an app that I'm building. Everything worked fine until about a month ago (Feb 2014)....
Read more >YouTube Player API Reference for iframe Embeds
It identifies the different types of events that the API can send and explains how to write event listeners to respond to those...
Read more >JavaScript Player API — Support - Wistia
Runs a callback function when a specific event is triggered. Refer to the Events section to see how to respond to the different...
Read more >react-player | Yarn - Package Manager
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion.
Read more >RPG Maker MV Tutorial #18 - Autorun Events! - YouTube
Autorun events will run automatically without the need for any trigger to occur. Using them, you can create things such as cut-scenes and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to add a console warning when
embedOptions.events
is set.fair enough, I guess I can work around using the youtube player events, thanks.
(I would still recommend to either not allow
embedOptions.events
in the config, or to not overwrite the default ones completely, so people naively trying to use youtube player events won’t break the player.)