зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1075182 - Package and load ClearKey Content Decryption Module at startup - r=Unfocused
This commit is contained in:
Родитель
ea908adf75
Коммит
293e18a4d3
|
@ -922,3 +922,10 @@ bin/libfreebl_32int64_3.so
|
|||
@BINPATH@/clang_rt.asan_dynamic-i386.dll
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
; media
|
||||
#ifdef MOZ_EME
|
||||
@BINPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
|
||||
@BINPATH@/gmp-clearkey/0.1/clearkey.info
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,10 @@ const STRING_TYPE_NAME = "type.%ID%.name";
|
|||
|
||||
const SEC_IN_A_DAY = 24 * 60 * 60;
|
||||
|
||||
const EME_PREF_ENABLED = "media.eme.enabled";
|
||||
const CLEARKEY_PLUGIN_ID = "gmp-clearkey";
|
||||
const CLEARKEY_VERSION = "0.1";
|
||||
|
||||
const OPENH264_PLUGIN_ID = "gmp-gmpopenh264";
|
||||
const OPENH264_PREF_BRANCH = "media." + OPENH264_PLUGIN_ID + ".";
|
||||
const OPENH264_PREF_ENABLED = "enabled";
|
||||
|
@ -277,6 +281,16 @@ let OpenH264Provider = {
|
|||
}
|
||||
}
|
||||
|
||||
if (Preferences.get(EME_PREF_ENABLED, false)) {
|
||||
try {
|
||||
gmpService.addPluginDirectory(OS.Path.join(OS.Constants.Path.libDir,
|
||||
CLEARKEY_PLUGIN_ID,
|
||||
CLEARKEY_VERSION));
|
||||
} catch (e) {
|
||||
this._log.warn("startup() - adding clearkey CDM failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
let telemetry = {};
|
||||
if (this.isEnabled) {
|
||||
telemetry[OPENH264_PLUGIN_ID] = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче