I created this site a little while ago:
The way it's worked up until now is that when the onStateChange event
fires a YT.PlayerState.ENDED event, it finds the next track in the
list and plays it.
Alternatively, you can click the Play link on any track to choose
which track to play.
Either way it uses the same playTrack function, which loads the player
with the appropriate video id and defines onReady and onStateChange
event handlers.
Just today, without my having actually changed the code, it appears
that the onReady event only fires for the first video that gets
played.
At the end of that video, the onStateChange event fires and I get the
YT PlayerState.ENDED event correctly, load a new player but the
onReady event of that *new* player never fires.
Likewise, if I click on any other track, it correctly loads the player
but I never get onReady called.
Have there been any changes to the API that would be causing this? I
had a look through the documentation for the iframe API and it doesn't
appear to have changed since I built this.
Thanks,
Iain
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment