View Source Membrane.RTC.Engine.Endpoint.HLS (Membrane RTC Engine HLS Endpoint v0.8.0)
An Endpoint responsible for converting incoming tracks to HLS playlist.
It can perform mixing audio and composing video (see Membrane.RTC.Engine.Endpoint.HLS.MixerConfig),
in such case these plugins need to be present in your mix.exs:
[
:membrane_video_compositor_plugin,
:membrane_audio_mix_plugin
]Bin options
Passed via struct Membrane.RTC.Engine.Endpoint.HLS.t/0
rtc_enginepid()Required
Pid of parent Engineownerpid()Required
Pid of parent all notifications will be send to. These notifications are:{:playlist_playable, content_type}{:cleanup, clean_function}
output_directoryPath.t()Default value:
"hls_output"
Path to directory under which HLS output will be savedsynchronize_tracks?boolean()Default value:
true
Set to false if source is different than webrtc. If set to true HLS Endpoint will calculate track offset based onhandle_pad_addedcall.mixer_configMixerConfig.t() | nilDefault value:
nil
Audio and video mixer configuration. If you don't want to use compositor pass nil.hls_configHLSConfig.t()Default value:
%Membrane.RTC.Engine.Endpoint.HLS.HLSConfig{manifest_name: "index", manifest_module: Membrane.HTTPAdaptiveStream.HLS, storage: &Membrane.RTC.Engine.Endpoint.HLS.HLSConfig.default_storage/1, target_window_duration: 40000000000, persist?: false, mode: :live, hls_mode: :separate_av, header_naming_fun: &Membrane.HTTPAdaptiveStream.Manifest.Track.default_header_naming_fun/2, segment_naming_fun: &Membrane.HTTPAdaptiveStream.Manifest.Track.default_segment_naming_fun/1, segment_duration: 5000000000, partial_segment_duration: nil, cleanup_after: nil}
HLS stream and playlist configuration.subscribe_mode:auto | :manualDefault value:
:auto
Whether tracks should be subscribed automatically when they're ready. If set to:manualhls endpoint will subscribe only to tracks from endpoints send using message:{:subscribe, endpoints}
Pads
:input
Accepted formats:
Membrane.RTP| Direction: | :input |
| Availability: | :on_request |
Summary
Types
Struct containing options for Membrane.RTC.Engine.Endpoint.HLS
Functions
Returns description of options available for this module
Subscribe hls endpoint to tracks from endpoints.
Types
@type t() :: %Membrane.RTC.Engine.Endpoint.HLS{ hls_config: Membrane.RTC.Engine.Endpoint.HLS.HLSConfig.t(), mixer_config: Membrane.RTC.Engine.Endpoint.HLS.MixerConfig.t() | nil, output_directory: Path.t(), owner: pid(), rtc_engine: pid(), subscribe_mode: :auto | :manual, synchronize_tracks?: boolean() }
Struct containing options for Membrane.RTC.Engine.Endpoint.HLS
Functions
@spec options() :: keyword()
Returns description of options available for this module
Subscribe hls endpoint to tracks from endpoints.
It is only valid to use when hls has subscribe_mode set to :manual.