A MediaKeySessionClosedReason is proposed to indicate the reason for EME MediaKeySession closure, and the `closed` attribute would return a Promise<MediaKeySessionClosedReason> instead of the current Promise<void>. See https://github.com/w3c/encrypted-media/issues/473.
The current EME spec says "the CDM may close a session at any point, such as when the session is no longer needed or when system resources are lost". However, there's not way to specify the exact reason for session closure. In some cases, this is part of normal user flow, e.g. user close laptop lid to put the device into sleep mode, where the player should resume playback. In some other cases, this is due to some unrecoverable fatal error.
This proposal updates the `closed` attribute on MediaKeySession to provide a MediaKeySessionClosedReason so that the JavaScript player can handle session closure differently based on the reasons.
This is backward compatible with existing API such that existing players will continue to work without issues.
This is a rather simple change and is backward compatible. Do we still need to go through the TAG review?On Monday, June 7, 2021 at 3:47:37 PM UTC-7 Xiaohan Wang wrote:Contact emails
xhw...@chromium.orgExplainer
https://github.com/w3c/encrypted-media/issues/473Specification
https://github.com/w3c/encrypted-media/pull/487
Summary
A MediaKeySessionClosedReason is proposed to indicate the reason for EME MediaKeySession closure, and the `closed` attribute would return a Promise<MediaKeySessionClosedReason> instead of the current Promise<void>. See https://github.com/w3c/encrypted-media/issues/473.
Blink component
Internals>Media>EncryptedMotivation
The current EME spec says "the CDM may close a session at any point, such as when the session is no longer needed or when system resources are lost". However, there's not way to specify the exact reason for session closure. In some cases, this is part of normal user flow, e.g. user close laptop lid to put the device into sleep mode, where the player should resume playback. In some other cases, this is due to some unrecoverable fatal error.
This proposal updates the `closed` attribute on MediaKeySession to provide a MediaKeySessionClosedReason so that the JavaScript player can handle session closure differently based on the reasons.Initial public proposal
https://github.com/w3c/encrypted-media/issues/473TAG review
NoneTAG review status
Not applicableRisks
Interoperability and Compatibility
This is backward compatible with existing API such that existing players will continue to work without issues.
Gecko: No signal
Web developers: Supported and approved by NetflixIs this feature fully tested by web-platform-tests?
NoFlag name
EncryptedMediaSessionClosedReason (see CL)Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/5632124143009792
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/af828347-330e-45bc-8666-3bde184e6ddbn%40chromium.org.