This commit is contained in:
2024-10-16 16:53:39 +08:00
parent c1f78fe598
commit ac451d6403
28 changed files with 4148 additions and 607 deletions

View File

@@ -29,16 +29,32 @@
此设备暂不支持观看当前视频<br />请移步到安卓手机进行学习
</view>
<view v-else>
<common-list-aliyun
id="AliPlayer"
:showAliYunPlayer="showAliYunPlayer"
@handleSuccessDispose="handleSuccessDispose"
ref="commonVideoAliyun"
v-if="showAliYunPlayer"
:videoData="videoData"
:firstTime="firstTime"
>
</common-list-aliyun>
<template v-if="showAliYunPlayer">
<common-list-audio
id="commonAudio"
:showAliYunPlayer="showAliYunPlayer"
@handleSuccessDispose="handleSuccessDispose"
ref="commonVideoAliyun1"
v-if="videoInfo.type == 2"
:videoData="videoData"
:currentVideoIndex="currentVideoIndex"
:videoInfo="videoInfo"
:curriculumData="curriculumData"
:firstTime="firstTime"
>
</common-list-audio>
<common-list-aliyun
id="AliPlayer"
:showAliYunPlayer="showAliYunPlayer"
@handleSuccessDispose="handleSuccessDispose"
ref="commonVideoAliyun"
v-if="videoInfo.type != 2"
:videoData="videoData"
:firstTime="firstTime"
>
</common-list-aliyun>
</template>
<view v-else style="height: 200px"> </view>
</view>
</view>
@@ -54,6 +70,18 @@ export default {
type: Number,
default: null,
},
currentVideoIndex: {
type: Number,
default: null,
},
curriculumData: {
type: Object,
default: {},
},
secondCountDown: {
type: Number,
default: null,
},
isfresh: {
type: Boolean,
default: false,
@@ -61,6 +89,8 @@ export default {
},
data() {
return {
showCountDown: false,
playEndBlank: false,
flag: false, //视频提示显示
show: false, //视频提示显示
// isfresh: false, //视频提示显示
@@ -75,6 +105,7 @@ export default {
options: {}, //父组件传参
currentTime: "", //当前播放时间
videoData: {}, //获取当前的播放信息playAuthm3u8url
videoInfo: {}, //获取当前的播放信息playAuthm3u8url
isSetFirstTime: false, //是否获取到初始播放时间
firstTime: 0, //初始播放时间
@@ -136,6 +167,11 @@ export default {
},
beforeUpdate() {},
methods: {
hideNextVideo() {
this.showCountDown = false;
this.playEndBlank = false;
this.$emit("hideNextVideo");
},
destory() {
if (this.showAliYunPlayer) {
this.$nextTick(() => {
@@ -182,10 +218,13 @@ export default {
},
})
.then(async (res) => {
console.log("res at line 204:", res.video);
var that = this;
this.videoInfo=res.video
that.videoData = {
id: that.currentVideoId,
vid: res.video.video,
};
if (res.video.type == 1) {
@@ -225,7 +264,9 @@ export default {
that.firstTime = list[index].time ? list[index].time : 0;
}
}
if (res.video.duration - that.firstTime <= 2) {
that.firstTime = 0;
}
that.videoOssList = [...list];
}
@@ -238,6 +279,7 @@ export default {
<script module="renderScript" lang="renderjs">
import $ from "jquery";
export default {
data() {
return {
@@ -322,4 +364,24 @@ export default {
height: 60rpx !important;
}
}
.showCountDownd {
box-sizing: border-box;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: flex-end;
color: #fff;
font-size: 38rpx;
text-align: center;
position: absolute;
top: 0;
right: 10rpx;
z-index: 4;
text {
}
}
</style>