Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSIE 11 fails to play video when hyphen is contained inside manifest Location/BaseUri element #608

Closed
Ross-cz opened this issue Nov 25, 2016 · 1 comment
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: external An issue with an external dependency; not our issue; sometimes kept open for tracking
Milestone

Comments

@Ross-cz
Copy link
Contributor

Ross-cz commented Nov 25, 2016

Shaka creates incorrect segment url leading usually to 404 errors. This is MSIE 11 known nasty bug that won't be fixed by M$.

When you use:
new MutationObserver(function() {}).observe(document.body, {childList: true, subtree: true});
The DOMParser breaks after that. It generates multiple text nodes around each hypen, but Shaka counts only with one inside element.
Related Shaka code:

shaka.util.XmlUtils.getContents = function(elem) {
  var contents = elem.firstChild;
  if (!contents || contents.nodeType != Node.TEXT_NODE)
    return null;

  return contents.nodeValue.trim();
};

Workaround is to use elem.textContent instead of contents.nodeValue. I'll prepare pull request.

Related MSIE 11 issue source: https://connect.microsoft.com/IE/feedback/details/1398926/ie11-does-not-parse-cdata-containing-hyphens-correctly

Ross-cz added a commit to Ross-cz/shaka-player that referenced this issue Nov 25, 2016
This occurrs when hyphen is contained inside manifest Location/BaseUri element and MutationObserver(...).observe(...) called before shaka-project#608
Ross-cz added a commit to Ross-cz/shaka-player that referenced this issue Nov 25, 2016
This occurrs when hyphen is contained inside manifest Location/BaseUri element and new MutationObserver(...).observe(...) called before shaka-project#608
@joeyparrish joeyparrish added type: bug Something isn't working correctly type: external An issue with an external dependency; not our issue; sometimes kept open for tracking labels Nov 29, 2016
@joeyparrish
Copy link
Member

Marking external since this is a bug in IE11 that we will have to work around. Looking forward to your PR!

@joeyparrish joeyparrish self-assigned this Nov 29, 2016
Ross-cz added a commit to Ross-cz/shaka-player that referenced this issue Nov 29, 2016
This occurrs when hyphen is contained inside manifest Location/BaseUri element and new MutationObserver(...).observe(...) called before shaka-project#608
@joeyparrish joeyparrish modified the milestone: v2.1.0 Dec 6, 2016
ismena pushed a commit that referenced this issue Dec 15, 2016
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
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: external An issue with an external dependency; not our issue; sometimes kept open for tracking
Projects
None yet
Development

No branches or pull requests

3 participants