From 1bf93981776bb2f98acf9e8a671701b48e090452 Mon Sep 17 00:00:00 2001 From: gengxin Date: Tue, 11 Mar 2025 11:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E5=85=A8=E5=B1=8F=20?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E6=B0=B4=E5=8D=B09?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VideoPlayer/index.vue | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/components/VideoPlayer/index.vue b/src/components/VideoPlayer/index.vue index ff589b3b..d26132f9 100644 --- a/src/components/VideoPlayer/index.vue +++ b/src/components/VideoPlayer/index.vue @@ -618,22 +618,13 @@ export default { * 监听全屏变化 */ handleFullscreenChange() { - if(this.isFullscreen){ + + + if(this.isFullScreen()){ this.isFullscreen = !!document.fullscreenElement; if (!this.isFullscreen) { // 退出全屏后的逻辑(如暂停视频、更新 UI 等) console.log('ESC 已退出全屏 handleFullscreenChange',this.isFullscreen); - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.oRequestFullscreen) { - document.oCancelFullScreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } this.$emit('onFullscreen',false);//全屏 } }