VideoJS : keep controls visible

gordie picture gordie · Nov 14, 2012 · Viewed 22.9k times · Source

I like videoJS but can't find a way to keep the control bar always visible (no fade out when playing). I searched for informations about that and found a topic about it, where they advice to override the function conceal like this :

/override controls autohide fn/

conceal = function(){ /* nothing */ };

But this may be outdated since it doesn't work here. (Version 3.2.0)

Does anyone knows how I could achieve this ?

Thanks a lot !

Answer

Matt McClure picture Matt McClure · Jun 16, 2015

Just one more bit of necromancy here...

While the last answer by Peter Kitts will work fine, another option is to set the inactivityTimeout to 0, which disables the inactivity timeout altogether.

<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12/video.js"></script>

<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" 
  data-setup='{ "inactivityTimeout": 0 }'>
  <source src="http://vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
  <source src="http://vjs.zencdn.net/v/oceans.webm" type='video/webm'>
</video>