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

Improve NO_PLAYABLE_REPRESENTATION behavior for the v4 #1234

Merged
merged 1 commit into from
May 16, 2023

Conversation

peaBerberian
Copy link
Collaborator

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.

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.
@peaBerberian peaBerberian force-pushed the fix/v4-no-playable-representations branch from e84bbf0 to 3ad357d Compare April 11, 2023 14:17
@peaBerberian peaBerberian merged commit 028c099 into next-v4 May 16, 2023
peaBerberian added a commit that referenced this pull request May 17, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request May 17, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jun 2, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jun 12, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jun 14, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jun 15, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jun 15, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
@peaBerberian peaBerberian modified the milestones: 4.0.0, 4.0.0-beta.2 Jun 15, 2023
peaBerberian added a commit that referenced this pull request Jun 27, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jul 4, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
@peaBerberian peaBerberian deleted the fix/v4-no-playable-representations branch July 6, 2023 12:02
peaBerberian added a commit that referenced this pull request Jul 21, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jul 21, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Jul 24, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 7, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 22, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 23, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 31, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 31, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Aug 31, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 15, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 15, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 22, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 26, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 26, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 27, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 27, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 27, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Sep 29, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Oct 13, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Oct 13, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Oct 13, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Oct 19, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
peaBerberian added a commit that referenced this pull request Oct 26, 2023
…tions

Improve `NO_PLAYABLE_REPRESENTATION` behavior for the v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant