Commit bcf7c42d by kyle

试听课程以及未听的不保存轨迹

parent 5051ea4f
......@@ -474,18 +474,20 @@
},
// // 暂停播放
async pause() {
console.log('pause')
this.isPauseFlag = true;
if (this.timer) {
clearInterval(this.timer)
}
const result = await this.saveVideoPlayback()
if(result=='success' && this.newCourseInfo.fileId){
console.log('新的课程要进行赋值查询了')
this.fileId = this.newCourseInfo.fileId;
this.courseInfo.packFileId = this.newCourseInfo.packFileId;
this.playbackId = null;
this.courseDetail();
if (this.courseInfo.status != 1){
console.log('pause')
this.isPauseFlag = true;
if (this.timer) {
clearInterval(this.timer)
}
const result = await this.saveVideoPlayback()
if(result=='success' && this.newCourseInfo.fileId){
console.log('新的课程要进行赋值查询了')
this.fileId = this.newCourseInfo.fileId;
this.courseInfo.packFileId = this.newCourseInfo.packFileId;
this.playbackId = null;
this.courseDetail();
}
}
},
timeupdate(e) {
......@@ -574,10 +576,12 @@
this.videoContext = uni.createVideoContext('myVideo');
},
onUnload() {
this.videoContext.pause();
this.saveVideoPlayback();
if (this.timer) {
clearInterval(this.timer)
if (this.courseInfo.status != 1 && this.viewTime!=0) {
this.videoContext.pause();
this.saveVideoPlayback();
if (this.timer) {
clearInterval(this.timer)
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment