视频圈

This commit is contained in:
Mr.jiang 2024-07-25 15:59:34 +08:00
parent bda8436650
commit c527fbddae
1 changed files with 9 additions and 19 deletions

View File

@ -198,11 +198,8 @@
watch:{
async k(k,old_k){
// console.log(k, old_k)
console.log(k, old_k)
this.progressBarPercent = 0;
// #ifndef MP
this.clearToTime();
// #endif
this.isShow = false
this.dataList[old_k].playIng = false//
this.dataList[old_k].isplay = true
@ -284,6 +281,7 @@
this.boxStyle.width = this.windowWidth + 'px'//px
this.boxStyle.height = this.windowHeight - this.deleteHeight;// tabbar
this.get() //
// #ifndef MP
this.rotateX();
// #endif
@ -292,31 +290,20 @@
onShow(){
console.log('回到前台');
if(this.dataList.length !== 0){
// #ifdef MP
this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
// #endif
// #ifdef H5
if(this.isClick){
console.log(222)
this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
audo.play()
}
// #endif
}
},
onHide(){
// #ifdef MP
this.dataList[this.k].state = 'pause';
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
// #endif
// #ifdef H5
if(this.isClick){
this.dataList[this.k].state = 'pause';
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
audo.pause()
}
// #endif
console.log('到后台');
},
@ -749,10 +736,13 @@
this.dataList[this.k].isplay = true
this.dataList[this.k].playIng = true
setTimeout(()=>{
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).seek(0)
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
this.dataList[this.k].state = 'pause';
// uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).seek(0)
// uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
audo.src = this.dataList[this.k].src;
audo.play()
// this.dataList[this.k].state = 'pause';
},500)
},200)