public final class SambaCast
extends java.lang.Object
Constructor and Description |
---|
SambaCast(android.content.Context context)
Initializes Chromecast SDK.
|
Modifier and Type | Method and Description |
---|---|
android.app.MediaRouteButton |
getButton()
Returns the cast button to be added on some view.
|
com.google.android.gms.cast.framework.CastSession |
getCastSession()
Returns a cast session.
|
boolean |
isCasting()
Whether remote player is casting content or not.
|
void |
notifyActivityPause()
Called within "Activity.onPause()".
|
void |
notifyActivityResume()
Called within "Activity.onResume()".
|
void |
pauseCast()
Sends a pause message to the remote player.
|
void |
playCast()
Sends a play message to the remote player.
|
void |
registerDeviceForProgress(boolean register)
Enables/Disables listening for remote progress event.
|
void |
seekTo(int posisiton)
Sends a seek message to the remote player.
|
void |
setEventListener(SambaCastListener listener)
Sets the listener to handle cast events.
|
void |
setMute(boolean mute)
Sends a mute setup message to the remote player.
|
void |
setVolume(double volume)
Sends a volume setup message to the remote player.
|
void |
stopCasting()
Sends a stop message to the remote player.
|
public SambaCast(@NonNull android.content.Context context)
public android.app.MediaRouteButton getButton()
public void setEventListener(SambaCastListener listener)
listener
- The instance of the listenerpublic void notifyActivityResume()
public void notifyActivityPause()
public void pauseCast()
public void playCast()
public void seekTo(int posisiton)
public void registerDeviceForProgress(boolean register)
public void stopCasting()
public boolean isCasting()
public void setMute(boolean mute)
public void setVolume(double volume)
public com.google.android.gms.cast.framework.CastSession getCastSession()