Skip to content

Commit 5bfa771

Browse files
committed
WTF - Chromecast PlayReady
Change-Id: I6bfc7d7d7e544f27b901115c0ba98c75386f75ea
1 parent 04d1445 commit 5bfa771

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/media/drm_engine.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,10 @@ shaka.media.DrmEngine.prototype.unpackPlayReadyRequest_ = function(request) {
10411041
var dom = new DOMParser().parseFromString(xml, 'application/xml');
10421042

10431043
if (dom.querySelector('parsererror')) {
1044-
// The document was not valid XML.
1045-
// Assume this does not need to be unpacked.
1044+
// UTF-16 intepretation did not produce a valid document. Try UTF-8.
10461045
// This is the case with Chromecast's PlayReady implementation.
1047-
shaka.log.debug('Not unpacking PlayReady request.');
1048-
return;
1046+
xml = shaka.util.StringUtils.fromUTF8(request.body);
1047+
dom = new DOMParser().parseFromString(xml, 'application/xml');
10491048
}
10501049

10511050
// Set request headers.

0 commit comments

Comments
 (0)