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

Check if PlayReady license message is wrapped in XML. #815

Conversation

chrisfillmore
Copy link
Contributor

Resolves #814

// PlayReady CDM message is UTF-8 encoded and can be passed to the license
// server as-is. Other CDMs do not seem to need this kind of special
// handling.
var xml = String.fromCharCode.apply(null, request.body);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request.body is typed as an ArrayBuffer, so you will need to wrap that in "new Uint8Array".

Here's a demo of fromCharCode applied to both a Uint8Array and an ArrayBuffer:

u = new Uint8Array([61, 62, 63, 64, 65]);

String.fromCharCode.apply(null, u);
"=>?@A"

String.fromCharCode.apply(null, u.buffer);
""

If request.body is a Uint8Array at runtime, wrapping it again will not cause a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@joeyparrish
Copy link
Member

Thank you very much for your contribution!

@joeyparrish
Copy link
Member

Looks good to me! I'll run tests on the build bot.

@shaka-bot
Copy link
Collaborator

All tests passed!

@joeyparrish joeyparrish merged commit 4352c0b into shaka-project:master May 18, 2017
joeyparrish pushed a commit that referenced this pull request May 23, 2017
@joeyparrish
Copy link
Member

This fix was just released in v2.1.2.

shaka-bot pushed a commit that referenced this pull request Jun 5, 2017
We broke PlayReady on IE and Edge in #815 when we fixed PlayReady for
Tizen.  This should work for both, but will still need to be tested on
Tizen after merging.

Closes #837

Change-Id: Iff41845ae6a4b369e8f21a80623ebb2cb5475fd6
joeyparrish added a commit that referenced this pull request Jun 5, 2017
We broke PlayReady on IE and Edge in #815 when we fixed PlayReady for
Tizen.  This should work for both, but will still need to be tested on
Tizen after merging.

Closes #837

Change-Id: Iff41845ae6a4b369e8f21a80623ebb2cb5475fd6
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
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: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants