m3u_parser library

Classes

M3uChannel
M3uChannelParseResult
M3uEntry
M3uParseResult
M3uParseStats
Aggregate-only parser telemetry. Never contains a source URL, channel name, or other playlist content, so it's safe to log or report.
M3uPlaylist
Full parse result: channel entries plus attributes from the #EXTM3U header line (e.g. x-tvg-url / url-tvg EPG source URLs).

Functions

initializeM3uParserBridge() → Future<bool>
Initializes the Rust bridge. Returns false on web (no native bridge exists there) or when the native library fails to load, so callers can fall back to the pure-Dart parser deterministically.
parseM3u(String content) → M3uPlaylist
Parse M3U content (entries + #EXTM3U header attributes) with the synchronous, pure-Dart parser. This is the deterministic/test/web path and never touches the native bridge — prefer parseM3uAsync when you want Rust acceleration with automatic fallback.
parseM3uAsync(String content) → Future<M3uPlaylist>
Parse M3U content through the Rust core parser, falling back to the identical Dart implementation on web or when the native bridge is unavailable.
parseM3uChannelsWithStats(String content) → M3uChannelParseResult
Synchronous, pure-Dart parse into validated, normalized, deduplicated channel records.
parseM3uChannelsWithStatsAsync(String content) → Future<M3uChannelParseResult>
Parse, validate, normalize, and deduplicate M3U channels through Rust, falling back to identical Dart behavior when unavailable.
parseM3uWithStats(String content) → M3uParseResult
Synchronous, pure-Dart parse with aggregate stats.
parseM3uWithStatsAsync(String content) → Future<M3uParseResult>
Parse and retain aggregate stats through Rust, falling back to the identical Dart implementation when unavailable.