Make matroska mime type checking more consistent.

This commit is contained in:
Jeroen Vreeken 2019-07-11 16:36:22 +02:00 committed by Roy Tam
commit 68c810a1ac
4 changed files with 10 additions and 5 deletions

View file

@ -118,7 +118,8 @@ MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* a
}
return NS_OK;
}
if (mimeType.EqualsASCII("audio/webm")) {
if (mimeType.EqualsASCII("audio/webm") ||
mimeType.EqualsASCII("audio/x-matroska")) {
if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
Preferences::GetBool("media.mediasource.webm.audio.enabled", true))) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;