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

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

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