For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages
are available by appending .md to any URL.
Interface MediaKeyStatusMap
interface MediaKeyStatusMap {
size: number;
"[iterator]"(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
forEach(
callbackfn: (
value: MediaKeyStatus,
key: BufferSource,
parent: MediaKeyStatusMap,
) => void,
thisArg?: any,
): void;
get(keyId: BufferSource): MediaKeyStatus | undefined;
has(keyId: BufferSource): boolean;
keys(): MediaKeyStatusMapIterator<BufferSource>;
values(): MediaKeyStatusMapIterator<MediaKeyStatus>;
}
size: number;
"[iterator]"(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
forEach(
callbackfn: (
value: MediaKeyStatus,
key: BufferSource,
parent: MediaKeyStatusMap,
) => void,
thisArg?: any,
): void;
get(keyId: BufferSource): MediaKeyStatus | undefined;
has(keyId: BufferSource): boolean;
keys(): MediaKeyStatusMapIterator<BufferSource>;
values(): MediaKeyStatusMapIterator<MediaKeyStatus>;
}
Properties
Readonlysize
size: number
The size read-only property of the MediaKeyStatusMap interface returns the number of key/value paIrs in the status map.
Methods
[iterator]
-
Returns MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>
entries
-
Returns MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>
forEach
-
forEach(
callbackfn: (
value: MediaKeyStatus,
key: BufferSource,
parent: MediaKeyStatusMap,
) => void,
thisArg?: any,
): voidParameters
- callbackfn: (value: MediaKeyStatus, key: BufferSource, parent: MediaKeyStatusMap) => void
OptionalthisArg: any
Returns void
get
-
The
get()method of the MediaKeyStatusMap interface returns the status value associated with the given key, or undefined if there is none.Parameters
- keyId: BufferSource
Returns MediaKeyStatus | undefined
has
-
The
has()method of the MediaKeyStatusMap interface returns a Boolean, asserting whether a value has been associated with the given key.Parameters
- keyId: BufferSource
Returns boolean
keys
-
Returns MediaKeyStatusMapIterator<BufferSource>
values
-
Returns MediaKeyStatusMapIterator<MediaKeyStatus>
The
MediaKeyStatusMapinterface 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