-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
I just wanted to share a discussion we had in the dash.js group regarding inband key rotation. Please feel free to move this or close if not relevant.
- Disucssion link: Refactor protection and fix key rotation dash.js#3805
Description
Basically the question is if the pssh also changes once the key is rotated? For me this was not clearly stated in Section 9.3. The basic workflow of an EME based player is as follows:
- Throw the segment into MSE buffer
- An
encryptedevent is thrown by the EME. Theencryptedevent contains the DRM init data to generate akeymessageusingsession.generateRequest - From Section 9.3 I understand that the
KIDinmoof/traf/sgpdchanges when the key is rotated. This is not part of the DRM init data and would need to be parsed from the corresponding segment.
Problem statement
Based on the workflow described above: How would a client map the init data from the encrypted event to the KID in the moof/traf/sgpd? . How do I know exactly which encrypted event corresponds to which segment? Events can be delayed. In addition, audio and video segments are fetched and appended in parallel. How do I map the encrypted event to audio or video? For me step 3 below is unclear:
- Throw the segment into MSE buffer
- An
encryptedevent is thrown by the EME. Theencryptedevent contains the DRM init data to forward to the CDM to generate akeymessageusingsession.generateRequest - Check if the
kidinmoof/traf/sgpdhas changed. The right media segment for theencryptedevent has to be identified - If
kidhas changed create a new key session and issue a license request
Current dash.js implementation
Currently we rely on the pssh to change once the key is rotated. If the pssh changes we can simply compare the initdata to the initdata we saw previously. If this has changed we create a new key session and issue a license request.