mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 1131755 - Make media.eme.enabled pref enable/disable EME rather than hide/expose EME. r=bz
This commit is contained in:
parent
b9f5f47c83
commit
3c63ccea40
@ -235,6 +235,7 @@ DEFAULT_TEST_PREFS = {
|
||||
'dom.mozApps.debug': True,
|
||||
'dom.apps.customization.enabled': True,
|
||||
'media.eme.enabled': True,
|
||||
'media.eme.apiVisible': True,
|
||||
# Don't forceably kill content processes after a timeout
|
||||
'dom.ipc.tabs.shutdownTimeoutSecs': 0,
|
||||
# Don't show the search first run UI by default
|
||||
|
@ -43,6 +43,7 @@
|
||||
"dom.mozApps.debug": true,
|
||||
"dom.apps.customization.enabled": true,
|
||||
"media.eme.enabled": true,
|
||||
"media.eme.apiVisible": true,
|
||||
"dom.ipc.tabs.shutdownTimeoutSecs": 0,
|
||||
"browser.search.highlightCount": 0,
|
||||
"general.useragent.locale": "en-US",
|
||||
|
@ -1787,8 +1787,10 @@ pref("ui.key.menuAccessKeyFocuses", true);
|
||||
// Encrypted media extensions.
|
||||
#ifdef RELEASE_BUILD
|
||||
pref("media.eme.enabled", false);
|
||||
pref("media.eme.apiVisible", false);
|
||||
#else
|
||||
pref("media.eme.enabled", true);
|
||||
pref("media.eme.apiVisible", true);
|
||||
#endif
|
||||
|
||||
// Play with different values of the decay time and get telemetry,
|
||||
|
@ -2608,6 +2608,11 @@ Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!Preferences::GetBool("media.eme.enabled", false)) {
|
||||
p->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return p.forget();
|
||||
}
|
||||
|
||||
if (aKeySystem.IsEmpty() ||
|
||||
(aOptions.WasPassed() && aOptions.Value().IsEmpty())) {
|
||||
p->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR);
|
||||
|
@ -652,19 +652,19 @@ var interfaceNamesInGlobalScope =
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"MediaError",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeyError", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeyError", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaEncryptedEvent", pref: "media.eme.enabled"},
|
||||
{name: "MediaEncryptedEvent", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeys", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeys", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeySession", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeySession", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeySystemAccess", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeySystemAccess", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeyMessageEvent", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeyMessageEvent", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MediaKeyStatusMap", pref: "media.eme.enabled"},
|
||||
{name: "MediaKeyStatusMap", pref: "media.eme.apiVisible"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"MediaList",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -145,14 +145,14 @@ partial interface HTMLMediaElement {
|
||||
#ifdef MOZ_EME
|
||||
// Encrypted Media Extensions
|
||||
partial interface HTMLMediaElement {
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
readonly attribute MediaKeys? mediaKeys;
|
||||
|
||||
// void, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
|
||||
[Pref="media.eme.enabled", NewObject]
|
||||
[Pref="media.eme.apiVisible", NewObject]
|
||||
Promise<void> setMediaKeys(MediaKeys? mediaKeys);
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
attribute EventHandler onencrypted;
|
||||
};
|
||||
#endif
|
||||
|
@ -10,7 +10,7 @@
|
||||
* W3C liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Pref="media.eme.enabled", Constructor(DOMString type, optional MediaKeyNeededEventInit eventInitDict)]
|
||||
[Pref="media.eme.apiVisible", Constructor(DOMString type, optional MediaKeyNeededEventInit eventInitDict)]
|
||||
interface MediaEncryptedEvent : Event {
|
||||
readonly attribute DOMString initDataType;
|
||||
[Throws]
|
||||
|
@ -13,7 +13,7 @@
|
||||
// According to the spec, "The future of error events and MediaKeyError
|
||||
// is uncertain."
|
||||
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=21798
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
interface MediaKeyError : Event {
|
||||
readonly attribute unsigned long systemCode;
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ enum MediaKeyMessageType {
|
||||
"individualization-request"
|
||||
};
|
||||
|
||||
[Pref="media.eme.enabled", Constructor(DOMString type, optional MediaKeyMessageEventInit eventInitDict)]
|
||||
[Pref="media.eme.apiVisible", Constructor(DOMString type, optional MediaKeyMessageEventInit eventInitDict)]
|
||||
interface MediaKeyMessageEvent : Event {
|
||||
readonly attribute MediaKeyMessageType messageType;
|
||||
[Throws]
|
||||
|
@ -10,7 +10,7 @@
|
||||
* W3C liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
interface MediaKeySession : EventTarget {
|
||||
// error state
|
||||
readonly attribute MediaKeyError? error;
|
||||
|
@ -18,7 +18,7 @@ enum MediaKeyStatus {
|
||||
"internal-error"
|
||||
};
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
interface MediaKeyStatusMap {
|
||||
[Throws]
|
||||
readonly attribute unsigned long size;
|
||||
|
@ -26,7 +26,7 @@ dictionary MediaKeySystemOptions {
|
||||
MediaKeysRequirement stateful = "optional";
|
||||
};
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
interface MediaKeySystemAccess {
|
||||
readonly attribute DOMString keySystem;
|
||||
[NewObject]
|
||||
|
@ -13,7 +13,7 @@
|
||||
enum IsTypeSupportedResult { "" /* empty string */, "maybe", "probably" };
|
||||
enum SessionType { "temporary", "persistent" };
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
[Pref="media.eme.apiVisible"]
|
||||
interface MediaKeys {
|
||||
readonly attribute DOMString keySystem;
|
||||
|
||||
|
@ -414,7 +414,7 @@ partial interface Navigator {
|
||||
|
||||
#ifdef MOZ_EME
|
||||
partial interface Navigator {
|
||||
[Pref="media.eme.enabled", NewObject]
|
||||
[Pref="media.eme.apiVisible", NewObject]
|
||||
Promise<MediaKeySystemAccess>
|
||||
requestMediaKeySystemAccess(DOMString keySystem,
|
||||
optional sequence<MediaKeySystemOptions> supportedConfigurations);
|
||||
|
@ -284,6 +284,7 @@ user_pref("browser.search.isUS", true);
|
||||
user_pref("browser.search.countryCode", "US");
|
||||
|
||||
user_pref("media.eme.enabled", true);
|
||||
user_pref("media.eme.apiVisible", true);
|
||||
|
||||
#if defined(XP_WIN)
|
||||
user_pref("media.decoder.heuristic.dormant.timeout", 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user