-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
Description
You're currently destroying the player and calling createPlayer every time the video id (or url/play list) is being changed. I think YouTube just updated their API's to stop this as my site started breaking.
Not sure if there are other use cases that might break this, but my current work around is to modify your loadPlayer function to check if the player exists, and instead of creating a new one, use player.loadVideoById to update the id. There are similar calls for load by url and for playlists.
src: https://developers.google.com/youtube/iframe_api_reference#loadVideoById