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