View Source Membrane.RTC.Engine.Endpoint.WebRTC (Membrane RTC Engine v0.4.0)
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_enginepid()Required
Pid of parent EnginedirectionEndpointBin.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_nameString.t()Required
Ice name is used in creating credentials for ice connnectionhandshake_optsKeyword.t()Default value:
[]
Keyword list with options for handshake module. For more information please refer toMembrane.ICE.Binfilter_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:listDefault value:
[]
Logger metadata used for endpoint bin and all its descendantswebrtc_extensions[Membrane.WebRTC.Extension.t()]Default value:
[]
List of WebRTC extensions to use.At this moment only VAD (RFC 6464) is supported. Enabling it will cause RTC Engine sending
{:vad_notification, val, endpoint_id}messages.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_domainbinary() | nilDefault value:
nil
Domain address of integrated TURN Servers. Required for TLS TURNintegrated_turn_optionsMembrane.ICE.Endpoint.integrated_turn_options_t()Default value:
[]ownerpid()Required
Pid of parent all notifications will be send to.To see possible notifications please refer to module docs.
trace_context:listDefault value:
[]
Trace context for otel propagationvideo_tracks_limitinteger() | nilDefault 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
nilall video tracks thisMembrane.RTC.Engine.Endpoint.WebRTCreceives will be sent.rtcp_receiver_report_intervalMembrane.Time.t() | nilDefault value:
nil
Receiver reports's generation interval, set to nil to avoid reports generationrtcp_sender_report_intervalMembrane.Time.t() | nilDefault value:
nil
Sender reports's generation interval, set to nil to avoid reports generationrtcp_fir_intervalMembrane.Time.t() | nilDefault value:
1000000000
Defines how often FIR should be sent.For more information refer to RFC 5104 section 4.3.1.
simulcast_configSimulcastConfig.t()Default value:
%Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig{default_encoding: &Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig.default_encoding/1, enabled: false}
Simulcast configurationtelemetry_labelMembrane.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(), rtc_engine: pid(), rtcp_fir_interval: Membrane.Time.t() | nil, 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: [Membrane.WebRTC.Extension.t()] }
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