TypeError when attempting to play protected media on insecure origin
Created by: davemevans
Environment
-
The MPD passes the DASH-IF Conformance Tool on http://dashif.org/conformance.html -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: any protected content, e.g: https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p.mpd
- Dash.js version: nightly
- Browser name/version: Chrome (probably any though)
- OS name/version: Win7 (but probably any)
Steps to reproduce
- Load player on insecure origin eg http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
- 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.