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

TypeError when attempting to play protected media on insecure origin #2458

Closed
5 tasks done
davemevans opened this issue Mar 7, 2018 · 1 comment
Closed
5 tasks done

Comments

@davemevans
Copy link
Contributor

Environment
Steps to reproduce
  1. Load player on insecure origin eg http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
  2. Attempt to play any protected media.
Observed behaviour

TypeError thrown.

Console output
Stream.js:500 Uncaught TypeError: Cannot read property 'getType' of undefined
    at checkIfInitializationCompleted (Stream.js:500)
    at initializeMedia (Stream.js:460)
    at Object.activate (Stream.js:109)
    at activateStream (StreamController.js:455)
    at MediaSource.onMediaSourceOpen (StreamController.js:438)

This is occurring because the first call to protectionController.initializeForMedia(streamProcessors[i].getMediaInfo()); in checkIfInitializationCompleted causes Stream.reset to be called due to the insecure origin, but the loop continues to iterate and dereferences streamProcessors which has been cleared.

This does not happen in 2.6.6.

@davemevans
Copy link
Contributor Author

That code introduced in #2450.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant