-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
NO_PLAYABLE_REPRESENTATION
behavior for the v4
In the v3.x.x, the impossibility to play any `Representation` from a chosen track due to non-usable keys, lead to an error with the `NO_PLAYABLE_REPRESENTATION` error code . This seemed sensible at the time, but we're now encountering use cases where it would be more sensible to change the current track instead, to one that perhaps has decipherable Representation(s). The main example would be to have a separate video track linked to to another dynamic range (e.g. an HDR and a SDR track) each with different security policies (tracks with higher dynamic range would have more drastic security policies for example). Here, I would guess that an application would prefer that by default we switch to the SDR video track if no `Representation` in the HDR one is decipherable, instead of just stopping playback with a `NO_PLAYABLE_REPRESENTATION` error. This is sadly not something we can do easilty in a `v3.x.x` because it would imply breaking changes (such as switching to the `RELOADING` state during the track change without a supplementary API), but that's definitely something we would want to implement in the v4. Because an application might still want to be notified or even stop playback by itself when the chosen track has no playable Representation, I added the `no-playable-Representation` `reason` to the `trackUpdate` event, which indicates that the current track for any Period of the current content was updated due to this situation. The `NO_PLAYABLE_REPRESENTATION` error is still thrown, only now it is when no `Representation` of all tracks for the given type are decipherable.
- Loading branch information
1 parent
0a4298d
commit bdb0dce
Showing
8 changed files
with
212 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.