InMemoryMediaKeysStorageBackend Class

A MediaKeysStorageBackend that keeps the sessions in memory.

public sealed class InMemoryMediaKeysStorageBackend : MediaKeysStorageBackend
Inheritance
MediaKeysStorageBackend InMemoryMediaKeysStorageBackend

Constructors

NameDescription
InMemoryMediaKeysStorageBackend()

InMemoryMediaKeysStorageBackend()

MediaKeysStorageBackend.cs
public InMemoryMediaKeysStorageBackend()

No documentation is available.

Methods

NameDescription
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)

MediaKeysStorageBackend.cs

Removes the data of a session.

public override bool Delete(string origin, string keySystem, string sessionId)

Parameters

origin string
The serialization of the storage key of the document.
keySystem string
The key system.
sessionId string
The session ID.

Returns

bool True when data was removed.

Exists(string, string, string)

MediaKeysStorageBackend.cs

Returns whether data is stored for a session: the session IDs of the persistent sessions are unique within an origin over time.

public override bool Exists(string origin, string keySystem, string sessionId)

Parameters

origin string
The serialization of the storage key of the document.
keySystem string
The key system.
sessionId string
The session ID.

Returns

bool

Load(string, string, string)

MediaKeysStorageBackend.cs

Returns the data of a session, or null when no data is stored for the session.

public override byte[]? Load(string origin, string keySystem, string sessionId)

Parameters

origin string
The serialization of the storage key of the document.
keySystem string
The key system (e.g. org.w3.clearkey).
sessionId string
The session ID.

Returns

byte[]?

Save(string, string, string, ReadOnlySpan<byte>)

MediaKeysStorageBackend.cs

Stores the data of a session, replacing the previous data.

public override void Save(string origin, string keySystem, string sessionId, ReadOnlySpan<byte> data)

Parameters

origin string
The serialization of the storage key of the document.
keySystem string
The key system.
sessionId string
The session ID.
data ReadOnlySpan<byte>
The data of the session.