cast library

Chromecast support: device discovery (system Bonjour on iOS, pure-Dart mDNS elsewhere) and a full CASTV2 session (load with metadata + caption tracks, play/pause/seek/stop, volume/mute, caption switching, loop, live status stream).

Deliberately a SEPARATE entrypoint from the main library: CastDevice/CastSession are common names (the cast package uses them too), so apps that mix libraries can import this one with a prefix:

import 'package:better_native_video_player/cast.dart' as nvp_cast;

Classes

CastDevice
A Google Cast (Chromecast) receiver found on the local network.
CastDeviceDiscovery
Web/WASM stub: mDNS discovery needs dart:io sockets.
CastSession
CastSessionStatus
Web/WASM stubs: CASTV2 needs dart:io sockets. The API mirrors the io implementation so shared code compiles; everything network-touching throws UnsupportedError.
CastTextTrack

Exceptions / Errors

CastDiscoveryException
Thrown when the mDNS scan cannot reach the local network — on real iOS devices this almost always means cellular-only connectivity or a denied Local Network permission rather than "no Cast devices nearby".