I created a site with an embedded Youtube video. Now I want to create a playlist without the youtube-playlist feature. So I want my site to recognize, if the playback of the video is completed. I need a way to track the end of a youtube video so Jquery can remove the actual embedding and embed the next video.
Share
You can use the Youtube API for this.
There is a nice function for this.
This returns a status code of the player – you need to set up a listener, and check if the returned value is 0 – which means the status is “ended”.
More info – http://code.google.com/apis/youtube/js_api_reference.html#Queueing_Functions