View Source Membrane.WebRTC.EndpointBin (Membrane WebRTC plugin v0.15.0)
Module responsible for interacting with a WebRTC peer.
New tracks are specified by SDP negotiation conducted by messages
signal_message/0
, and then linking corresponding
:input
and :output
pads with ids reported via new_track_notification/0
The tracks can be manipulated by sending track_message/0
.
To initiate or modify the connection, the bin sends and expects to receive
signal_message/0
.
bin-options
Bin options
Passed via struct Membrane.WebRTC.EndpointBin.t/0
direction
direction()
Default value:
:sendrecv
Direction of EndpointBin. Determines whether EndpointBin can send, receive or both send and receive media. For more information refer to t:direction/0.handshake_opts
Keyword.t()
Default value:
[]
Keyword list with options for handshake module. For more information please refer toExDTLS.opts_t/0
rtcp_receiver_report_interval
Membrane.Time.t() | nil
Default value:
nil
Receiver reports's generation interval, set to nil to avoid reports generationrtcp_sender_report_interval
Membrane.Time.t() | nil
Default value:
nil
Sender reports's generation interval, set to nil to avoid reports generationfilter_codecs
(Membrane.WebRTC.Track.Encoding.t() -> boolean())
Default value:
&Membrane.WebRTC.SDP.filter_encodings/1
Defines function which will filter SDP m-line by codecsextensions
[Extension.t()]
Default value:
[]
List of WebRTC extensions that should be enabledlog_metadata
:list
Default value:
[]
Logger metadata used for endpoint bin and all its descendantsintegrated_turn_options
[ICE.Endpoint.integrated_turn_options_t()]
Default value:
[]
Integrated TURN Optionssimulcast?
boolean()
Default value:
true
Whether to accept simulcast tracks or not. If set tofalse
, simulcast tracks will be disabled i.e. sender will not send them.trace_metadata
:list
Default value:
[]
A list of tuples to merge into Otel spanstrace_context
:list | any()
Default value:
[]
Trace context for otel propagationparent_span
:opentelemetry.span_ctx() | nil
Default value:
nil
Parent span of endpoint_bin.life_spantelemetry_label
Membrane.TelemetryMetrics.label()
Default value:
[]
Label passed to Membrane.TelemetryMetrics functions
pads
Pads
input
:input
Accepted formats:
_any
Direction: | :input |
Availability: | :on_request |
Pad options:
use_payloader?
boolean()
Default value:
true
Defines if incoming stream should be payloaded based on given encoding. Otherwise the stream is assumed be in RTP format.
output
:output
Accepted formats:
_any
Direction: | :output |
Availability: | :on_request |
Pad options:
extensions
[Membrane.RTP.SessionBin.extension_t()]
Default value:
[]
List of general extensions that will be applied to the SessionBin's output paduse_depayloader?
boolean()
Default value:
true
Defines if the outgoing stream should get depayloaded.This option should be used as a convenience, it is not necessary as the new track notification returns a depayloading filter's definition that can be attached to the output pad to work the same way as with the option set to true.
Link to this section Summary
Types
Message that adds or removes tracks.
Type describing possible media flow directions.
Options for pad :input
Options for pad :output
Struct containing options for Membrane.WebRTC.EndpointBin
Link to this section Types
@type alter_tracks_message() :: {:add_tracks, [Membrane.WebRTC.Track.t()]} | {:remove_tracks, [Membrane.WebRTC.Track.t()]}
Message that adds or removes tracks.
@type direction() :: :recvonly | :sendonly | :sendrecv
Type describing possible media flow directions.
:recvonly
- only receive media from the peer:sendonly
- only send media to the peer:sendrecv
- both send and receive media from the peer
@type input_pad_opts() :: [{:use_payloader?, boolean()}]
Options for pad :input
@type new_track_notification() :: {:new_track, Membrane.WebRTC.Track.id(), nil | Membrane.WebRTC.Track.rid(), Membrane.RTP.ssrc_t(), Membrane.WebRTC.Track.encoding_key(), depayloading_filter :: module()}
@type output_pad_opts() :: [ extensions: [Membrane.RTP.SessionBin.extension_t()], use_depayloader?: boolean() ]
Options for pad :output
@type t() :: %Membrane.WebRTC.EndpointBin{ direction: direction(), extensions: [Membrane.WebRTC.Extension.t()], filter_codecs: (Membrane.WebRTC.Track.Encoding.t() -> boolean()), handshake_opts: Keyword.t(), integrated_turn_options: [Membrane.ICE.Endpoint.integrated_turn_options_t()], log_metadata: :list, parent_span: :opentelemetry.span_ctx() | nil, rtcp_receiver_report_interval: Membrane.Time.t() | nil, rtcp_sender_report_interval: Membrane.Time.t() | nil, simulcast?: boolean(), telemetry_label: Membrane.TelemetryMetrics.label(), trace_context: :list | any(), trace_metadata: :list }
Struct containing options for Membrane.WebRTC.EndpointBin
@type track_message() :: alter_tracks_message()
Link to this section Functions
@spec options() :: keyword()
Returns description of options available for this module