Hello again
Is there a callback for when a video has ended (has reached the end)? And how can I change to another video when that has happened? Dynamically I mean.
Thanks!
You can do this by listening for the ended event.
var video = videojs('awesome_video').ready(function(){
var player = this;
player.on('ended', function() {
alert('video is done!');
});
});
That's easy. Thanks. But should be documented!
Where can I find the full list of available events? Thanks.
It's work fine,Thank you very much! If Html5 video have loop attribute or options loop is true ,It's will not working.
I am also looking for full list of existing events.
The HTML5 media events are going to cover just about every event Video.js will fire.
Nice
Not work on my site Tubeplayer
exactly what i was looking for. docs for the event trigger are not super clear
I have solved this problem by using timeupdate event
player.on('timeupdate', function(){
if(player.currentTime() == player.duration()){
console.log('video is ended');
}
});
Most helpful comment
You can do this by listening for the
endedevent.