Bug 1305336. Part 5 - use manifestVideo() so pref changes can take effect as expected. draft
authorJW Wang <jwwang@mozilla.com>
Mon, 26 Sep 2016 11:59:44 +0800
changeset 417534 bd5cb7d0db5ec47b8bfd6372635348e44fdbbc08
parent 417533 a71ab4722c209bfd2435006af6f2909ae97a4094
child 532100 6cbf7330b02137208bce4623cdae72a278506c51
push id30414
push userjwwang@mozilla.com
push dateMon, 26 Sep 2016 04:03:53 +0000
bugs1305336
milestone52.0a1
Bug 1305336. Part 5 - use manifestVideo() so pref changes can take effect as expected. MozReview-Commit-ID: 2YXn4jSfivh
dom/media/test/manifest.js
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -1464,22 +1464,22 @@ function checkMetadata(msg, e, test) {
 function getPlayableVideo(candidates) {
   var resources = getPlayableVideos(candidates);
   if (resources.length > 0)
     return resources[0];
   return null;
 }
 
 function getPlayableVideos(candidates) {
-  var v = document.createElement("video");
+  var v = manifestVideo();
   return candidates.filter(function(x){return /^video/.test(x.type) && v.canPlayType(x.type);});
 }
 
 function getPlayableAudio(candidates) {
-  var v = document.createElement("audio");
+  var v = manifestVideo();
   var resources = candidates.filter(function(x){return /^audio/.test(x.type) && v.canPlayType(x.type);});
   if (resources.length > 0)
     return resources[0];
   return null;
 }
 
 // Returns the type of element that should be created for the given mimetype.
 function getMajorMimeType(mimetype) {