Move the code that shows the Edge popup back to PlayerData

This commit is contained in:
Tamius Han 2020-12-23 01:15:11 +01:00
parent 1e8fd6aad4
commit 804509b3c5
2 changed files with 11 additions and 5 deletions

View File

@ -564,11 +564,8 @@ class ArDetector {
this.drmNotificationShown = true;
// if we detect Edge, we'll throw the aggressive popup
if (BrowserDetect.isEdgeUA() && !this.settings.active.mutedNotifications?.browserSpecific?.edge?.brokenDrm?.[window.hostname]) {
new PlayerUi(this.element, this.settings);
} else {
this.conf.player.showNotification('AARD_DRM');
}
this.conf.player.showEdgeNotification();
this.conf.player.showNotification('AARD_DRM');
this.conf.resizer.setAr({type: AspectRatio.Reset});
return;

View File

@ -480,6 +480,15 @@ class PlayerData {
showNotification(notificationId) {
this.notificationService?.showNotification(notificationId);
}
/**
* NOTE: this method needs to be deleted once Edge gets its shit together.
*/
showEdgeNotification() {
if (BrowserDetect.isEdgeUA() && !this.settings.active.mutedNotifications?.browserSpecific?.edge?.brokenDrm?.[window.hostname]) {
this.ui = new PlayerUi(this.element, this.settings);
}
}
}
if (process.env.CHANNEL !== 'stable'){