diff --git a/src/ext/conf/BrowserDetect.js b/src/ext/conf/BrowserDetect.js index 0c28caa..702ed1c 100644 --- a/src/ext/conf/BrowserDetect.js +++ b/src/ext/conf/BrowserDetect.js @@ -9,6 +9,7 @@ const BrowserDetect = { edge: process.env.BROWSER === 'edge', processEnvBrowser: process.env.BROWSER, processEnvChannel: process.env.CHANNEL, + isEdgeUA: () => /Edg\/(\.?[0-9]*)*$/.test(window.navigator.userAgent) } if (process.env.CHANNEL !== 'stable') { diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index 8abbd13..f04bc5e 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -3,6 +3,7 @@ import ExtensionMode from '../../../common/enums/extension-mode.enum' import AspectRatio from '../../../common/enums/aspect-ratio.enum'; import PlayerNotificationUi from '../uwui/PlayerNotificationUI'; import PlayerUi from '../uwui/PlayerUI'; +import BrowserDetect from '../../conf/BrowserDetect'; if (process.env.CHANNEL !== 'stable'){ console.info("Loading: PlayerData.js"); @@ -45,8 +46,13 @@ class PlayerData { this.extensionMode = videoData.extensionMode; this.invalid = false; this.element = this.getPlayer(); + this.notificationService = new PlayerNotificationUi(this.element, this.settings); - this.ui = new PlayerUi(this.element, this.settings); + + if (BrowserDetect.isEdgeUA()) { + this.ui = new PlayerUi(this.element, this.settings); + } + this.dimensions = undefined; this.overlayNode = undefined;