I think that when users click in the HTML5 control, then there is no way to get the time in advance. demand.
Whenever users search for a specific point of view, then the system will know which point before looking for users For example, if a user is watching the video by 2:00 and then clicks control at 4:00, then we need to keep track of 2:00 time. I tried and searched for the event but time can not be found at 2:00. It always comes back to me 4:00. Is there any solution?
You should be able to track this thanks to timeupdate
event, With a little delay:
var video = document.query selector ('video'); Video. Bp = 0; Video.addEventListener ('timeupdate', function (e) {var that = this; (function () {setTimeout (function () {that.BP = that.currentTime;}, 500);}). ;}); Video.addEventListener ('demand', function (e) {log ('boring part =' + this.BP + "gone" + this.currentTime)}) function log (txt) {document.querySelector ('p') . = Txt;}
& lt; Video Control = "True" Autoplay = "True" height = "200" width = "600" & gt; & Lt; Source type = "video / og" src = "http://media.w3.org/2010/05/sintel/trailer.ogv"> & Lt; Source type = "video / mp4" src = "http://media.w3.org/2010/05/sintel/trailer.mp4" & gt; & Lt; / Video & gt; & Lt; P style = "position: full; top: 0.5EM; left: 3EM; color: #fff; background: # 000" & gt; & Lt; / P & gt;
No comments:
Post a Comment