[Proposal] DRM: add failOnEncryptedAfterClear
keySystems option
#1490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An application reported to us an issue where they couldn't play a content of mixed clear and encrypted contents on PlayReady devices.
After a LOT of attempts at work-arounds, some of them described here, we didn't succeed to actually find a good solution that would both allow smooth transition between Periods and a mix of encrypted and unencrypted content with the provided contents on PlayReady devices.
So I attempted to play the same content with other players:
dash.js didn't had a smooth transition between Periods here, it first loaded and played the clear content, then once finished, loaded and played the encrypted content, with a black screen and license request in-between.
The shaka-player failed to play the content, I tried to debug it but I did not succeed to make it play the content.
This is very probably an issue with PlayReady (and perhaps with the content? Though I haven't found anything wrong), yet they historically haven't been quick to fix issues we reported, so we may have to provide a perhaps-temporary solution here.
That's why I'm introducing the for-now undocumented (and experimental feature?)
keySystems[].failOnEncryptedAfterClear
loadVideo
option.When set to
true
, we'll reload if an encrypted Period is encountered after a clear Period has been played. The logic for now is not perfect with very rare risks of false negatives.NOTE: I also profited from this commit to add the
canFilterProtectionData
option to the streams. Previously it was implicitly enabled when thedrmSystemId
was defined.