Membrane.WebRTC.EndpointBin (Membrane WebRTC plugin v0.1.0-alpha.1) View Source
Module responsible for interacting with a WebRTC peer.
To send or receive tracks from a WebRTC peer, specify them with
:inbound_tracks
and :outbound_tracks
options, and link corresponding
:input
and :output
pads with ids matching the declared tracks' ids.
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
Passed via struct Membrane.WebRTC.EndpointBin.t/0
inbound_tracks
[Membrane.WebRTC.Track.t()]
Default value:
[]
List of initial inbound tracksoutbound_tracks
[Membrane.WebRTC.Track.t()]
Default value:
[]
List of initial outbound tracksstun_servers
[ExLibnice.stun_server()]
Default value:
[]
List of stun serversturn_servers
[ExLibnice.relay_info()]
Default value:
[]
List of turn serversport_range
Range.t()
Default value:
0..0
Port range to be used byMembrane.ICE.Bin
handshake_opts
Keyword.t()
Default value:
[]
Keyword list with options for handshake module. For more information please refer toMembrane.ICE.Bin
video_codecs
[ExSDP.Attribute.t()]
Default value:
[]
Video codecs that will be passed for SDP offer generationaudio_codecs
[ExSDP.Attribute.t()]
Default value:
[]
Audio codecs that will be passed for SDP offer generationuse_default_codecs
[:audio | :video]
Default value:
[:audio, :video]
Defines whether to use default codecs or not. Default codecs are those required by WebRTC standard - OPUS, VP8 and H264log_metadata
:list
Default value:
[]
Logger metadata used for endpoint bin and all its descendants
Pads
:input
Availability | :on_request |
Caps | :any |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
Options:
encoding
:OPUS | :H264
Required
Track encodingtrack_enabled
boolean()
Default value:
true
Enable or disable track
:output
Availability | :on_request |
Caps | :any |
Demand unit | :buffers |
Direction | :output |
Mode | :pull |
Name | :output |
Options:
track_enabled
boolean()
Default value:
true
Enable or disable trackpacket_filters
[Membrane.RTP.SessionBin.packet_filter_t()]
Default value:
[]
List of packet filters that will be applied to the SessionBin's output padextensions
[Membrane.RTP.SessionBin.extension_t()]
Default value:
[]
List of tuples representing rtp extensions
Link to this section Summary
Types
Message that adds or removes tracks.
Message that disables track.
Message that enables track.
Options for pad :input
Options for pad :output
Struct containing options for Membrane.WebRTC.EndpointBin
Functions
Returns pads descriptions for Membrane.WebRTC.EndpointBin
Returns description of options available for this module
Link to this section Types
Specs
alter_tracks_message() :: {:add_tracks, [Membrane.WebRTC.Track.t()]} | {:remove_tracks, [Membrane.WebRTC.Track.id()]}
Message that adds or removes tracks.
Specs
disable_track_message() :: {:disable_track, Membrane.WebRTC.Track.id()}
Message that disables track.
Specs
enable_track_message() :: {:disable_track, Membrane.WebRTC.Track.id()}
Message that enables track.
Specs
input_pad_opts_t() :: [encoding: :OPUS | :H264, track_enabled: boolean()]
Options for pad :input
Specs
output_pad_opts_t() :: [ track_enabled: boolean(), packet_filters: [Membrane.RTP.SessionBin.packet_filter_t()], extensions: [Membrane.RTP.SessionBin.extension_t()] ]
Options for pad :output
Specs
Specs
t() :: %Membrane.WebRTC.EndpointBin{ audio_codecs: [ExSDP.Attribute.t()], handshake_opts: Keyword.t(), inbound_tracks: [Membrane.WebRTC.Track.t()], log_metadata: :list, outbound_tracks: [Membrane.WebRTC.Track.t()], port_range: Range.t(), stun_servers: [ExLibnice.stun_server()], turn_servers: [ExLibnice.relay_info()], use_default_codecs: [:audio | :video], video_codecs: [ExSDP.Attribute.t()] }
Struct containing options for Membrane.WebRTC.EndpointBin
Specs
track_message() :: alter_tracks_message() | enable_track_message() | disable_track_message()
Link to this section Functions
Specs
membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.WebRTC.EndpointBin
Specs
options() :: keyword()
Returns description of options available for this module