Interface VendorCast

Common API for all cast integrations.

interface VendorCast {
    casting: boolean;
    state: CastState;
    addEventListener<TType extends "statechange">(
        type: TType | readonly TType[],
        listener: EventListener<VendorCastEventMap[TType]>,
    ): void;
    removeEventListener<TType extends "statechange">(
        type: TType | readonly TType[],
        listener: EventListener<VendorCastEventMap[TType]>,
    ): void;
    start(): void;
    stop(): void;
}

Hierarchy (View Summary)

Properties

casting: boolean

Whether the player is casting.

state: CastState

The state of the casting process.

Methods

  • Start a casting session with the player's source.

    Returns void


    - A native browser pop-up will prompt to choose a casting target device.

  • Stop the active casting session.

    Returns void