Interface ChromecastConnectionCallback

The ChromecastConnectionCallback.

interface ChromecastConnectionCallback {
    onJoin(sourceDescription): undefined | SourceDescription;
    onLeave(sourceDescription): undefined | SourceDescription;
    onStart(sourceDescription): undefined | SourceDescription;
    onStop(sourceDescription): undefined | SourceDescription;
}

Methods

  • Called after the player has joined an already existing connection to the receiver.

    Parameters

    • sourceDescription: undefined | SourceDescription

      The current SourceDescription on the current sender device.

    Returns undefined | SourceDescription

    The SourceDescription to be loaded on the receiver device.

    Remarks


    - At this point it's possible to load a new media from the sender to the receiver.
    - Returning null will not change the source on the receiver.

  • Called after the player has left the connection to the receiver.

    Parameters

    • sourceDescription: undefined | SourceDescription

      The current SourceDescription on the receiver device.

    Returns undefined | SourceDescription

    The SourceDescription to be loaded on the sender device.

    Remarks


    - At this point we are trying to load the media from the receiver to the sender.
    - Returning null will behave same as returning the provided SourceDescription.

  • Called after the player has started the connection to the receiver.

    Parameters

    • sourceDescription: undefined | SourceDescription

      The current SourceDescription on the sender device.

    Returns undefined | SourceDescription

    The SourceDescription to be loaded on the receiver device.

    Remarks


    - At this point we are trying to load the media from the sender to the receiver.
    - Returning null will behave same as returning the provided SourceDescription.

  • Called after the player has stopped the connection to the receiver.

    Parameters

    • sourceDescription: undefined | SourceDescription

      The current SourceDescription on the receiver device.

    Returns undefined | SourceDescription

    The SourceDescription to be loaded on the sender device.

    Remarks


    - At this point we are trying to load the media from the receiver to the sender.
    - Returning null will behave same as returning the provided SourceDescription.

Generated using TypeDoc