View Source Membrane.RTC.Engine.Endpoint.WebRTC (Membrane RTC Engine v0.3.2)

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 Engine

  • ice_name

    String.t()

    Required
    Ice name is used in creating credentials for ice connnection

  • handshake_opts

    Keyword.t()

    Default value: []
    Keyword list with options for handshake module. For more information please refer to Membrane.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 codecs

  • log_metadata

    :list

    Default value: []
    Logger metadata used for endpoint bin and all its descendants

  • webrtc_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_domain

    binary() | nil

    Default value: nil
    Domain address of integrated TURN Servers. Required for TLS TURN

  • integrated_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 propagation

  • video_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 this Membrane.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 generation

  • rtcp_sender_report_interval

    Membrane.Time.t() | nil

    Default value: nil
    Sender reports's generation interval, set to nil to avoid reports generation

  • rtcp_fir_interval

    Membrane.Time.t() | nil

    Default value: 1000000000
    Defines how often FIR should be sent.

    For more information refer to RFC 5104 section 4.3.1.

  • simulcast_config

    SimulcastConfig.t()

    Default value: %Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig{default_encoding: &Membrane.RTC.Engine.Endpoint.WebRTC.SimulcastConfig.default_encoding/1, enabled: false}
    Simulcast configuration

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 description of options available for this module

Link to this section Types

@type encoding_t() :: String.t()
@type t() :: %Membrane.RTC.Engine.Endpoint.WebRTC{
  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(),
  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