HlsIFrameVariant class

Represents an HLS I-frame-only variant stream declared using #EXT-X-I-FRAME-STREAM-INF in a master playlist.

I-frame variants contain only IDR / keyframes and are primarily used for:

  • Video scrubbing / trick play
  • Thumbnail previews
  • Fast seeking without decoding full segments

These playlists are never used for normal playback.


HLS example (raw)

#EXT-X-I-FRAME-STREAM-INF:
  BANDWIDTH=86000,
  URI="iframes_1080p.m3u8",
  CODECS="avc1.640028",
  RESOLUTION=1920x1080

Parsed result

HlsIFrameVariant(
  uri: Uri.parse('iframes_1080p.m3u8'),
  bandwidth: 86000,
  codecs: 'avc1.640028',
  width: 1920,
  height: 1080,
)

Notes

  • BANDWIDTH is required by the HLS specification.
  • URI points to a media playlist containing only I-frame segments.
  • CODECS is strongly recommended and usually matches the main video codec.
  • RESOLUTION is optional but commonly present.
  • Audio, subtitles, and captions are not allowed for I-frame variants.

Relevant spec

  • RFC 8216 (HLS) – #EXT-X-I-FRAME-STREAM-INF

Common real-world quirks

  • Some packagers omit RESOLUTION entirely.
  • CODECS may include multiple codecs (comma-separated).
  • Players may ignore I-frame variants if they don’t match a video rendition.

  • #EXT-X-STREAM-INF (normal video variants)
  • #EXT-X-MEDIA (audio/subtitles)

Constructors

HlsIFrameVariant({required Uri uri, required int bandwidth, int? averageBandwidth, String? codecs, int? width, int? height, String? videoRange})
const

Properties

averageBandwidth int?
Average segment bandwidth in bits per second.
final
bandwidth int
Peak segment bandwidth in bits per second.
final
codecs String?
Codec string as defined by RFC 6381.
final
hashCode int
The hash code for this object.
no setteroverride
height int?
Video height extracted from the RESOLUTION attribute.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
URI of the I-frame-only media playlist.
final
videoRange String?
Video range (HDR/SDR) from VIDEO-RANGE attribute.
final
width int?
Video width extracted from the RESOLUTION attribute.
final

Methods

copyWith({Uri? uri, int? bandwidth, int? averageBandwidth, String? codecs, int? width, int? height, String? videoRange}) HlsIFrameVariant
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(covariant HlsIFrameVariant other) bool
The equality operator.
override