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

Make use of new MediaKeySessionClosedReason enum in EME #3446

Open
joeyparrish opened this issue Jun 3, 2021 · 0 comments
Open

Make use of new MediaKeySessionClosedReason enum in EME #3446

joeyparrish opened this issue Jun 3, 2021 · 0 comments
Labels
component: EME The issue involves the Encrypted Media Extensions web API priority: P2 Smaller impact or easy workaround type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

Have you read the FAQ and checked for duplicate open issues?
Yes

Is your feature request related to a problem? Please describe.

The EME editor's draft is adding an enum called MediaKeySessionClosedReason. Values of this type will be used to resolve the closed Promise in MediaKeySession.

Describe the solution you'd like

We should use this information, when available, to react to session closures and handle certain cases specially. For example, the proposed hardware-context-reset value would require us to create new sessions to replace the ones that were closed by the CDM. As spec'd, this could happen when a device goes to sleep and wakes up again.

Describe alternatives you've considered

The first alternative is the status quo. If we ignore this extra info, applications may have to do more work to resume playback after certain adverse events such as hibernation. Also, they have to do this work without useful information to drive their decisions.

A slightly different approach to using an allow-list approach looking for something like hardware-context-reset might be to use a deny-list approach by ignoring closures with reasons resource-evicted or closed-by-application. In all other cases, we might want to recreate sessions automatically.

Additional context

EME spec PR (which has not yet landed): w3c/encrypted-media#487

@joeyparrish joeyparrish added the type: enhancement New feature or request label Jun 3, 2021
@joeyparrish joeyparrish added this to the Backlog milestone Jun 3, 2021
@joeyparrish joeyparrish added the priority: P2 Smaller impact or easy workaround label Sep 29, 2021
@avelad avelad added the component: EME The issue involves the Encrypted Media Extensions web API label May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: EME The issue involves the Encrypted Media Extensions web API priority: P2 Smaller impact or easy workaround type: enhancement New feature or request
2 participants