Bug 884275 - Report 'maybe' instead of 'probably' from canPlayType('video/webm'). r=rillian
authorJan Gerber <j@mailb.org>
Tue, 03 Dec 2013 08:50:30 -0500
changeset 173227 7832b912da928532ed9e4b0bc4aebb4e94e4eead
parent 173226 185f4a23a4cde299940096ea16b3212ebd598fcd
child 173228 1552300c12e3f566acbadd084050d0c75a09959d
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs884275
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 884275 - Report 'maybe' instead of 'probably' from canPlayType('video/webm'). r=rillian
content/media/DecoderTraits.cpp
content/media/test/can_play_type_webm.js
--- a/content/media/DecoderTraits.cpp
+++ b/content/media/DecoderTraits.cpp
@@ -384,17 +384,17 @@ DecoderTraits::CanHandleMediaType(const 
   if (IsWaveType(nsDependentCString(aMIMEType))) {
     codecList = gWaveCodecs;
     result = CANPLAY_MAYBE;
   }
 #endif
 #ifdef MOZ_WEBM
   if (IsWebMType(nsDependentCString(aMIMEType))) {
     codecList = gWebMCodecs;
-    result = CANPLAY_YES;
+    result = CANPLAY_MAYBE;
   }
 #endif
 #ifdef MOZ_GSTREAMER
   if (GStreamerDecoder::CanHandleMediaType(nsDependentCString(aMIMEType),
                                            aHaveRequestedCodecs ? &aRequestedCodecs : nullptr)) {
     if (aHaveRequestedCodecs)
       return CANPLAY_YES;
     return CANPLAY_MAYBE;
--- a/content/media/test/can_play_type_webm.js
+++ b/content/media/test/can_play_type_webm.js
@@ -1,16 +1,16 @@
 function check_webm(v, enabled) {
   function check(type, expected) {
     is(v.canPlayType(type), enabled ? expected : "no", type);
   }
 
   // WebM types
-  check("video/webm", "probably");
-  check("audio/webm", "probably");
+  check("video/webm", "maybe");
+  check("audio/webm", "maybe");
 
   // Supported Webm codecs
   check("audio/webm; codecs=vorbis", "probably");
   check("video/webm; codecs=vorbis", "probably");
   check("video/webm; codecs=vorbis,vp8", "probably");
   check("video/webm; codecs=vorbis,vp8.0", "probably");
   check("video/webm; codecs=\"vorbis,vp8\"", "probably");
   check("video/webm; codecs=\"vorbis,vp8.0\"", "probably");