Interface ChromecastConnectionCallback

    • Constructor Detail

    • Method Detail

      • onStartAsync

         SourceDescription onStartAsync(SourceDescription sourceDescription)

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

        • 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.

        • This is the asynchronous version of onStart. Only implement one of onStart or onStartAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the sender device.
        Returns:

        The SourceDescription to be loaded on the receiver device. (Nullable)

      • onStart

         SourceDescription onStart(SourceDescription sourceDescription)

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

        • 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.

        • This is the synchronous version of onStartAsync. Only implement one of onStart or onStartAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the sender device.
        Returns:

        The SourceDescription to be loaded on the receiver device. (Nullable)

      • onStopAsync

         SourceDescription onStopAsync(SourceDescription sourceDescription)

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

        • 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.

        • This is the asynchronous version of onStop. Only implement one of onStop or onStopAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the receiver device.
        Returns:

        The SourceDescription to be loaded on the sender device. (Nullable)

      • onStop

         SourceDescription onStop(SourceDescription sourceDescription)

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

        • 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.

        • This is the synchronous version of onStopAsync. Only implement one of onStop or onStopAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the receiver device.
        Returns:

        The SourceDescription to be loaded on the sender device. (Nullable)

      • onJoinAsync

         SourceDescription onJoinAsync(SourceDescription sourceDescription)

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

        • 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.

        • This is the asynchronous version of onJoin. Only implement one of onJoin or onJoinAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the current sender device.
        Returns:

        The SourceDescription to be loaded on the receiver device. (Nullable)

      • onJoin

         SourceDescription onJoin(SourceDescription sourceDescription)

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

        • 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.

        • This is the synchronous version of onJoinAsync. Only implement one of onJoin or onJoinAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the current sender device.
        Returns:

        The SourceDescription to be loaded on the receiver device. (Nullable)

      • onLeaveAsync

         SourceDescription onLeaveAsync(SourceDescription sourceDescription)

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

        • 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.

        • This is the asynchronous version of onLeaveAsync. Only implement one of onLeave or onLeaveAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the receiver device.
        Returns:

        The SourceDescription to be loaded on the sender device. (Nullable)

      • onLeave

         SourceDescription onLeave(SourceDescription sourceDescription)

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

        • 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.

        • This is the synchronous version of onLeaveAsync. Only implement one of onLeave or onLeaveAsync.

        Parameters:
        sourceDescription - The current SourceDescription on the receiver device.
        Returns:

        The SourceDescription to be loaded on the sender device. (Nullable)