Source element that reads a single media playlist and emits segment payloads.
Operation
- For VOD playlists (
#EXT-X-ENDLISTor:vodtype), segments are served on demand until the playlist is exhausted, then EOS is emitted. - For live/event playlists, the playlist is polled and new segments are enqueued as they appear. Demand still controls when segments are downloaded and sent downstream.
Stream format
This element does not parse media; it forwards raw segment payloads.
Callers must provide stream_format describing the segment container:
%Membrane.HLS.Format.MPEG{}for MPEG-TS%Membrane.HLS.Format.PackedAudio{}for packed AAC%Membrane.HLS.Format.WebVTT{}for WebVTT
Notes
- Segment metadata (
HLS.Segment) is attached to each buffer. poll_interval_msis intended for tests; production should rely on playlist target duration.
Element options
Passed via struct Membrane.HLS.Source.t/0
storageStorage.t()Required
HLS.Storage implementation used to obtain playlist contentsmedia_playlist_uriURI.t()Required
URI of the media playliststream_formatstruct()Required
Stream format describing the media playlist contents (%Membrane.HLS.Format.PackedAudio{},%Membrane.HLS.Format.WebVTT{}, or%Membrane.HLS.Format.MPEG{})poll_interval_msnon_neg_integer() | nilDefault value:
nil
Optional poll interval override (milliseconds) for live playlists. When nil, the target duration derived from the playlist is used.
Pads
:output
Accepted formats:
%Membrane.RemoteStream{content_format: %format{}}
when format in [Format.PackedAudio, Format.WebVTT, Format.MPEG]| Direction: | :output |
| Availability: | :always |
| Flow control: | :manual |
| Demand unit: | nil |
Summary
Types
Struct containing options for Membrane.HLS.Source
Types
@type t() :: %Membrane.HLS.Source{ media_playlist_uri: URI.t(), poll_interval_ms: non_neg_integer() | nil, storage: HLS.Storage.t(), stream_format: struct() }
Struct containing options for Membrane.HLS.Source
Functions
@spec options() :: keyword()
Returns description of options available for this module