javascript - Displaying html element on exact frame in html5 video -
i'd display html text on playing html5 video.
the video feature empty sign, , i'd place custom text on video, appears displayed on sign.
how can best sync showing of html element specific frame in video?
preferably on exact frame, sync perfect.
you time-frame beingness played in player.
html:
<video id="videoplayer" controls="controls"> <source src="video.mp4" type="video/mp4"> </video>
jquery:
$(document).ready(function(){ $("#videoplayer").on( "timeupdate", function(event){ showhtmlelement(this.currenttime, this.duration); }); });
you round-off currenttime per need compare in showhtmlelement().
javascript html5-video
No comments:
Post a Comment