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

Add possibility to filter and reorder key systems prioritization order at application level #2953

Conversation

bbert
Copy link
Contributor

@bbert bbert commented Mar 12, 2019

This PR:

This PR follows the conversation we have in issue #2249.
Then with the help of this PR, ClearKey protected content mentionned in #2249 can be supported by dash.js if we do explicitely consider only ClearKey key systems at application level.

This could be achieved this way:

    var keySystems = player.getProtectionController().getKeySystems();
    keySystems = keySystems.filter(keySystem => {
        return (keySystem.systemString.indexOf('clearkey') > 0);
    });
    player.getProtectionController().setKeySystems(keySystems);

@JohnIball and @Murmur could you try this PR on your side and check that works with your streams.

…systems filtring and prioritization at application level
@JohnIball
Copy link

Thanks, @ShanePhelan will have a look at this on our side.

@Murmur
Copy link

Murmur commented Mar 12, 2019

This is my test manifests and simplfied playback test page. I did not apply PR changes on this one (using nightly build from website) but may do it later this week.

Embedded KID:KEY in javascript, ok in Chrome/Firefox
https://m.dtv.fi/dash/index_clearkey2b.html?video=31
https://m.dtv.fi/dash/dasherh264v3/drm/manifest_clearkey.mpd

ClearKey LAURL request, ok in Chrome/Firefox, use 1077ef* schemeid
https://m.dtv.fi/dash/index_clearkey2.html?video=33
https://m.dtv.fi/dash/dasherh264v3/drm/manifest_clearkey1077ef.mpd

Embedded KID:KEY in javascript, MultiDRM
https://m.dtv.fi/dash/index_clearkey2b.html?video=36
https://m.dtv.fi/dash/dasherh264v3/drm/manifest.mpd

ClearKey LAURL request, MultiDRM
https://m.dtv.fi/dash/index_clearkey2.html?video=36
https://m.dtv.fi/dash/dasherh264v3/drm/manifest.mpd

Last time I found out Dashjs did different things if Manifest had 1077ef* or e2719d* drm identifiers. This is something also to test with this new PR source code change.

Playready: com.microsoft.playready,urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95
Widevine: com.widevine.alpha,urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed
ClearKey: org.w3.clearkey,urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e    
ClearKey(W3C): org.w3.clearkey,urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b


@epiclabsDASH
Copy link
Contributor

@bbert, I think it would makes sense to create a sample that covers this functionality and shows how to setup dash.js to play clearkey content. What do you think?

@bbert
Copy link
Contributor Author

bbert commented Mar 12, 2019

Most of ClearKey contents are working without changing key systems configuration inside dash.js.
That depends especially on the way key systems are declared in the MPD.

I have no available sample with manifest configuration that leads to original issue.
If @Murmur or maybe @sandersaares can provide a such sample, then yes I can setup a sample that show how to setup key systems configuration.

I was thinking of another use case that could benefit of this functionnality: on chromecast for example, PlayReady and Widevine key systems are available, and by default dash.js will consider and use PlayReady key system since it is declared first inside dash.js.
We could provide a sample to force dash.js using Widevine on chromecast by filtering key systems at application level. Then we demonstrate the mechanism that can then serve as an example for the ClearKey streams.
What do you think?

@epiclabsDASH epiclabsDASH added this to the v3.0 milestone Mar 18, 2019
@epiclabsDASH
Copy link
Contributor

Sounds good! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants