Only show the popup in Edge

This commit is contained in:
Tamius Han 2020-12-22 03:21:14 +01:00
parent f7c373481d
commit f174ddab68
2 changed files with 8 additions and 1 deletions

View File

@ -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') {

View File

@ -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;