Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何停止/禁用搜索<;的视频;溪流>;标签?_Javascript_Video_Tags_Embed - Fatal编程技术网

Javascript 如何停止/禁用搜索<;的视频;溪流>;标签?

Javascript 如何停止/禁用搜索<;的视频;溪流>;标签?,javascript,video,tags,embed,Javascript,Video,Tags,Embed,我需要停止查找/转发视频功能。我正在按照播放器API使用流HTML标记。下面是我正在使用的代码,试图禁用脚本,但它不起作用 请提出解决办法 <stream id="video" src="abcde1234567" preload controls ></stream> <script data-cfasync="false" defer type="text/javascript" s

我需要停止查找/转发视频功能。我正在按照播放器API使用流HTML标记。下面是我正在使用的代码,试图禁用脚本,但它不起作用

请提出解决办法

<stream id="video" src="abcde1234567" preload controls ></stream>
<script data-cfasync="false" defer type="text/javascript" src="https://embed.videodelivery.net/embed/r4xu.fla9.latest.js?video=abcde1234567"></script>
    
    <script>

var video = document.getElementsByTagName('stream');

var supposedCurrentTime = 0;
video.addEventListener('timeupdate', function() {
  if (!video.seeking) {
        supposedCurrentTime = video.currentTime;
  }
});
// prevent user from seeking
video.addEventListener('seeking', function() {
  // guard agains infinite recursion:
  // user seeks, seeking is fired, currentTime is modified, seeking is fired, current time is modified, ....
  var delta = video.currentTime - supposedCurrentTime;
  // delta = Math.abs(delta); // disable seeking previous content if you want
  if (delta > 0.01) {
    video.currentTime = supposedCurrentTime;
  }
});
video.addEventListener('ended', function() {
  // reset state in order to allow for rewind
    supposedCurrentTime = 0;
});
</script>

var video=document.getElementsByTagName('stream');
var假定当前时间=0;
video.addEventListener('timeupdate',function(){
如果(!video.seeking){
假定当前时间=video.currentTime;
}
});
//阻止用户查找
video.addEventListener('seeking',function(){
//防范无限递归:
//用户搜索,启动搜索,修改当前时间,启动搜索,修改当前时间。。。。
var delta=video.currentTime-假定的currentTime;
//delta=Math.abs(delta);//如果需要,请禁用查找以前的内容
如果(增量>0.01){
video.currentTime=假定的当前时间;
}
});
video.addEventListener('end',function(){
//重置状态以允许倒带
假定当前时间=0;
});