Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MediaKeySession

This EncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM). Available only in secure contexts.

interface MediaKeySession extends EventTarget {
readonly closed: Promise<MediaKeySessionClosedReason>;
readonly expiration: number;
readonly keyStatuses: MediaKeyStatusMap;
onkeystatuseschange: ((this: MediaKeySession, ev: Event) => any) | null;
onmessage: ((this: MediaKeySession, ev: MediaKeyMessageEvent) => any) | null;
readonly sessionId: string;
addEventListener<K extends keyof MediaKeySessionEventMap>(
type: K,
listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
close(): Promise<void>;
generateRequest(initDataType: string, initData: BufferSource): Promise<void>;
load(sessionId: string): Promise<boolean>;
remove(): Promise<void>;
removeEventListener<K extends keyof MediaKeySessionEventMap>(
type: K,
listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
update(response: BufferSource): Promise<void>;
}
var MediaKeySession: {
prototype: MediaKeySession;
new (): MediaKeySession;
}
;

§Extends

§Properties

§
readonly closed: Promise<MediaKeySessionClosedReason>
[src]
§
readonly expiration: number
[src]
§
readonly keyStatuses: MediaKeyStatusMap
[src]
§
onkeystatuseschange: ((this: MediaKeySession, ev: Event) => any) | null
[src]
§
onmessage: ((this: MediaKeySession, ev: MediaKeyMessageEvent) => any) | null
[src]
§
readonly sessionId: string
[src]

§Methods

§
addEventListener<K extends keyof MediaKeySessionEventMap>(
type: K,
listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
close(): Promise<void>
[src]
§
generateRequest(initDataType: string, initData: BufferSource): Promise<void>
[src]
§
load(sessionId: string): Promise<boolean>
[src]
§
remove(): Promise<void>
[src]
§
removeEventListener<K extends keyof MediaKeySessionEventMap>(
type: K,
listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
update(response: BufferSource): Promise<void>
[src]