Vinyl
    Preparing search index...

    Interface CommonMediaKeySession

    This provides a common interface for MediaKeySession EME implementations.

    interface CommonMediaKeySession {
        initData: EncryptedInitData;
        initDataType: string;
        mimeType: string;
        get disposed(): boolean;
        dispose(): void;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof CommonMediaKeySessionEventMap): boolean;
        on<K extends keyof CommonMediaKeySessionEventMap>(
            type: K,
            handler: EventHandler<CommonMediaKeySessionEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
        update(key: ArrayBufferLike): Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    initDataType: string
    mimeType: string

    Accessors

    • get disposed(): boolean

      Returns true if the session has been disposed.

      Returns boolean

    Methods

    • Closes the session, and removes session handling and event listeners, freeing this session handler for GC.

      Note: The audio source should be cleared first.

      Returns void

    • Returns true if the event host has any listeners.

      Returns boolean

    • Updates the session with the license data.

      Parameters

      • key: ArrayBufferLike

      Returns Promise<void>