我想始终显示搜索栏,但禁用它的间断性,所以我发现这个旧插件(videojs-disable-progress)看起来不错,但对我来说不是
试图在相关插件文件上的插件导入和添加中将vjs更改为videojs
甚至尝试修改一些代码以更新它到videojs 7,但无济于事 也许我没有正确设置插件
我的.html
<!doctype html>
<html lang="fr">
<head>
<!-- meta -->
<meta charset="utf-8">
<title>test</title>
<link href="css/styles.css" rel="stylesheet">
<link href="css/video-js.css" rel="stylesheet">
</head>
<body>
<video id='myvideo' class='video-js vjs-default-skin vjs-big-play-centered' preload="auto"
oncontextmenu="return false" width="100%" height="100%" controls
data-setup='{ "aspectRatio":"16:9", "fluid": true}'>
<!--ontimeupdate="checkChapter()"-->
<source src='vid/rg.mp4' type='video/mp4'>
</video>
</body>
<script src='js/video.js'></script>
<script src='js/videojs.disableProgress.js'></script>
<script src="js/script.js"></script>
</html>
.js
//change vjs to videojs
videojs.plugin('disableProgress', disableProgress);
var enabled = false;
var myPlayer = videojs('myvideo');
myPlayer.disableProgress.disable();
知道了
script.js: Uncaught ReferenceError: disableProgress is not defined
答案 0 :(得分:0)
包含进度条的组件具有disable()
方法来打开事件处理程序。 myPlayer.controlBar.progressControl.disable()