使用JQuery从html5video播放器触发事件

当我的html5video播放器达到某个时间时,我想显示()一个div。 我能够在video结尾处显示一个div,但我不知道如何在video处于特定时间时显示div,如0:06。

this is the message that will pop up.

看看timeupdate事件。 https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/timeupdate

 var runAtTime = function(handler, time) { var wrapped = function() { if(this.currentTime >= time) { $(this).off('timeupdate', wrapped); return handler.apply(this, arguments); } } return wrapped; }; $('#myVideo').on('timeupdate', runAtTime(myHandler, 3)); 

http://jsfiddle.net/tarabyte/XTEWW/1/