Bug 1257100 - Report we can play type 'audio/mp4; codecs=mp4a.40.29'. r=jya,a=ritu
authorChris Pearce <cpearce@mozilla.com>
Wed, 16 Mar 2016 14:38:02 +0800
changeset 325378 7f0c41c49f0e359e27d18016665dbe2b95fd13f7
parent 325377 c4a154a8765550da45b4a477673fcd35754f80bf
child 325379 8971ca6f81ed53f66425011ddc1ccd3b310512ec
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, ritu
bugs1257100
milestone47.0a2
Bug 1257100 - Report we can play type 'audio/mp4; codecs=mp4a.40.29'. r=jya,a=ritu
dom/media/VideoUtils.cpp
dom/media/test/test_can_play_type_mpeg.html
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -470,17 +470,18 @@ LogToBrowserConsole(const nsAString& aMs
 }
 
 bool
 IsAACCodecString(const nsAString& aCodec)
 {
   return
     aCodec.EqualsLiteral("mp4a.40.2") || // MPEG4 AAC-LC
     aCodec.EqualsLiteral("mp4a.40.5") || // MPEG4 HE-AAC
-    aCodec.EqualsLiteral("mp4a.67"); // MPEG2 AAC-LC}
+    aCodec.EqualsLiteral("mp4a.67")   || // MPEG2 AAC-LC
+    aCodec.EqualsLiteral("mp4a.40.29");  // MPEG4 HE-AACv2
 }
 
 bool
 ParseCodecsString(const nsAString& aCodecs, nsTArray<nsString>& aOutCodecs)
 {
   aOutCodecs.Clear();
   bool expectMoreTokens = false;
   nsCharSeparatedTokenizer tokenizer(aCodecs, ',');
--- a/dom/media/test/test_can_play_type_mpeg.html
+++ b/dom/media/test/test_can_play_type_mpeg.html
@@ -71,17 +71,18 @@ function check_mp4(v, enabled) {
 
   check("audio/mp4; codecs=\"mp4a.40.2,\"", ""); // Invalid codecs string
 
   // HE-AAC v1
   check("audio/mp4; codecs=\"mp4a.40.5\"", "probably");
   check("audio/mp4; codecs=mp4a.40.5", "probably");
   check("audio/x-m4a; codecs=\"mp4a.40.5\"", "probably");
   check("audio/x-m4a; codecs=mp4a.40.5", "probably");
-
+  // HE-AAC v2
+  check("audio/mp4; codecs=\"mp4a.40.29\"", "probably");
 }
 
 function check_mp3(v, enabled) {
   function check(type, expected) {
     var ex = enabled ? expected : "";
     is(v.canPlayType(type), ex, type + "='" + ex + "'");
   }