MethodChannelChromeCast class

An implementation of ChromeCastPlatform that uses MethodChannel to communicate with the native code.

Inheritance

Constructors

MethodChannelChromeCast()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addSessionListener({int? id}) Future<void>
Add listener for receive callbacks.
override
buildView(Map<String, dynamic> arguments, PlatformViewCreatedCallback onPlatformViewCreated) Widget
Returns a widget displaying the button.
override
channel(int? id) MethodChannel?
Accesses the MethodChannel associated to the passed id.
duration({required int id}) Future<Duration>
override
endSession({required int id}) Future<void>
End current session
override
getMediaInfo({required int id}) Future<Map?>
Get current MediaInfo
override
getVolume({required int id}) Future<double>
Get volume
override
init(int id) Future<void>
Initializes the platform interface with id.
override
isConnected({required int id}) Future<bool?>
Returns true when a cast session is connected, false otherwise.
override
isPlaying({required int id}) Future<bool?>
Returns true when a cast session is playing, false otherwise.
override
loadMedia(String url, String title, String subtitle, String image, {bool? live, required int id}) Future<void>
Load a new media by providing an url.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPlayerStatusUpdated({int? id}) Stream<PlayerStatusDidUpdatedEvent>
Player status updated.
override
onRequestCompleted({int? id}) Stream<RequestDidCompleteEvent>
A request has completed.
override
onRequestFailed({int? id}) Stream<RequestDidFailEvent>
A request has failed.
override
onSessionEnded({int? id}) Stream<SessionEndedEvent>
A session is ended.
override
onSessionStarted({int? id}) Stream<SessionStartedEvent>
A session is started.
override
pause({required int id}) Future<void>
Pauses the video playback.
override
play({required int id}) Future<void>
Plays the video playback.
override
position({required int id}) Future<Duration>
override
removeSessionListener({int? id}) Future<void>
Remove listener for receive callbacks.
override
seek(bool relative, double interval, {required int id}) Future<void>
If relative is set to false sets the video position to an interval from the start.
override
setVolume(double volume, {required int id}) Future<void>
Set volume
override
stop({int? id}) Future<void>
Stop the current video.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited