Check if PlayReady license message is wrapped in XML.#815
Merged
joeyparrish merged 4 commits intoshaka-project:masterfrom May 18, 2017
Merged
Conversation
added 2 commits
May 17, 2017 14:56
message is wrapped in XML.
message is wrapped in XML.
joeyparrish
reviewed
May 17, 2017
lib/media/drm_engine.js
Outdated
| // 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); |
Member
There was a problem hiding this comment.
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.
Member
|
Thank you very much for your contribution! |
added 2 commits
May 17, 2017 16:38
an ArrayBuffer.
…b.com/chrisfillmore/shaka-player into feature/tizenSupport_playreadyMessage
Member
|
Looks good to me! I'll run tests on the build bot. |
Collaborator
|
All tests passed! |
joeyparrish
pushed a commit
that referenced
this pull request
May 23, 2017
Member
|
This fix was just released in v2.1.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #814