MediaKeysStorageBackend Class
The storage of the persistent key sessions of Encrypted Media Extensions (https://w3c.github.io/encrypted-media/#session-storage): the data of the persistent-license sessions (their keys, or their record of license destruction), stored by update() and remove() and read by load() (see BrowsingContextOptions.MediaKeysStorage).
public abstract class MediaKeysStorageBackendRemarks
The data is partitioned by storage key: the origin parameter is the serialization of the storage key of the document (its origin, and the top-level site of a third-party context), so that a session is only visible to the documents of its origin in the same partition. The data contains key material: a persistent backend should protect it as the browsers protect their licenses.
The methods can be called from the threads of several browsing contexts: an implementation must be thread-safe.
Constructors
| Name | Description |
|---|---|
| MediaKeysStorageBackend() |
MediaKeysStorageBackend()
protected MediaKeysStorageBackend()No documentation is available.
Methods
| Name | Description |
|---|---|
| Delete(string, string, string) | Removes the data of a session. |
| Exists(string, string, string) | Returns whether data is stored for a session: the session IDs of the persistent sessions are unique within an origin over time. |
| Load(string, string, string) | Returns the data of a session, or null when no data is stored for the session. |
| Save(string, string, string, ReadOnlySpan<byte>) | Stores the data of a session, replacing the previous data. |
Delete(string, string, string)
Exists(string, string, string)
MediaKeysStorageBackend.csReturns whether data is stored for a session: the session IDs of the persistent sessions are unique within an origin over time.
Load(string, string, string)
Returns the data of a session, or null when no data is stored for the session.
Save(string, string, string, ReadOnlySpan<byte>)
Stores the data of a session, replacing the previous data.
public abstract void Save(string origin, string keySystem, string sessionId, ReadOnlySpan<byte> data)Parameters
originstring- The serialization of the storage key of the document.
keySystemstring- The key system.
sessionIdstring- The session ID.
dataReadOnlySpan<byte>- The data of the session.