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

PlayReady PSSH/PRO from Manifest instead of MPD #3423

Closed
Doolali opened this issue Oct 7, 2020 · 11 comments
Closed

PlayReady PSSH/PRO from Manifest instead of MPD #3423

Doolali opened this issue Oct 7, 2020 · 11 comments
Assignees
Labels
Milestone

Comments

@Doolali
Copy link

Doolali commented Oct 7, 2020

Quick question, how do you force dash.js to use the pssh/pro from the manifest instead of the mp4.

I have fixed some data in the manifest but when received the PlayReady license request on the server it's using the old data that's encoded into the mp4.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Oct 12, 2020

Do you see multiple license requests? One with the pssh from the segments and one with the pssh from the manifest?

Usually the pssh from the manifest should be preferred by dash.js. However, there is no settings flag to control this. Can you check if it works when you uncomment the encrypted event:

        return {
            handleEvent: function (event) {
                switch (event.type) {
                    case 'encrypted':
                       
                       // if (event.initData) {
                         //   let initData = ArrayBuffer.isView(event.initData) ? event.initData.buffer : event.initData;
                          //  eventBus.trigger(events.NEED_KEY, {key: new NeedKey(initData, event.initDataType)});
                       // }
                        break;
                }
            }
        };

@dsilhavy
Copy link
Collaborator

dsilhavy commented Nov 4, 2020

@Doolali Any updates on this?

@dsilhavy dsilhavy added this to the 3.2.0 milestone Nov 4, 2020
@Doolali
Copy link
Author

Doolali commented Nov 5, 2020

As far as I remember we were only getting a single license request with the pssh from the segment.

@dsilhavy Will have a test this weekend and get back to you!

@dsilhavy
Copy link
Collaborator

@Doolali Is this issue still relevant or can we close it?

@dsilhavy
Copy link
Collaborator

Closing due to inactivity

@bbert
Copy link
Contributor

bbert commented Oct 18, 2021

I reopen this issue since I have somehow same question: how can we ignore the pssh from init segments (mp4) in case the pssh is provided in the manifest and differs from the one in init segment and while we should rely primarily on the pssh from manifest?

Also you can find in section 8 of DASH-IF guidelines regarding content protection: https://dashif-documents.azurewebsites.net/Guidelines-Security/master/Guidelines-Security.html#:~:text=Initialization%20segments%20SHOULD,specific%20ContentProtection%20descriptors.:
"Initialization segments SHOULD NOT contain any moov/pssh box ([CMAF], section 7.4.3) and DASH clients MAY ignore such boxes when encountered. Instead, pssh boxes required for DRM system initialization are part of the DRM system configuration and SHOULD be placed in the MPD as cenc:pssh elements in DRM system specific ContentProtection descriptors."

In dash.js, if we have pssh in manifest, shouldn't we ignore pssh from init segments?
@sandersaares any opinion?

@dsilhavy
Copy link
Collaborator

Easiest workaround would certainly be to add a settings flag like ignorePsshFromSegments or something similar.

I think ignoring it in general is dangerous. I saw streams that did not update the pssh in the manifest after a key rotation but only the one in the segments.

@bbert
Copy link
Contributor

bbert commented Oct 19, 2021

Yes, we should keep backward compatibility with those streams.
Settings flag is a good option.

@dsilhavy dsilhavy modified the milestones: 3.2.0, 4.1.1 Oct 19, 2021
@dsilhavy dsilhavy self-assigned this Oct 21, 2021
@dsilhavy
Copy link
Collaborator

dsilhavy commented Oct 29, 2021

@bbert @Doolali As part of #3793 I added a new flag ignoreEmeEncryptedEvent . The flag disables the needkey handling in the ProtectionController:

    function _onNeedKey(event, retry) {
        if (!settings.get().streaming.protection.ignoreEmeEncryptedEvent) {
          // Rest of the code
      }
}

Is this sufficient for your use case?

@bbert
Copy link
Contributor

bbert commented Oct 29, 2021

Yes fine !! That's the way I tried

@dsilhavy
Copy link
Collaborator

dsilhavy commented Nov 1, 2021

Implemented as part of #3793 . In order to use this feature, adjust the settings as described here: https://github.com/Dash-Industry-Forum/dash.js/wiki/Digital-Rights-Management-(DRM)-and-license-acquisition#ignoring-init-data-from-the-pssh

@dsilhavy dsilhavy closed this as completed Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants