Thursday, January 5, 2012

[YouTube-API] Bug? The "playing" event fires twice for HTML5 iframe player

I used the example code here:

http://apiblog.youtube.com/2011/01/introducing-javascript-player-api-for.html

In the onStateChange callback I'm logging evt.data:

function onPlayerStateChange(evt) {
console.log(evt.data);
}

Test: load the page, then press the play button.

Results:

Desktop (chrome):
-1 (unstarted)
3 (buffering)
1 (playing)

iPad2 Safari:
3 (buffering)
1 (playing)
3 (buffering)
1 (playing)

Here's my example: http://www.calebolin.com/code/demo/iframe.html

Is this a bug?


--
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