From 347ef3c5fe8deda1eb0dbdc1eff3ffd59e27630c Mon Sep 17 00:00:00 2001 From: legolaserea <996779123@qq.com> Date: Mon, 19 Aug 2024 20:47:49 +0800 Subject: [PATCH] fix(xgplayer): pip available --- fixtures/xgplayer/index.js | 4 +--- packages/xgplayer/src/plugins/pip/index.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fixtures/xgplayer/index.js b/fixtures/xgplayer/index.js index 7508b0d28..1c87e7d41 100644 --- a/fixtures/xgplayer/index.js +++ b/fixtures/xgplayer/index.js @@ -293,9 +293,7 @@ function init(index = 0, config = {}) { } }, url: "./heatmap.mp4", - DynamicBg: { - disable: false - }, + pip: true, loop: false, autoplay: false, autoplayMuted: true, diff --git a/packages/xgplayer/src/plugins/pip/index.js b/packages/xgplayer/src/plugins/pip/index.js index 9020c1c8b..64eea664b 100644 --- a/packages/xgplayer/src/plugins/pip/index.js +++ b/packages/xgplayer/src/plugins/pip/index.js @@ -295,7 +295,7 @@ class PIP extends IconPlugin { isPIPAvailable () { const video = this.player.media - const _isEnabled = Util.typeOf(document.pictureInPictureEnabled) === 'Boolean' ? document.pictureInPictureEnabled : true + const _isEnabled = Util.typeOf(document.pictureInPictureEnabled) === 'Boolean' ? document.pictureInPictureEnabled : false return _isEnabled && ((Util.typeOf(video.disablePictureInPicture) === 'Boolean' && !video.disablePictureInPicture) || (video.webkitSupportsPresentationMode && Util.typeOf(video.webkitSetPresentationMode) === 'Function')) ||