Interface GoogleCast.Provider
- Enclosing class:
GoogleCast
public static interface GoogleCast.Provider
A platform Google Cast implementation. The Android build registers
one; applications do not normally implement this.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns
booleanload(String url, String contentType, String title, String subtitle, String imageUrl, long startMillis) Loads media on the receiver.booleanpause()Returns
booleanplay()Returns
booleanseek(long millis) Seeks the receiver.voidsetStateListener(SuccessCallback<Integer> listener) Installs the listener the provider reports session states to, from any thread, asCast.STATE_*values.booleanShows a device chooser and connects to the chosen device.booleanstop()Stops playback and ends the session.
-
Method Details
-
setStateListener
Installs the listener the provider reports session states to, from any thread, as
Cast.STATE_*values.Parameters
listener: receives state changes
-
showRoutePicker
boolean showRoutePicker()Shows a device chooser and connects to the chosen device.
Returns
true when the chooser was shown
-
isSessionActive
boolean isSessionActive()Returns
true while connected to a receiver
-
load
boolean load(String url, String contentType, String title, String subtitle, String imageUrl, long startMillis) Loads media on the receiver.
Parameters
url: the media URLcontentType: the MIME type, or nulltitle: the title, or nullsubtitle: the subtitle, or nullimageUrl: an artwork URL, or nullstartMillis: the start position
Returns
true when the request was sent
-
play
boolean play()Returns
true when the request was sent
-
pause
boolean pause()Returns
true when the request was sent
-
seek
boolean seek(long millis) Seeks the receiver.
Parameters
millis: the position
Returns
true when the request was sent
-
stop
boolean stop()Stops playback and ends the session.
Returns
true when the request was sent
-