开发者

Can an HTML5 Video fire a jQuery function ontimeupdate?

开发者 https://www.devze.com 2023-02-11 10:11 出处:网络
I am able to fire a javaScript function when ontimeupdate runs from the HTML5 video tag (I believe this runs every 250ms while the video is playing). Here is the snippet:

I am able to fire a javaScript function when ontimeupdate runs from the HTML5 video tag (I believe this runs every 250ms while the video is playing). Here is the snippet:

<video src="men-2.mp4"  ontimeupdate="createThumbs()" width="640" height="480" controls="controls" id="myVideo">

function createThumbs(){
    //Stuff 开发者_开发问答is happening here...
}

The problem I have is I can't figure out how to fire a jQuery script on this event. There is no ontimeupdate event for jQuery as far as I know. Any ideas?


$("#myVideo").bind('timeupdate', createThumbs);
0

精彩评论

暂无评论...
验证码 换一张
取 消