Interface ChromecastConnectionCallback
-
- All Implemented Interfaces:
public interface ChromecastConnectionCallback
-
-
Method Summary
Modifier and Type Method Description abstract SourceDescription
onStart(@Nullable() SourceDescription sourceDescription)
Called after the player has started the connection to the receiver. abstract SourceDescription
onStop(@Nullable() SourceDescription sourceDescription)
Called after the player has stopped the connection to the receiver. abstract SourceDescription
onJoin(@Nullable() SourceDescription sourceDescription)
Called after the player has joined an already existing connection to the receiver. abstract SourceDescription
onLeave(@Nullable() SourceDescription sourceDescription)
Called after the player has left the connection to the receiver. -
-
Method Detail
-
onStart
@Nullable() abstract SourceDescription onStart(@Nullable() 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.
- Parameters:
sourceDescription
- The current SourceDescription on the sender device.- Returns:
The SourceDescription to be loaded on the receiver device. (Nullable)
-
onStop
@Nullable() abstract SourceDescription onStop(@Nullable() 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.
- Parameters:
sourceDescription
- The current SourceDescription on the receiver device.- Returns:
The SourceDescription to be loaded on the sender device. (Nullable)
-
onJoin
@Nullable() abstract SourceDescription onJoin(@Nullable() 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.
- Parameters:
sourceDescription
- The current SourceDescription on the current sender device.- Returns:
The SourceDescription to be loaded on the receiver device. (Nullable)
-
onLeave
@Nullable() abstract SourceDescription onLeave(@Nullable() 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.
- Parameters:
sourceDescription
- The current SourceDescription on the receiver device.- Returns:
The SourceDescription to be loaded on the sender device. (Nullable)
-
-
-
-