Revert following changes for fixing Primetime issue:

- Issue #26 Part 2a: make more EME code conditional. (99118e38e)
- Issue #26 - Part 2b: Stub out GMPDecryptorProxy functions. (d44c61bf6)
- Issue #26 - Part 2c: Remove dependence on gmp/widevine-adapter/* (4c9689f68)
- Issue #1392 - Change --enable-eme to MOZ_ARG_ENABLE_BOOL and remove MOZ_EME_MODULES (832d84d2c)
- [Basilisk] Issue MoonchildProductions/UXP#1392 - Remove usage of MOZ_EME_MODULES (3a165cd)
- Issue #65 - Remove AppConstants from toolkit/mozapps/extensions (758618b60)
This commit is contained in:
Roy Tam 2020-02-29 23:36:29 +08:00
commit 03b286c4d8
29 changed files with 64 additions and 199 deletions

View file

@ -7,15 +7,16 @@
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} =
Components;
this.EXPORTED_SYMBOLS = [ "EME_ADOBE_ID",
"GMP_PLUGIN_IDS",
this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS",
"GMPPrefs",
"GMPUtils",
"EME_ADOBE_ID",
"OPEN_H264_ID",
"WIDEVINE_ID" ];
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AppConstants.jsm");
// GMP IDs
const OPEN_H264_ID = "gmp-gmpopenh264";
@ -72,32 +73,24 @@ this.GMPUtils = {
return true;
}
if (aPlugin.id == EME_ADOBE_ID) {
#if defined(XP_WIN)
// Windows Vista and later only supported by Adobe EME.
return true;
#else
return false;
#endif
// Windows XP and later only supported by Adobe EME.
return AppConstants.isPlatformAndVersionAtLeast("win", "5");
} else if (aPlugin.id == WIDEVINE_ID) {
#if defined(XP_WIN) || defined(XP_LINUX) || defined(XP_MACOSX)
// The Widevine plugin is available for Windows versions Vista and later,
// Mac OSX, and Linux.
return true;
#else
return false;
#endif
return AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
AppConstants.platform == "macosx" ||
AppConstants.platform == "linux";
}
return true;
},
_is32bitModeMacOS: function() {
#ifdef XP_MACOSX
if (AppConstants.platform != "macosx") {
return false;
}
return Services.appinfo.XPCOMABI.split("-")[0] == "x86";
#else
return false;
#endif
},
/**