微信浏览器视频播放完后,自动跳qq浏览器得解决方法

html:
<video id="my-video" class="video-js " controls 
               poster="{{tuUrl}}" controlslist="nodownload" id='end' src="{{safeUrl}}">
          </video>
js:
doms;
showOtherVideo() {
    let _this = this;
    let dom = document.getElementById('end');
    this.doms = document.getElementById('end');
    const time= setTimeout(function(){
      console.log(dom['currentTime']);
    if(!dom['paused']){
       _this.showOtherVideo();
      }else{
        if(dom['currentTime'] == dom['duration'] &&dom['currentTime']!=0) {
          window.location.reload();
        } else {
          _this.showOtherVideo();
        }
      }
   },1000)
  }
只要用了video标签,在微信浏览器中播放完视频,都会被qq浏览器捕获到。所以只能监听该视频是否播放完,进行处理。
posted @ 2020-04-20 10:57  到货  阅读(1502)  评论(0编辑  收藏  举报