dart_cast 0.3.0 copy "dart_cast: ^0.3.0" to clipboard
dart_cast: ^0.3.0 copied to clipboard

A pure Dart cross-platform casting package supporting Chromecast (CASTV2), AirPlay, and DLNA with built-in HTTP proxy for header injection.

0.3.0 #

Breaking changes #

  • DefaultMediaTransformer no longer wraps local TS files in HLS — it serves them directly via the proxy. Use TsHlsMediaTransformer or FfmpegMediaTransformer for Chromecast-compatible local TS casting.
  • CastMedia.useChunkedHls is deprecated and will be removed in a future release. TsHlsMediaTransformer always uses chunked HLS.
  • ChromecastSession now defaults to TsHlsMediaTransformer instead of DefaultMediaTransformer.

New #

  • TsHlsMediaTransformer — wraps local TS files in keyframe-aligned HLS playlists for Chromecast compatibility
  • MediaProxy.setPatPmt() / MediaProxy.setFirstPts() — enable correct PAT/PMT prepending and PTS offset for virtual HLS segments
  • FfmpegMediaTransformer reference implementation in example app — remuxes TS→MP4 via ffmpeg with progress callbacks and mobile platform support
  • doc/LOCAL_FILE_CASTING.md — comprehensive guide covering remux, HLS wrapping, and transcode approaches with tradeoffs

Migration guide #

Replace direct DefaultMediaTransformer usage for local TS files:

// Before (0.2.x) — DefaultMediaTransformer handled local TS→HLS internally
final session = await device.connect();

// After (0.3.0) — choose your transformer explicitly
// Option A: FFmpeg remux (recommended)
final session = await device.connect(
  mediaTransformer: FfmpegMediaTransformer(),
);

// Option B: Built-in HLS wrapping (no external tools)
final session = await device.connect(
  mediaTransformer: TsHlsMediaTransformer(),
);

0.2.1 #

Local file casting #

  • Local file support with CastMedia.file() constructor
  • MediaTransformer interface for extensible media format preparation
  • TsKeyframeScanner for keyframe-aligned HLS segment boundaries
  • Virtual segment URLs for Chromecast compatibility (replaces EXT-X-BYTERANGE)
  • useChunkedHls flag for chunked vs single-segment HLS
  • Local subtitle support with automatic SRT-to-VTT conversion

Chromecast fixes #

  • Fixed local file casting — HLS playlists and file routes were destroyed by cleanup before the device could fetch them
  • CORS preflight (OPTIONS) handler for HLS segment requests
  • RFC 8216-compliant TARGETDURATION calculation
  • Consistent application/x-mpegURL content type across all HLS responses
  • File extension on proxy URLs for HLS player format detection
  • Volume updates via RECEIVER_STATUS instead of optimistic update

DLNA improvements #

  • Duration metadata via DIDL-Lite <res duration="HH:MM:SS"> attribute
  • DLNA-specific HTTP headers (transferMode.dlna.org, DLNA.ORG_OP=01 flags)
  • Serve local TS files directly (not piped through HLS)

Other #

  • Retry mDNS queries 3 times for slow-responding devices
  • Comprehensive logging for all discovery providers and sessions
  • Subtitle proxy for Chromecast (CORS + SRT conversion)
  • Log viewer and custom media input in example app

0.2.0 #

  • AirPlay feature flag detection via mDNS TXT records (AirPlayFeatures class parses features/ft bitmask)
  • AirPlayMediaController with V1/V2 /play format auto-negotiation (V1 binary plist → V1 text/parameters → V2 with RTSP SETUP)
  • UnsupportedFeatureException thrown immediately when a device lacks video support bits (0 and 49)
  • PlaybackException thrown when all /play format attempts are rejected by the device
  • Breaking: HapSession no longer has play, stop, scrub, or rate methods — use AirPlayMediaController instead
  • Added docs/PROTOCOL_REFERENCES.md with links to AirPlay, Chromecast, and DLNA specs
  • Added docs/FUTURE_WORK.md documenting AirPlay screen mirroring and RAOP audio streaming roadmap

0.1.0 #

  • Initial release
  • Chromecast (CASTV2) protocol support with default media receiver
  • AirPlay 1 video casting support
  • DLNA/UPnP protocol support with AVTransport and RenderingControl
  • Built-in HTTP proxy server for custom header injection
  • HLS m3u8 playlist URL rewriting through proxy
  • Local file serving for downloaded content
  • Subtitle support across all protocols (WebVTT, SRT)
  • Cross-platform: Android, iOS, macOS, Windows, Linux
  • Pluggable device discovery (default: multicast_dns, injectable: bonsoir)
  • 366+ tests with mock servers for each protocol
  • Flutter example app with device picker and remote control
0
likes
0
points
658
downloads

Publisher

verified publisherzcreations.info

Weekly Downloads

A pure Dart cross-platform casting package supporting Chromecast (CASTV2), AirPlay, and DLNA with built-in HTTP proxy for header injection.

Repository (GitHub)
View/report issues

Topics

#cast #chromecast #airplay #dlna #streaming

License

unknown (license)

Dependencies

cryptography, http, multicast_dns, protobuf

More

Packages that depend on dart_cast