Interface AirPlay

The AirPlay API.

interface AirPlay {
    casting: boolean;
    state: CastState;
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
    start(): void;
    stop(): void;

Hierarchy (view full)


casting: boolean

Whether the player is casting.

state: CastState

The state of the casting process.


  • 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