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

@ -1871,20 +1871,6 @@ nsresult HTMLMediaElement::LoadResource()
// Set the media element's CORS mode only when loading a resource
mCORSMode = AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
#ifdef MOZ_EME
bool isBlob = false;
if (mMediaKeys &&
Preferences::GetBool("media.eme.mse-only", true) &&
// We only want mediaSource URLs, but they are BlobURL, so we have to
// check the schema and abort if they are not MediaStream or real Blob.
(NS_FAILED(mLoadingSrc->SchemeIs(BLOBURI_SCHEME, &isBlob)) ||
!isBlob ||
IsMediaStreamURI(mLoadingSrc) ||
IsBlobURI(mLoadingSrc))) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
#endif
HTMLMediaElement* other = LookupMediaElementURITable(mLoadingSrc);
if (other && other->mDecoder) {
// Clone it.
@ -4014,6 +4000,7 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
return NS_ERROR_FAILURE;
}
}
#endif
MediaEventSource<void>* waitingForKeyProducer = mDecoder->WaitingForKeyEvent();
// Not every decoder will produce waitingForKey events, only add ones that can
@ -4021,7 +4008,6 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
mWaitingForKeyListener = waitingForKeyProducer->Connect(
AbstractThread::MainThread(), this, &HTMLMediaElement::CannotDecryptWaitingForKey);
}
#endif
if (mChannelLoader) {
mChannelLoader->Done();
@ -6490,6 +6476,7 @@ HTMLMediaElement::GetTopLevelPrincipal()
principal = doc->NodePrincipal();
return principal.forget();
}
#endif //MOZ_EME
void
HTMLMediaElement::CannotDecryptWaitingForKey()
@ -6508,7 +6495,6 @@ HTMLMediaElement::CannotDecryptWaitingForKey()
UpdateReadyStateInternal();
}
}
#endif //MOZ_EME
NS_IMETHODIMP HTMLMediaElement::WindowAudioCaptureChanged(bool aCapture)
{