UrlParserM3U8 class

M3U8 URL parser implementation. Handles caching, downloading, and parsing of HLS (M3U8) video streams. Implements the UrlParser interface for HLS video files.

Implemented types

Constructors

UrlParserM3U8()

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

cache(DownloadTask task) → Future<Uint8List?>
Retrieves cached data for the given task from memory or file.
override
concurrentAdd(HlsSegment hlsSegment) → void
Adds a new HlsSegment to the segment list if not already present.
concurrentComplete(HlsSegment hlsSegment, Map<String, String> headers, {DownloadStatus? status}) → void
Marks a segment as completed and triggers the next download if available.
concurrentLoop(HlsSegment? hlsSegment, Map<String, String> headers) → Future<void>
Asynchronously downloads TS files for HLS segments.
download(DownloadTask task) → Future<Uint8List?>
Downloads data from the network for the given task.
override
findSegmentByUri(Uri uri) → HlsSegment?
Finds a segment in the segment list by its uri.
isCached(String url, Map<String, Object>? headers, int cacheSegments) → Future<bool>
Whether the video is cached.
override
modifyM3u8File(Uri uri, Uint8List data, String hlsKey) → StringBuffer
Parse and rewrite M3U8 playlist lines for local proxying
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Socket socket, Uri uri, Map<String, String> headers) → Future<bool>
Parses the request and returns the data to the socket.
override
parseLines(List<String> lines, Uri uri) → Future<HlsPlaylist?>
Parses HLS playlist lines into an HlsPlaylist object.
parseMediaPlaylist(Uri uri, {Map<String, Object>? headers, String? hlsKey}) → Future<HlsMediaPlaylist?>
Parses the HLS media playlist from the given uri.
parsePlaylist(Uri uri, {Map<String, Object>? headers, String? hlsKey}) → Future<HlsPlaylist?>
Parses the HLS playlist (master or media) from the given uri.
parseSegment(Uri uri, Map<String, Object>? headers) → Future<List<HlsSegment>>
Parses M3U8 TS file segment URLs from the playlist at uri.
precache(String url, Map<String, Object>? headers, int cacheSegments, bool downloadNow, bool progressListen, [int priority = 1]) → Future<StreamController<Map>?>
Pre-caches HLS video segments from the network.
override
push(DownloadTask task) → Future<void>
Pushes the task to the download manager for processing. If the task is already in the download manager or cache, does nothing.
override
readLineFromUint8List(Uint8List uint8List, {Encoding encoding = utf8}) → List<String>
Reads lines from a Uint8List and decodes them to a list of String.
toString() → String
A string representation of this object.
inherited

Operators

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