Does the normal YouTube player (by normal I mean the one you get when you use the embed code iframe) fire an event when playback is completed that I can catch outside the iframe?
Does the normal YouTube player (by normal I mean the one you get when
Share
As normal cross-domain javascript communication is restricted for security reasons this is not ‘normally’ possible.
In modern, HTML5 compliant, browsers a new method was introduced:
postMessage. To be able to do exactly that: safe cross-domain communication in Javascript.The
iframeYouTube player ‘posts’ out anonStateChangedevent with different stati. To enable this interaction however, you need to use Javascript to embed theiframeplayer.Check out the following link to see how it’s done.
(Experimental feature by the way…)
http://code.google.com/intl/nl/apis/youtube/iframe_api_reference.html