diff --git a/lib/dash/mpd_parser.js b/lib/dash/mpd_parser.js index 4173b11d5c..ffaeebeb59 100644 --- a/lib/dash/mpd_parser.js +++ b/lib/dash/mpd_parser.js @@ -1054,7 +1054,7 @@ shaka.dash.mpd.ContentProtection.prototype.parse = function(parent, elem) { // could be application-specific. Therefore we must capture whatever it // contains, and let the application choose a scheme and map it to a key // system. - this.children = elem.children; + this.children = Array.prototype.slice.call(elem.childNodes); }; @@ -1375,14 +1375,14 @@ shaka.dash.mpd.parseChild_ = function(parent, elem, constructor) { shaka.dash.mpd.findChild_ = function(elem, name) { var childElement = null; - for (var i = 0; i < elem.children.length; i++) { - if (elem.children[i].tagName != name) { + for (var i = 0; i < elem.childNodes.length; i++) { + if (elem.childNodes[i].tagName != name) { continue; } if (childElement) { return null; } - childElement = elem.children[i]; + childElement = elem.childNodes[i]; } return childElement; @@ -1402,12 +1402,12 @@ shaka.dash.mpd.findChild_ = function(elem, name) { shaka.dash.mpd.parseChildren_ = function(parent, elem, constructor) { var parsedChildren = []; - for (var i = 0; i < elem.children.length; i++) { - if (elem.children[i].tagName != constructor.TAG_NAME) { + for (var i = 0; i < elem.childNodes.length; i++) { + if (elem.childNodes[i].tagName != constructor.TAG_NAME) { continue; } var parsedChild = new constructor(); - parsedChild.parse.call(parsedChild, parent, elem.children[i]); + parsedChild.parse.call(parsedChild, parent, elem.childNodes[i]); parsedChildren.push(parsedChild); } diff --git a/support.js b/support.js index 4a6d3cc906..402c0d4d82 100644 --- a/support.js +++ b/support.js @@ -230,7 +230,6 @@ function testForKeySystem(ks, required) { testForClass(window, 'HTMLMediaElement', true); testForClass(window, 'MediaSource', true); testForClass(window, 'Promise', true); -testForProperty(document, 'children', true); // Optional: testForClass(window, 'VTTCue', false); @@ -314,7 +313,7 @@ function onAsyncComplete() { // Synthesize a summary at the top from other properties. // Must be done after all async tasks are complete. var requiredFeatures = found['HTMLMediaElement'] && found['MediaSource'] && - found['Promise'] && found['children']; + found['Promise']; var qoe = found['getVideoPlaybackQuality'] || found['droppedFrameCount']; var subtitles = found['VTTCue']; var emeApi = found['MediaKeys'] || found['generateKeyRequest'];