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.



Specification link

Unknown standards status - check spec link for status

Status in Chromium


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signals


Intent to Prototype url

Intent to Prototype thread

Last updated on 2022-01-04