Move edge warning popup into the starting phase of autodetection
This commit is contained in:
parent
bcc3d89342
commit
75ec1969c0
@ -83,6 +83,7 @@
|
|||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import Icon from '../common/components/Icon';
|
import Icon from '../common/components/Icon';
|
||||||
import BrowserDetect from '../ext/conf/BrowserDetect';
|
import BrowserDetect from '../ext/conf/BrowserDetect';
|
||||||
|
import Settings from '../ext/lib/Settings';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -110,6 +111,25 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getUrl(url) {
|
getUrl(url) {
|
||||||
return BrowserDetect.firefox ? browser.runtime.getURL(url) : chrome.runtime.getURL(url);
|
return BrowserDetect.firefox ? browser.runtime.getURL(url) : chrome.runtime.getURL(url);
|
||||||
|
},
|
||||||
|
async hidePopupForever() {
|
||||||
|
const settings = new Settings();
|
||||||
|
await settings.init();
|
||||||
|
|
||||||
|
if (!settings.active.mutedNotifications) {
|
||||||
|
settings.active.mutedNotifications = {};
|
||||||
|
}
|
||||||
|
if (!settings.active.mutedNotifications?.browserSpecific) {
|
||||||
|
settings.active.mutedNotifications.browserSpecific = {
|
||||||
|
edge: {
|
||||||
|
brokenDrm: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
settings.active.mutedNotifications.browserSpecific.edge.brokenDrm[window.location.hostname] = true;
|
||||||
|
|
||||||
|
await settings.saveWithoutReload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ const ExtensionConfPatch = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
forVersion: '4.5.0.1',
|
forVersion: '4.5.1',
|
||||||
updateFn: (userOptions, defaultOptions) => {
|
updateFn: (userOptions, defaultOptions) => {
|
||||||
for (const site in userOptions.sites) {
|
for (const site in userOptions.sites) {
|
||||||
try {
|
try {
|
||||||
|
@ -9,6 +9,7 @@ import GuardLine from './GuardLine';
|
|||||||
import VideoAlignment from '../../../common/enums/video-alignment.enum';
|
import VideoAlignment from '../../../common/enums/video-alignment.enum';
|
||||||
import AspectRatio from '../../../common/enums/aspect-ratio.enum';
|
import AspectRatio from '../../../common/enums/aspect-ratio.enum';
|
||||||
import {sleep} from '../../lib/Util';
|
import {sleep} from '../../lib/Util';
|
||||||
|
import BrowserDetect from '../../conf/BrowserDetect';
|
||||||
|
|
||||||
class ArDetector {
|
class ArDetector {
|
||||||
|
|
||||||
@ -557,10 +558,18 @@ class ArDetector {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logger.log('error', 'arDetect', `%c[ArDetect::frameCheck] <@${this.arid}> %c[ArDetect::frameCheck] can't draw image on canvas. ${this.canDoFallbackMode ? 'Trying canvas.drawWindow instead' : 'Doing nothing as browser doesn\'t support fallback mode.'}`, "color:#000; backgroud:#f51;", e);
|
this.logger.log('error', 'arDetect', `%c[ArDetect::frameCheck] <@${this.arid}> %c[ArDetect::frameCheck] can't draw image on canvas. ${this.canDoFallbackMode ? 'Trying canvas.drawWindow instead' : 'Doing nothing as browser doesn\'t support fallback mode.'}`, "color:#000; backgroud:#f51;", e);
|
||||||
|
|
||||||
|
console.log('video is protected by DRM', this.drmNotificationShown)
|
||||||
// nothing to see here, really, if fallback mode isn't supported by browser
|
// nothing to see here, really, if fallback mode isn't supported by browser
|
||||||
if (!this.drmNotificationShown) {
|
if (!this.drmNotificationShown) {
|
||||||
this.drmNotificationShown = true;
|
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.showNotification('AARD_DRM');
|
||||||
|
}
|
||||||
|
|
||||||
this.conf.resizer.setAr({type: AspectRatio.Reset});
|
this.conf.resizer.setAr({type: AspectRatio.Reset});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,6 @@ class PlayerData {
|
|||||||
|
|
||||||
this.notificationService = new PlayerNotificationUi(this.element, this.settings);
|
this.notificationService = new PlayerNotificationUi(this.element, this.settings);
|
||||||
|
|
||||||
if (BrowserDetect.isEdgeUA()) {
|
|
||||||
this.ui = new PlayerUi(this.element, this.settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dimensions = undefined;
|
this.dimensions = undefined;
|
||||||
this.overlayNode = undefined;
|
this.overlayNode = undefined;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user