files/en-us/web/api/mediakeysession/index.md
{{APIRef("Encrypted Media Extensions")}}{{SecureContext_Header}}
The MediaKeySession interface of the Encrypted Media Extensions API represents a context for message exchange with a content decryption module (CDM).
{{InheritanceDiagram}}
MediaKeySession closes. This promise can only be fulfilled and is never rejected. Closing a session means that licenses and keys associated with it are no longer valid for decrypting media data.NaN if no such time exists. This value is determined by the CDM and measured in milliseconds since January 1, 1970, UTC. This value may change during a session lifetime, such as when an action triggers the start of a window.// TBD
{{Specifications}}
{{Compat}}