VideoJS:保持控件可见 [英] VideoJS : keep controls visible

查看:262
本文介绍了VideoJS:保持控件可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢videoJS,但找不到让控制栏始终可见的方法(播放时不会淡出)。
我搜索了有关该信息的信息并找到关于它的话题,他们建议覆盖这样的功能隐藏:

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 :


/ 覆盖控件autohide fn /


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

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


但这可能已经过时,因为它在这里不起作用。 (版本3.2.0)

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

有谁知道我怎么做到这一点?

Does anyone knows how I could achieve this ?

非常感谢!

推荐答案

这里还有一点点的死灵法术......

Just one more bit of necromancy here...

虽然Peter Kitts的最后一个答案可以正常工作,另一个选择是将 inactivityTimeout 设置为0,这将完全禁用不活动超时。

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>

这篇关于VideoJS:保持控件可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆