Can HTML5 video run jQuery ontimeupdate function?

I can run the javaScript function when ontimeupdate is launched from an HTML5 tag (I believe this is done every 250 ms during video playback). Here is a snippet:

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

function createThumbs(){
    //Stuff is happening here...
}

I have a problem, I can’t figure out how to run the jQuery script for this event. As far as I know, there are no ontimeupdate events for jQuery. Any ideas?

+3
source share
1 answer
$("#myVideo").bind('timeupdate', createThumbs);
+3
source

Source: https://habr.com/ru/post/1792327/


All Articles