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

Get PlayReady PSSH from <ms:pro> in DASH #2058

Closed
avelad opened this issue Jul 25, 2019 · 6 comments
Closed

Get PlayReady PSSH from <ms:pro> in DASH #2058

avelad opened this issue Jul 25, 2019 · 6 comments
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@avelad
Copy link
Member

avelad commented Jul 25, 2019

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
2.5.4

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
Both

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Edge 18 Windows 10

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

I'll send a email with the url and the license server

What did you do?

Tried to played the dash content with playready encryption but it fails.

What did you expect to happen?
Playback to be normal

What actually happened?

I receive this message when trying to play the content .

Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (SystemCode:0x80041301,TypeError: SystemCode:0x80041301,)

I reviewed the issue #1837 but the pssh in the init segment is valid:
pssh

@TheModMaker
Copy link
Contributor

I agree the init data looks valid. After some testing, I see the init data we get has duplicate elements, but removing those doesn't seem to fix it. If I reorder the pssh elements so that PlayReady is first, the generateRequest call succeeds, but the license server rejects it with a Service Specific Error. It also works if I remove the other key systems' init data and only pass PlayReady, but I again get the same license server error.

@avelad
Copy link
Member Author

avelad commented Aug 6, 2019

I checked the stream in DashIF Player and works without problem...

@TheModMaker
Copy link
Contributor

When I try in the DashIF Player, I get a 500 error from the license server, the same as Shaka Player.

One thing I notice that may help is DashIF generates a pssh box based on the <mspr:pro> record in the manifest. This avoids the problems from the pssh boxes in the media. We may want to consider adding this to our DASH parser to (a) avoid this error, and (b) request the license earlier.

@joeyparrish
Copy link
Member

We have support for <mspr:pro> to get the license server URI (getPlayReadyLicenseUrl in lib/dash/content_protection.js). So we could probably add support for to override the pssh box based on that in the DASH parser, too.

@joeyparrish joeyparrish added type: enhancement New feature or request and removed needs triage labels Aug 16, 2019
@joeyparrish joeyparrish changed the title Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST when trying to play Playready encoded content Get PlayReady PSSH from <ms:pro> in DASH Aug 16, 2019
@shaka-bot shaka-bot added this to the Backlog milestone Aug 16, 2019
@avelad
Copy link
Member Author

avelad commented Aug 19, 2019

@TheModMaker , I want contribute to add the support, if you can guide me, i can made the changes this week.

I check the file ib/dash/content_protection.js and i thing that the modications should be done in parseElement_.

Parse <mspr:pro> it's easy with const proNode = shaka.util.XmlUtils.findChildrenNS(elem, 'urn:microsoft:playready', 'pro') .map(shaka.util.XmlUtils.getContents); But if I include the field as it is by overwriting the value of psshs, this does not work.

Note: Error 500 is because the license is not valid, but it is a good development.
Sorry for the delay in answering, but I was on vacation.

@TheModMaker
Copy link
Contributor

I think it would be better to do it in convertElements_. The <mspr:pro> element would be a fallback if there is no other init data available.

That contains a PRO object and you need to convert it to a pssh box. Just put the PRO data into the data section of the pssh box (use this system_id):

[4 bytes] total size
[4 bytes] 'pssh'
[4 bytes] flags (0)
[16 bytes] system_id
[4 bytes] data_size
[data_size bytes] data

TheModMaker pushed a commit that referenced this issue Aug 23, 2019
Creates "pssh" init data based on the <mspr:pro> element in the DASH manifest.

Closes #2058

Change-Id: I947fe2978acea2d233c89f0e1b4b72c23685b151
@joeyparrish joeyparrish modified the milestones: Backlog, v2.6 Aug 26, 2019
@shaka-project shaka-project locked and limited conversation to collaborators Oct 22, 2019
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
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

No branches or pull requests

4 participants