views:

133

answers:

2

Is there a widely supported video playback technology for web pages that provides an event/hook that can be captured from Javascript when playback reaches the end of the stream?

My goal is to provide a web page that plays a video and then asks the user a question about the video once playback is complete. The question would be hidden or disabled until they have actually viewed the video.

+1  A: 

I know that JWPlayer can fire a Javascript event when playback has completed.

Source: http://developer.longtailvideo.com/trac/wiki/Player5Events

webdestroya
+2  A: 

html5 video has an onended attribute

video.onended = function(e) {
  // do stuff
}

you can fallback to the JW flash player that has an api

Galen
This would require the user to accept installation of the JW player, correct?
Eric J.
no, jwplayer is just a flash video player. you can download it for free and use it to play flv files as a backup to html5 video
Galen
Do you have (or can you point to) a well-tested HTML snippet that degrades well across many browsers from HTML5 to JW player (and ideally to a NOSCRIPT message)?
Eric J.
http://camendesign.com/code/video_for_everybody
Galen