Search code examples
javascriptjwplayer

JWPlayer 8: How to stop the control bar from fading out?


We're using jwplayer-8.13.3 javascript player, the control bar keeps fading out after a few seconds of the video starting.

This is an issue for mobile users, if they want to see the control bar, they would have to click on the player, in order to see the control bar which would cause the video being played to stop.

We'd like always to show the control bar, we tried all the available solutions like this one and this one, but nothing worked.

How to always show the control bar? Or if that's not possible, then how to pause the video on mobile from the second click?


Solution

  • I removed all on-pause listeners. So then every time you click JW player nothing happens on mobile.

    And then I added on-click listener to the video div, which only does this

    jwplayer("videoplayer").setControls();
    

    This will show the controls. So I just use that whenever I want the controls to show.