THEOplayer Web SDK
    Preparing search index...

    Interface AirPlay

    The AirPlay API.

    interface AirPlay {
        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)

    Index

    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