Skip to content
pubscout

flutter_hls_parser

2.0.1, released 4 years ago by an unverified publisher

Dart plugin to parse HLS m3u8 master and media playlist files.

WASM-ready
$ flutter pub add flutter_hls_parser
Source repository

What it does

Parses HLS (HTTP Live Streaming) m3u8 playlist files into structured Dart objects. Supports both master playlists and media playlists, handling a wide range of standard HLS tags.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to parse HLS m3u8 playlists manually in Flutter or Dart.
  • You are building a custom video player logic that requires reading master or media stream attributes.

Skip it when

  • You only need a high-level video player widget without inspecting raw playlist structures.
  • Your project relies heavily on unsupported tags such as EXT-X-DATERANGE or EXT-X-SERVER-CONTROL.

Strengths

  • Supports both master and media HLS playlist files.
  • Null-safe implementation with a clean API.

Weaknesses

  • Some HLS tags are not supported.
  • Does not play video on its own, purely a parser.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
Uri playlistUri;
try {
  var playlist = await HlsPlaylistParser.create().parseString(playlistUri, contentString);
  if (playlist is HlsMasterPlaylist) {
    // master m3u8 file
  } else if (playlist is HlsMediaPlaylist) {
    // media m3u8 file
  }
} on ParserException catch (e) {
  print(e);
}

Alternatives

Packages that do the same job and could replace flutter_hls_parser.

Works with

Packages commonly used together with flutter_hls_parser: ones it builds on, ones built on it, and its own family.