yanwsh / videojs-panorama

a plugin for videojs run a full 360 degree panorama video.
http://yanwsh.github.io/videojs-panorama/
Other
485 stars 160 forks source link

Get currentTime #71

Closed emomooney closed 7 years ago

emomooney commented 7 years ago

Hi.

Is there anyway to get the currentTime of the video playback? and also play, paused and ended states.

yanwsh commented 7 years ago
//get current time
player.on("timeupdate", function(){
   var currentTime = Math.round(this.currentTime());
});
//on video play
player.on("play", function(){
});
//on video end
player.on("end", function(){
});
//video pause
player.on("pause",function(){
});

for detail, please check videojs documentation.

emomooney commented 7 years ago

Thanks for that. I was sure I tried this but must have not done it correctly.