Bug 1305336. Part 5 - use manifestVideo() so pref changes can take effect as expected. r=pehrsons
authorJW Wang <jwwang@mozilla.com>
Mon, 26 Sep 2016 11:59:44 +0800
changeset 358095 719b68f344f53c02a43e0292ee3f3962307a29f9
parent 358094 bbb609d92b20852d2b0f506eed5384c66fd390f2
child 358096 ab6fe8c99406917c9f70118fb275e8ad0e1398e4
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1305336
milestone52.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 1305336. Part 5 - use manifestVideo() so pref changes can take effect as expected. r=pehrsons 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) {