微信瀏覽器視頻播放完后,自動跳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瀏覽器捕獲到。所以只能監聽該視頻是否播放完,進行處理。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM