Bug 1305336. Part 5 - use manifestVideo() so pref changes can take effect as expected.
MozReview-Commit-ID: 2YXn4jSfivh
--- 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) {