From dd6356e95d187d98ea49bc7e15434e6ee7ba1254 Mon Sep 17 00:00:00 2001 From: gemstone Date: Tue, 21 May 2024 17:00:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20(xgplayer)=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BC=B9=E5=B9=95=E6=8F=92=E4=BB=B6=E5=9C=A8=E6=97=A0?= =?UTF-8?q?controls=E6=97=B6=EF=BC=8C=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/xgplayer/src/plugins/danmu/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/xgplayer/src/plugins/danmu/index.js b/packages/xgplayer/src/plugins/danmu/index.js index 0d887c1bd..010a41be6 100644 --- a/packages/xgplayer/src/plugins/danmu/index.js +++ b/packages/xgplayer/src/plugins/danmu/index.js @@ -167,7 +167,7 @@ class Danmu extends Plugin { registerExtIcons () { const { player, config } = this - if (config.panel) { + if (config.panel && player.controls) { const panelOptions = { config: { onChangeset: (set) => { @@ -178,7 +178,7 @@ class Danmu extends Plugin { this.danmuPanel = player.controls.registerPlugin(DanmuPanel, panelOptions, DanmuPanel.pluginName) } const { switchConfig } = config - if (!config.closeDefaultBtn) { + if (!config.closeDefaultBtn && player.controls) { const buttonOptions = { config: { onSwitch: (event, isOpen) => {