LinuxCastClient class

Cast V2 sender without a native plugin or Google Play Services dependency.

Cast devices use self-signed TLS certificates. This client encrypts traffic, but does not implement Google's device-auth certificate verification. Use only on a trusted LAN; do not send credentials or protected media secrets.

Constructors

LinuxCastClient()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
Whether the receiver application is connected.
no setter
mediaStatus → Map<String, dynamic>?
Latest Cast MEDIA_STATUS entry, or null before loading media.
no setter
mediaStatusStream → Stream<Map<String, dynamic>>
Media status updates and a DISCONNECTED state on connection loss.
no setter
messageStream → Stream<Map<String, dynamic>>
All JSON messages, including custom receiver namespace responses.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(LinuxCastDevice device, {String receiverApplicationId = 'CC1AD845'}) → Future<void>
Opens TLS and launches the selected receiver, waiting for its response.
disconnect({bool stopReceiver = false}) → Future<void>
Closes the sender connection, optionally stopping the receiver app.
dispose() → Future<void>
Disconnects and closes streams. A disposed client cannot reconnect.
load(Map<String, dynamic> media, {bool autoplay = true, List<int>? activeTrackIds}) → Future<void>
Loads a Cast MediaInformation JSON object; URLs must reach the receiver.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → Future<void>
Pauses the active media session.
play() → Future<void>
Resumes the active media session.
seek(Duration position) → Future<void>
Seeks to an absolute media position.
sendMessage(String namespace, Map<String, dynamic> message) → Future<void>
Sends JSON to a custom receiver namespace without awaiting an ACK.
setActiveTrackIds(List<int> ids) → Future<void>
Selects tracks supported by the receiver (default receiver: one text).
setTextTrackStyle(Map<String, dynamic> style) → Future<void>
Applies a Cast TextTrackStyle JSON object to receiver-rendered captions.
stop() → Future<void>
Stops the active media session.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

discover({Duration timeout = const Duration(seconds: 5)}) → Future<List<LinuxCastDevice>>
Discovers IPv4 Cast endpoints through mDNS. Timeout applies per query.