Reputation: 204
I need to configure the JWPlayer to wait 5 seconds (countdown) and execute the next video, I wanna show a "Loader" in the center of video like the Youtube do. I have this code,
onComplete: function() {
if ($('input[type=checkbox][name=status]:nth(0)').attr('checked', false)) {
$('input[type=checkbox][name=status]:nth(0)').trigger("click");
}
setTimeout(explode, 5000);
function explode(){
NextPage.next();
}
}
Upvotes: 0
Views: 1184
Reputation: 477
Use the following to trigger an event when the video completes and insert your desired behavior in the function.
jwplayer().on('complete', function(){
});
Example code: https://developer.jwplayer.com/jw-player/demos/search/?k=apiCalls&q=on(%27complete%27)
Upvotes: 2