Skip to main content

MediaKeyStatusMap

The MediaKeyStatusMap interface of the Encrypted Media Extensions API is a read-only map of media key statuses by key IDs. Available only in secure contexts.

MDN Reference

Methods

[iterator]()

iterator: MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;

Returns

MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>


entries()

entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;

Returns

MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>


forEach()

forEach(callbackfn, thisArg?): void;

Parameters

ParameterType
callbackfn(value, key, parent) => void
thisArg?any

Returns

void


get()

get(keyId): MediaKeyStatus | undefined;

The get() method of the MediaKeyStatusMap interface returns the status value associated with the given key, or undefined if there is none.

MDN Reference

Parameters

ParameterType
keyIdBufferSource

Returns

MediaKeyStatus | undefined


has()

has(keyId): boolean;

The has() method of the MediaKeyStatusMap interface returns a Boolean, asserting whether a value has been associated with the given key.

MDN Reference

Parameters

ParameterType
keyIdBufferSource

Returns

boolean


keys()

keys(): MediaKeyStatusMapIterator<BufferSource>;

Returns

MediaKeyStatusMapIterator<BufferSource>


values()

values(): MediaKeyStatusMapIterator<MediaKeyStatus>;

Returns

MediaKeyStatusMapIterator<MediaKeyStatus>

Properties

size

readonly size: number;

The size read-only property of the MediaKeyStatusMap interface returns the number of key/value paIrs in the status map.

MDN Reference