Skip to content

Commit 3b7328b

Browse files
Ross-czjoeyparrish
authored andcommitted
Fix playback when IE11 modifies the XML DOM (#611)
When there is a hypen contained inside manifest Location/BaseUri element and the application uses MutationObserver, IE11 can change the XML DOM of the manifest and break playback. This changes the way the document is parsed so that it is resilient to these unintended changes. Related IE bug: https://connect.microsoft.com/IE/feedback/details/1398926/ie11-does-not-parse-cdata-containing-hyphens-correctly Closes #608
1 parent aa00166 commit 3b7328b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Oskar Arvidsson <oskar@irock.se>
2929
Philo Inc. <*@philo.com>
3030
Robert Colantuoni <rgc@colantuoni.com>
3131
Roi Lipman <roilipman@gmail.com>
32+
Rostislav Hejduk <Ross-cz@users.noreply.github.com>
3233
SameGoal Inc. <*@samegoal.com>
3334
Sanborn Hilland <sanbornh@rogers.com>
3435
TalkTalk Plc <*@talktalkplc.com>

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Oskar Arvidsson <oskar@irock.se>
4343
Robert Colantuoni <rgc@colantuoni.com>
4444
Rohit Makasana <rohitbm@google.com>
4545
Roi Lipman <roilipman@gmail.com>
46+
Rostislav Hejduk <Ross-cz@users.noreply.github.com>
4647
Sam Dutton <dutton@google.com>
4748
Sanborn Hilland <sanbornh@rogers.com>
4849
Seth Madison <seth@philo.com>

lib/util/xml_utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ shaka.util.XmlUtils.findChildren = function(elem, name) {
6666
*/
6767
shaka.util.XmlUtils.getContents = function(elem) {
6868
var contents = elem.firstChild;
69+
70+
// check content
6971
if (!contents || contents.nodeType != Node.TEXT_NODE)
7072
return null;
7173

72-
return contents.nodeValue.trim();
74+
// read merged text content from all text nodes (fixes MSIE 11 bug)
75+
return elem.textContent.trim();
7376
};
7477

7578

0 commit comments

Comments
 (0)