Interface AirPlay

The AirPlay API.

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

Hierarchy (view full)

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