Bug 1139316 - Add pref to enable EME outside of MSE. r=edwin
This commit is contained in:
@@ -1166,7 +1166,9 @@ nsresult HTMLMediaElement::LoadResource()
|
||||
mCORSMode = AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
|
||||
|
||||
#ifdef MOZ_EME
|
||||
if (mMediaKeys && !IsMediaStreamURI(mLoadingSrc)) {
|
||||
if (mMediaKeys &&
|
||||
!IsMediaStreamURI(mLoadingSrc) &&
|
||||
Preferences::GetBool("media.eme.mse-only", true)) {
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
#endif
|
||||
@@ -4366,7 +4368,9 @@ HTMLMediaElement::SetMediaKeys(mozilla::dom::MediaKeys* aMediaKeys,
|
||||
mMediaKeys->Shutdown();
|
||||
mMediaKeys = nullptr;
|
||||
}
|
||||
if (mDecoder && !mMediaSource) {
|
||||
if (mDecoder &&
|
||||
!mMediaSource &&
|
||||
Preferences::GetBool("media.eme.mse-only", true)) {
|
||||
ShutdownDecoder();
|
||||
promise->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return promise.forget();
|
||||
|
||||
Reference in New Issue
Block a user