View Source Membrane.RTC.Engine.Endpoint.WebRTC (Membrane RTC Engine v0.9.1)
An Endpoint responsible for communicatiing with WebRTC peer.
It is responsible for sending and receiving media tracks from other WebRTC peer (e.g. web browser).
bin-options
Bin options
Passed via struct Membrane.RTC.Engine.Endpoint.WebRTC.t/0
rtc_engine
pid()
Required
Pid of parent Enginedirection
EndpointBin.direction()
Default value:
:sendrecv
Direction of WebRTC Endpoint. Determines whether EndpointBin can send, receive or both send and receive media. For more information refer to t:EndpointBin.direction/0.ice_name
String.t()
Required
Ice name is used in creating credentials for ice connnectionhandshake_opts
Keyword.t()
Default value:
[]
Keyword list with options for handshake module. For more information please refer toMembrane.ICE.Bin
filter_codecs
({RTPMapping.t(), FMTP.t() | nil} -> boolean())
Default value:
&Membrane.WebRTC.SDP.filter_mappings/1
Defines function which will filter SDP m-line by codecslog_metadata
:list
Default value:
[]
Logger metadata used for endpoint bin and all its descendantswebrtc_extensions
[module()]
Default value:
[]
List of WebRTC extensions to use.Each module has to implement
Membrane.WebRTC.Extension.t()
. Seemembrane_webrtc_plugin
documentation for a list of possible extensions.extensions
%{(encoding_name :: atom() | :any) => [Membrane.RTP.SessionBin.extension_t()]}
Default value:
%{}
A map pointing from encoding names to lists of extensions that should be used for given encodings. Encoding ":any
" indicates that extensions should be applied regardless of encoding.A sample usage would be to add silence discarder to OPUS tracks when VAD extension is enabled. It can greatly reduce CPU usage in rooms when there are a lot of people but only a few of them are actively speaking.
integrated_turn_domain
binary() | nil
Default value:
nil
Domain address of integrated TURN Servers. Required for TLS TURNintegrated_turn_options
Membrane.ICE.Endpoint.integrated_turn_options_t()
Default value:
[]
owner
pid()
Required
Pid of parent all notifications will be send to.To see possible notifications please refer to module docs.
trace_context
:list
Default value:
[]
Trace context for otel propagationparent_span
:opentelemetry.span_ctx() | nil
Default value:
nil
Parent span of webrtc_endpoint.life_spanvideo_tracks_limit
integer() | nil
Default value:
nil
Maximal number of video tracks that will be sent to the the browser at the same time.This variable indicates how many video tracks should be sent to the browser at the same time. If
nil
all video tracks thisMembrane.RTC.Engine.Endpoint.WebRTC
receives will be sent.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 generationsimulcast_config
SimulcastConfig.t()
Default value:
%Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig{enabled: false, initial_target_variant: &Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig.initial_target_variant/1}
Simulcast configurationpeer_metadata
any()
Default value:
nil
Peer metadatatelemetry_label
Membrane.TelemetryMetrics.label()
Default value:
[]
Label passed to Membrane.TelemetryMetrics functions
pads
Pads
input
:input
Availability | :on_request |
Caps | :any |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
output
:output
Availability | :on_request |
Caps | :any |
Demand unit | :buffers |
Direction | :output |
Mode | :pull |
Name | :output |
Link to this section Summary
Functions
Returns pads descriptions for Membrane.RTC.Engine.Endpoint.WebRTC
Returns description of options available for this module
Link to this section Types
@type encoding_t() :: String.t()
@type t() :: %Membrane.RTC.Engine.Endpoint.WebRTC{ direction: Membrane.WebRTC.EndpointBin.direction(), extensions: %{ required(encoding_name :: atom() | :any) => [ Membrane.RTP.SessionBin.extension_t() ] }, filter_codecs: ({ExSDP.Attribute.RTPMapping.t(), ExSDP.Attribute.FMTP.t() | nil} -> boolean()), handshake_opts: Keyword.t(), ice_name: String.t(), integrated_turn_domain: binary() | nil, integrated_turn_options: Membrane.ICE.Endpoint.integrated_turn_options_t(), log_metadata: :list, owner: pid(), parent_span: :opentelemetry.span_ctx() | nil, peer_metadata: any(), rtc_engine: pid(), rtcp_receiver_report_interval: Membrane.Time.t() | nil, rtcp_sender_report_interval: Membrane.Time.t() | nil, simulcast_config: Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig.t(), telemetry_label: Membrane.TelemetryMetrics.label(), trace_context: :list, video_tracks_limit: integer() | nil, webrtc_extensions: [module()] }
Struct containing options for Membrane.RTC.Engine.Endpoint.WebRTC
Link to this section Functions
@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.RTC.Engine.Endpoint.WebRTC
@spec options() :: keyword()
Returns description of options available for this module