播放器

This commit is contained in:
@fawn-nine
2024-08-12 16:53:44 +08:00
parent 6c64c27a5a
commit 80bef54e47
4 changed files with 23 additions and 17 deletions

View File

@@ -7,7 +7,7 @@
<view
class="contentBox curriculum_box"
:style="`height:calc(100% - ${60 + statusBarHeight}px !important;${
:style="`height:calc(100% - ${60 + statusBarHeight}px !important; overflow-x: hidden; ${
isFullScreen ? 'background:#000' : ''
}`"
>
@@ -25,8 +25,7 @@
>
</common-video>
<view style="height: 200px" v-else></view>
</view>
</view>
<scroll-view
:style="`height:calc(100% - 200px - 40rpx) ;`"
scroll-y="true"
@@ -280,23 +279,25 @@ export default {
});
},
changeVideo(data) {
console.log("data at line 370:", data);
console.log("点击了点击了切换视频-----:", data);
if (data.id != this.currentVideo.id) {
// handleEnd
// this.$refs.commonVideo.handleEnd();
setTimeout(() => {
this.currentVideo = data;
this.$refs.commonVideo.changeVideo();
this.$refs.commonVideo.changeVideo(data);
this.currentVideo = data;
// this.changeVideo()
// this.initVideo();
this.isOpenMp3 = false;
}, 500);
} else {
this.currentVideo = data;
this.initVideo();
this.isOpenMp3 = false;
}
}
// else {
// this.currentVideo = data;
// this.initVideo();
// this.isOpenMp3 = false;
// }
// console.log("data at line 380111111111111111111:", data.type);
},
@@ -376,6 +377,7 @@ export default {
isHaveHistorySeekVideo != -1 ? isHaveHistorySeekVideo : 0;
if (that.videoArray.length > 0) {
this.currentVideo = that.videoArray[that.currentCateIndex];
console.log('默认播放的index',that.currentCateIndex, this.currentVideo.id,that.videoArray);
this.initVideo();
}
var videoArray = [];