Add possibility to filter and reorder key systems prioritization order at application level
Created by: bbert
This PR:
- adds a method to the ProtectionController to enable filtering and reorder key systems prioritization at application level
- reverts PR #2770 and then PR #2318 by considering all key systems declared in mpd (even if no pssh is provided)
This PR follows the conversation we have in issue #2249 (closed). Then with the help of this PR, ClearKey protected content mentionned in #2249 (closed) 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.