Thursday, April 7, 2011

[YouTube-API] A simple javascript to pause playback (iframe embed)

Hi

I'm setting up a jquery slide show with option to use a youtube clip as a slide. When navigating to the next or previous slide from a slide containing i youtube clip (regular iframe embed), I've noticed that some browsers do not stop or pause playback. Both firefox and safari appears to handle this well by stopping the playback. But Opera and at least ie7, is continuing the playback in the background when navigating away from the youtube slide. (Haven't been able to test ie8 and ie9 yet)

So my question is. Is there a simple way to ad a pause (or stop) event by javascript and still use the standard iframe embed, or do I have to do the full IFrame Player API?

If I have to go full iframe API by letting a javascript generating the player - will this fix this issue in Explorer 7 also? (since ie 7 does not support postMessage)

Another thing. I've noticed that firebug is reporting some 20 errors in the s.ytimg.com/yt/cssbin/www-embed-*****.css 
This is not a huge problem. I just wondered why.

And.. is the iframe embed the best/only way to ensure correct playback on iphones, ipads and other mobile devices?

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