
Calling function of controlbar events
Is there a way to call a function when the controlbar idlehides ? I see there are ways to control the show or hide and I tried using the on('idle') but that seems to be at the end of the video.
Is there a way to call a function when the controlbar idlehides ? I see there are ways to control the show or hide and I tried using the on('idle') but that seems to be at the end of the video.
No, we do not have a built-in function that fires when the control bar changes state but there is a way to detect this using the player’s CSS classes:
jwplayer().on('time',function(){
if (document.getElementsByClassName('jw-flag-user-inactive').length != 0) {
console.log("Control bar is hidden");
} else {
console.log("Control bar is visible");
}
});