Bug 1341342: [MSE] P2. Always enable MSE with webm/vp8. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 21 Feb 2017 19:07:15 +0100
changeset 373315 95c81a2ecf7317ba77007c57f397177537e06239
parent 373314 b974e52e577dca4fb3cd570898e34cb8d68a512b
child 373316 f2019fbd6f8c41163eb540d798558d44fcf176f4
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1341342
milestone54.0a1
Bug 1341342: [MSE] P2. Always enable MSE with webm/vp8. r=gerald MozReview-Commit-ID: 4x1zyDZXqUt
dom/media/mediasource/MediaSource.cpp
--- a/dom/media/mediasource/MediaSource.cpp
+++ b/dom/media/mediasource/MediaSource.cpp
@@ -110,16 +110,18 @@ MediaSource::IsTypeSupported(const nsASt
       mimeType == MEDIAMIMETYPE("audio/mp4")) {
     if (!Preferences::GetBool("media.mediasource.mp4.enabled", false)) {
       return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
     }
     return NS_OK;
   }
   if (mimeType == MEDIAMIMETYPE("video/webm")) {
     if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
+          containerType->ExtendedType().Codecs().Contains(
+            NS_LITERAL_STRING("vp8")) ||
           IsWebMForced(aDiagnostics))) {
       return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
     }
     return NS_OK;
   }
   if (mimeType == MEDIAMIMETYPE("audio/webm")) {
     if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
           Preferences::GetBool("media.mediasource.webm.audio.enabled", true))) {