Reputation: 67
I am using video.js to load a video inside a bootstrap modal. I need a modal to shutdown when a video is completed.
Upvotes: 0
Views: 88
Reputation: 7201
Use video.js's ended
event and run .modal('hide')
on its callback, like this:
videojs('some-video').ready(function(){
this.on('ended', function(){
$('#modal').modal('hide');
});
});
Upvotes: 1