lundi 2 mars 2015

video.js how to set currentTime in safari in iPhone

Other is ok, but the setting of currentTime.


I tried some ways like:



videojs("example_video_1", {}, function() {
this.currentTime(200);
this.play();
});


not work.



videojs("example_video_1").ready(function(){
this.currentTime(200);
});


not work.



var dom = document.getElementById('example_video_1');
dom.addEventListener("loadedmetadata", function() {
dom.currentTime = 100;
}, false); // ok for no video.js
videojs(dom);


not work. Even reverse the line of addEventListener and init videojs.


And i tried the videojs event.



var player = videojs("example_video_1");
alert(player.addEvent);
alert(player.addEventListener);


these API is all not exists, so how do i bind Event in videojs?


At last, how to set currentTime in videojs(in safari in iPhone)?




Aucun commentaire:

Enregistrer un commentaire