<video
id="video" class="video"
webkit-playsinline="true"
x-webkit-airplay="true"
playsinline
autoplay
@timeupdate="getTime"
@ended="handleAudioPlayEnded()"
@playing="atuoPlay"
disablepictureinpicture
x5-playsinline
v-if="list[urlIndex].type=='video'"
>
<source :src="list[urlIndex].src" type="video/mp4" >
</video>
//当改变进度条时触发
getTime(){
/*this.$nextTick(() => {
this.isShow=true;
var vdo = document.getElementById("video").currentTime;
var second=this.realFormatSecond(parseInt(vdo));
if(second>=10){
this.isShow=false;
}
})*/
},
// 将整数转换成 时:分:秒的格式
realFormatSecond(second) {
var secondType = typeof second
if (secondType === 'number' || secondType === 'string') {
second = parseInt(second)
var hours = Math.floor(second / 3600)
second = second - hours * 3600
var mimute = Math.floor(second / 60)
second = second - mimute * 60
return second
}else {
return '0:00:00'
}
},