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

Should 'Restrictions' in Config prevent license requests for restricted adaptation sets? #3429

Closed
KieronAllsop opened this issue May 27, 2021 · 3 comments · Fixed by #6204
Closed
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@KieronAllsop
Copy link

Have you read the Tutorials?
Yes

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

What version of Shaka Player are you using?
2.5.17

Please ask your question
If content is encoded with separate adaptation sets for Audio/SD/HD/UHD

SD has two representations 360p/480p protected with KeyId ‘a’ (for example)
HD has two representations 720p/1080p protected with KeyId ‘b’
UHD has one representation 2160p protected with KeyId ‘c’
Audio has one representation 128kbps protected with KeyId ‘d’

And the Player Config has been configured thus:
abr.restrictions.maxWidth=1920;abr.restrictions.maxHeight=1080;restrictions.maxWidth=1920;restrictions.maxHeight=1080
(omitted the rest of the URL)

Should Shaka still attempt to retrieve the UHD key?
Or just prevent the playback / selection of the 2160p adaptation set?

What I am seeing that whilst it does prevent the selection of the 2160p track, it still requests that key from the license server. I had hoped that it would prevent the license request for the UHD key. Note this is being tested with Playready using a PRHO version 4.0.0.0.

@KieronAllsop KieronAllsop added the type: question A question from the community label May 27, 2021
@TheModMaker
Copy link
Contributor

I'm going to mark this as an enhancement since, even though I haven't reproduced, I think you are correct. When a stream is restricted, we just mark it to not be played, but we probably still send all the license requests out. We could probably change this to check for whether it is restricted before sending out the license request.

Can you provide some sample content for this? All out content uses a single PSSH data so we get all the keys with one license request. The content should last a while since this will be put on the backlog for now.

@TheModMaker TheModMaker added type: enhancement New feature or request priority: P3 Useful but not urgent and removed type: question A question from the community labels Jul 26, 2021
@TheModMaker TheModMaker added this to the Backlog milestone Jul 26, 2021
@joeyparrish
Copy link
Member

I believe there is an important difference between restrictions and abr.restrictions. A stream excluded by abr.restrictions is still playable, but won't be chosen by ABR. So we should still get licenses for that. That would not be true of restrictions, though, which are equivalent to key-based restrictions from DrmEngine.

@KieronAllsop
Copy link
Author

Using the following in Custom Content on https://shaka-player-demo.appspot.com/demo

Content: https://urm.latens.com:9443/content/pr3_altered/out.mpd
License Server: https://urm.latens.com:6443/license43/rightsmanager.asmx
License Header:
Name: Authorization
Value:
Bearer eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4R0NNIiwia2lkIjoiMTM4NTA3MjctODI2Mi00MmUwLWI1YzMtNTJjZjVmNmRkYzliIiwiaXNzIjoiTXVsdGlUcnVzdCIsImV4cCI6IjExNjI3Mzg2ODI0ODU3IiwiaWF0IjoiMTYyNzM4NjgyNTg1NyIsInZlciI6IjIifQo.SGVf0nCSzyWr0i8rSC_K-w.cjAJz3fADO0HnDOzLw1Iaw.8CZ7m8afA8G49YYX_jImcOG99TTIUo8XkLrYnhczVuNFfI5Ri1h4dHrZTTw0lyb75S9mne476wIaWPHI441-OZAMwO5bHLFuibM6KQuwCYBSULimUN_3E2OaZtfsU1mtLdjTLxIdHMH8xyeWNBJXHRm3IeXqJ56ET3qBr5F54b67bYBf-efTh7RG3fbAA0SQQ27vZA.pZoSNqd_4LZj7onFEswZkg

(Note this is a long lasting token, however should it need replaced let me know).

The content has the Playready PSSH containing WRM Header version PRHO 4.0.0.0.
This means that for each representation a license request is made.
So Audio / SD / HD / UHD all make a license request to the rightsmanager (as can be observed in devtool/Network).

Setting restrictions.maxHeight=1080 prevents the 2160p resolution from being selected in the video pane, but it does NOT prevent a license request.

@avelad avelad added type: bug Something isn't working correctly and removed type: enhancement New feature or request labels Jan 31, 2024
@avelad avelad modified the milestones: Backlog, v5.0 Jan 31, 2024
@avelad avelad added priority: P2 Smaller impact or easy workaround and removed priority: P3 Useful but not urgent labels Jan 31, 2024
Vasanthavanan-Devarajan pushed a commit to Vasanthavanan-Devarajan/shaka-player that referenced this issue Feb 20, 2024
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Mar 31, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants