ChromeCastController class
Controller for a single ChromeCastButton instance running on the host platform.
Properties
Methods
-
addSessionListener(
) → Future< void> - Add listener for receive callbacks.
-
duration(
) → Future< Duration> - Returns video duration.
-
endSession(
) → Future< void> - End current session
-
getMediaInfo(
) → Future< Map?> - Get current volume
-
getVolume(
) → Future< double> - Get current volume
-
isConnected(
) → Future< bool?> -
Returns
true
when a cast session is connected,false
otherwise. -
isPlaying(
) → Future< bool?> -
Returns
true
when a cast session is playing,false
otherwise. -
loadMedia(
String url, {String title = '', String subtitle = '', String image = '', bool? live}) → Future< void> -
Load a new media by providing an
url
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> - Pauses the video playback.
-
play(
) → Future< void> - Plays the video playback.
-
position(
) → Future< Duration> - Returns current position.
-
removeSessionListener(
) → Future< void> - Remove listener for receive callbacks.
-
seek(
{bool relative = false, double interval = 10.0}) → Future< void> -
If
relative
is set to false sets the video position to aninterval
from the start. -
setVolume(
{double volume = 0}) → Future< void> - Set volume 0-1
-
stop(
) → Future< void> - Stop the current video.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
init(
int id) → Future< ChromeCastController> -
Initialize control of a ChromeCastButton with
id
.