Skip to content

Multiple DRM license requests #8179

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

Open
mikeszutu opened this issue Feb 27, 2025 · 8 comments
Open

Multiple DRM license requests #8179

mikeszutu opened this issue Feb 27, 2025 · 8 comments
Labels
type: question A question from the community

Comments

@mikeszutu
Copy link

mikeszutu commented Feb 27, 2025

Have you read the Tutorials?
Yes

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

If the question is related to FairPlay, have you read the tutorial?
No

What version of Shaka Player are you using?
4.13.5

What browser and OS are you using?
Chrome 133.0.6943.55 / Mac 15.3.1

Please ask your question
I'm noticing an issue where if we have a key rotation of 5 mins, we're making multiple DRM license requests on initial launch of the app. I've tried limiting using:
drm.retryParameters: {
maxAttempts: 2
}
but continues to make 12 additional requests + the usual 2 but playback is fine.

Update: Upon looking at our manifest we've set 7 periods and I believe each period is making 2 drm calls which equals to 14.

Is this typically normal or am I missing something here?

Image

@mikeszutu mikeszutu added the type: question A question from the community label Feb 27, 2025
@mmsreedhar
Copy link

We also have same issue. Is it possible to parse PERIOD in MPD depending on the current playback position? If anyone has any suggestions please help.

@avelad
Copy link
Member

avelad commented Apr 22, 2025

@joeyparrish ?

@shaka-bot
Copy link
Collaborator

@mikeszutu Does this answer all your questions? If so, would you please close the issue?

@shaka-bot shaka-bot added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 26, 2025
@mmsreedhar
Copy link

Still waiting for an answer.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 26, 2025
@joeyparrish
Copy link
Member

2 requests is relatively normal. If you set the server certificate in advance, it doesn't have to request one to create the DRM session, and that goes down to 1 request.

But these are the number of requests per unique PSSH. From the player's point of view, we don't know what is in a PSSH. The structure varies by DRM vendor, and we don't always get to know how they are encoded.

Widevine PSSHs have a "content ID" field in their opaque structure, which is used to identify a whole set of keys that belong together. If you have multiple PSSHs that all refer to the same VOD content ID, you only need to generate one DRM session and request one license.

But the player doesn't know that. It doesn't parse PSSHs deeply. And sadly, there is no standard API in the browser to figure out which PSSHs are needed for different DRM sessions and which are duplicates you could throw away.

So if you're seeing 2 requests x 7 periods = 14 requests, that's probably 7 certificate requests and 7 license requests in 7 different DRM sessions (one per period). I'm guessing the PSSHs differ (byte-for-byte) across periods.

Does that sound right?

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label May 9, 2025
@mikeszutu
Copy link
Author

I was tested with a DASH manifest with 7 periods arising from a 30min long length and 5-min key rotation period, one pssh box per period per relevant adaptation set (video and audio, one for each), and I saw only 2 requests issued.
Does the client request based on the number of PSSH blocks in the active playing Period, or should it be requesting for all of the Periods and all encountered PSSH boxes across the entire manifest?

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label May 15, 2025
@sojadhav
Copy link

sojadhav commented Jun 11, 2025

Hi @joeyparrish, @avelad

We are also seeing multiple widevine License requests

Our setup is like following :

AUDIO, SD, HD, UHD1, UHD2 tracks are having different encryption/decryption keys & different pssh box, Our license server adds decryption keys for all tracks in single License response

So first License Response has decryption keys for all track_types, still we see multiple license requests in following cases

  • When playback starts, One for AUDIO track & 2nd one for SD track
  • We see license request when track switch happens e.g SD --> HD

Is this expected ?

Please check the following & let me know if my understanding is correct

  • Shaka player will initiate new license request if it finds new unique pssh box

Please let me know

Thanks

@sojadhav
Copy link

Hi @joeyparrish

Just following up on the above message — I was wondering if there have been any updates or if you had a chance to look into it. Please let me know if there's anything I can clarify or help with.

Thanks again for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question A question from the community
Projects
None yet
Development

No branches or pull requests

6 participants