提交 ba1d71fa authored 作者: haodaking's avatar haodaking

fix: 修复视频重头观看的问题

上级 2a5b74b9
......@@ -48,6 +48,8 @@ export default {
props: {
// 当前章节
chapter: { type: Object },
// 是否是PPT播放跳转
isSeek: { type: Boolean, default: false },
// PPT当前选中的索引
pptIndex: { type: Number, default: 0 }
},
......@@ -76,7 +78,7 @@ export default {
},
watch: {
pptIndex(index) {
this.updateVideoCurrentTime(index)
this.isSeek && this.updateVideoCurrentTime(index)
}
},
computed: {
......
......@@ -33,7 +33,6 @@ export default {
width: '100%',
height: '100%',
autoplay: this.autoplay,
vodRetry: 0, // 将重试 设置为0,可以防止视频过期
isLive: false,
controlBarVisibility: 'always',
definition: 'FD,LD,SD',
......
......@@ -27,9 +27,10 @@
:data="detail"
:chapter="activeChapter"
:pptIndex="pptIndex"
:isSeek="isSeek"
:key="pid"
@pptupdate="handlePPTupdate"
@change-ppt="handleChangePPT"
@change-ppt="handleChangePPT(...arguments, false)"
/>
</div>
</div>
......@@ -40,7 +41,7 @@
:active="activeChapter"
:ppts="ppts"
:pptIndex="pptIndex"
@change-ppt="handleChangePPT"
@change-ppt="handleChangePPT(...arguments, true)"
v-if="detail.chapters"
v-show="!isLive && !isCourseExam"
></v-aside>
......@@ -60,7 +61,8 @@ export default {
return {
detail: {},
ppts: [],
pptIndex: 0
pptIndex: 0,
isSeek: false
}
},
watch: {
......@@ -149,8 +151,9 @@ export default {
this.ppts = list
},
// 右侧菜单选中的PPT修改
handleChangePPT(index) {
handleChangePPT(index, isSeek) {
this.pptIndex = index
this.isSeek = isSeek
}
},
beforeMount() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论