flutter_hls_parser 1.0.0 copy "flutter_hls_parser: ^1.0.0" to clipboard
flutter_hls_parser: ^1.0.0 copied to clipboard

outdated

dart plugin for parse m3u8 file for HLS. both of master and media file is supported.

flutter_hls_parser #

Pub Version

dart plugin for parse m3u8 file for HLS.
both of master and media file is supported.

Getting Started #


Uri playlistUri;
List<String> lines;
try {
  playList = await HlsPlaylistParser.create().parseString(playlistUri, contentString);
} on ParserException catch (e) {
  print(e);
}

if (playlist is HlsMasterPlaylist) {
  // master m3u8 file
} else if (playlist is HlsMediaPlaylist) {
  // media m3u8 file
}

MasterPlaylist example #

HlsMasterPlaylist playlist;

playlist.variants[0].format.bitrate;// => 1280000
Util.splitCodec(playlist.variants[0].format.codecs);// => ['mp4a.40.2']['avc1.66.30']
playlist.variants[0].format.width;// => 304(px)
playlist.subtitles[0].format.id;// => sub1:Eng
playlist.audios[0].format.sampleMimeType// => MimeTypes.AUDIO_AC3

MediaPlaylist example #

HlsMediaPlaylist playlist;

playlist.version;// => 3
playlist.hasEndTag;// => true
playlist.segments[0].durationUs;// => 7975000(microsec)
playlist.segments[0].encryptionIV;// => '0x1566B'
playlist.segments[0].drmInitData.schemeData[0].uuid;// => uuid string

Note #

all bool param is nonnull, and others are often nullable if unknown.

34
likes
40
points
3.48k
downloads

Publisher

unverified uploader

Weekly Downloads

dart plugin for parse m3u8 file for HLS. both of master and media file is supported.

Homepage

License

Apache-2.0 (license)

Dependencies

collection, flutter, meta, quiver

More

Packages that depend on flutter_hls_parser