mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 1276132 - Don't show EME 'enable' UI for non-visible keysystems. r=gijs
This means we'll only show the EME UI for keysystems that are explicitly turned on in the build config, or those that are enabled after the build via prefs. MozReview-Commit-ID: 7VTp1BJSZFy --HG-- extra : rebase_source : 6a31f9d8fc2f06ef05988b510946ed924c613c2a
This commit is contained in:
parent
91ab2bc0c4
commit
359a1add5d
@ -31,6 +31,20 @@ var gEMEHandler = {
|
||||
}
|
||||
browser.reload();
|
||||
},
|
||||
isKeySystemVisible: function(keySystem) {
|
||||
if (!keySystem) {
|
||||
return false;
|
||||
}
|
||||
if (keySystem.startsWith("com.adobe") &&
|
||||
Services.prefs.getPrefType("media.gmp-eme-adobe.visible")) {
|
||||
return Services.prefs.getBoolPref("media.gmp-eme-adobe.visible");
|
||||
}
|
||||
if (keySystem == "com.widevine.alpha" &&
|
||||
Services.prefs.getPrefType("media.gmp-widevinecdm.visible")) {
|
||||
return Services.prefs.getBoolPref("media.gmp-widevinecdm.visible");
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getLearnMoreLink: function(msgId) {
|
||||
let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel");
|
||||
let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
|
||||
@ -46,8 +60,8 @@ var gEMEHandler = {
|
||||
return;
|
||||
}
|
||||
let {status: status, keySystem: keySystem} = parsedData;
|
||||
// Don't need to show if disabled
|
||||
if (!this.uiEnabled) {
|
||||
// Don't need to show if disabled or keysystem not visible.
|
||||
if (!this.uiEnabled || !this.isKeySystemVisible(keySystem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user