Key system priority
Created by: bbert
The goal of this PR is to enable the key systems selection process to request the key systems access in a given priority order.
By default, in dash.js the key systems order is pre-defined in ProtectionKeyController: https://github.com/Dash-Industry-Forum/dash.js/blob/f4418b56213e4d5889d9eb0b15074e45c42b7bb8/src/streaming/protection/controllers/ProtectionKeyController.js#L72))
As a use case, on some devices you may have 2 different available CDMs, and for a specific service you would require dash.js to select the second one in the pre-defined order. Thus the user can set the priority in the protectionData in order to force dash.js selecting the key systems in the user-defined order.
For example, if you provide the following protectionData:
{
"com.widevine.alpha": {
"serverURL": "https://drm-widevine-licensing.axtest.net/AcquireLicense",
"priority": 0
},
"com.microsoft.playready": {
"serverURL": "https://drm-playready-licensing.axtest.net/AcquireLicense",
}
}
Then dash.js will select first and request access to the Widevine key system.
The same goald could have been achieved based on PR #2953, but this PR propose a more easiest way to achieve this.