From d01fd6f07b0245c2730def81e0d1c6ec85595f03 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Mon, 31 Mar 2025 19:13:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E6=8B=96=E6=8B=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VideoPlayer/index.vue | 13 +++++++++++-- src/views/study/coursenew.vue | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/VideoPlayer/index.vue b/src/components/VideoPlayer/index.vue index 6c3082c5..e5e8f9e6 100644 --- a/src/components/VideoPlayer/index.vue +++ b/src/components/VideoPlayer/index.vue @@ -506,6 +506,15 @@ export default { updateProgressBySetTime(newCurrentTime) { this.currentProgress = newCurrentTime / this.videoDom.duration; }, + /* 点击进度条更新视频播放进度2 + */ + updateProgressByClickBar2(newCurrentTime,progressVideo) { + console.log('=======progressVideo:'+progressVideo) + this.currentProgress = progressVideo; + this.barrageTimelineStart = newCurrentTime; + console.log('=======newCurrentTime:'+newCurrentTime) + this.videoDom.currentTime = newCurrentTime; + }, /* 提高视频音量 */ increaseVolume() { @@ -619,7 +628,7 @@ export default { handleFullscreenChange() { console.log("handleFullscreenChange gx this.isFullScreen()",this.isFullScreen()) console.log("handleFullscreenChange gx this.isFullscreen",this.isFullscreen) - + if(this.isFullscreen){ this.isFullscreen = !!document.fullscreenElement; if (!this.isFullscreen) { @@ -629,7 +638,7 @@ export default { } } - + } }, watch: { diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 551b94dc..7382c602 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -802,6 +802,11 @@ this.$nextTick(function(){ + if(this.contentData.progressVideo){ + this.$refs.myVideoPlayer.updateProgressByClickBar2(this.contentData.lastStudyTime,this.contentData.progressVideo); + // $this.notePlay = this.contentData.lastStudyTime; + } + //let h0=document.getElementById('id_course_player').offsetHeight; let h=$this.$refs.coursePlayer.offsetHeight; //let h1=$this.$refs.coursePlayer.clientHeight; @@ -1448,6 +1453,7 @@ } //console.log(scon.contentId,con.id); con.lastStudyTime = scon.lastStudyTime; + con.progressVideo = scon.progressVideo; //以下判断是为了兼容之前的问题,学习状态 if (scon.status) { con.status = scon.status; From d6fd44830bda11bca9a09ea4fca399afbd3fb344 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 1 Apr 2025 08:30:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VideoPlayer/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/VideoPlayer/index.vue b/src/components/VideoPlayer/index.vue index e5e8f9e6..7de2f936 100644 --- a/src/components/VideoPlayer/index.vue +++ b/src/components/VideoPlayer/index.vue @@ -509,10 +509,8 @@ export default { /* 点击进度条更新视频播放进度2 */ updateProgressByClickBar2(newCurrentTime,progressVideo) { - console.log('=======progressVideo:'+progressVideo) this.currentProgress = progressVideo; this.barrageTimelineStart = newCurrentTime; - console.log('=======newCurrentTime:'+newCurrentTime) this.videoDom.currentTime = newCurrentTime; }, /* 提高视频音量