From 6e6737a7c618bd328a1dadc184ee606b88a331de Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 21 Mar 2024 16:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E8=A7=86=E9=A2=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/PlayVideo.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/views/contest/PlayVideo.vue b/src/views/contest/PlayVideo.vue index 0909cb60a..b53504383 100644 --- a/src/views/contest/PlayVideo.vue +++ b/src/views/contest/PlayVideo.vue @@ -6,7 +6,7 @@ :playsinline="false" :options="playOptions" @play="onPlayerPlay($event)" - @timeupdate="onPlayerTimeupdate($event)" + @pause="onPlayerPause($event)" /> @@ -69,6 +69,7 @@ export default { }); }, handleClose() { + this.$refs.videoPlayer.player.pause(); this.dialogVisible = false; }, onPlayerPlay(player) { @@ -89,14 +90,6 @@ export default { }, onPlayerPause(player) { this.playedTime = player.currentTime(); - }, - onPlayerTimeupdate(player) { - const timeDisplay = player.currentTime(); - if (timeDisplay - this.currentTime > 1) { - player.currentTime(this.currentTime > this.maxTime ? this.currentTime : this.maxTime); - } - this.currentTime = player.currentTime(); - this.maxTime = this.currentTime > this.maxTime ? this.currentTime : this.maxTime; } } };