View Source ExWebRTC.PeerConnection.Configuration (ex_webrtc v0.1.0)
ExWebRTC.PeerConnection
configuration.
Summary
Types
Options that can be passed to ExWebRTC.PeerConnection.start_link/1
.
Supported RTP header extensions.
Types
@type options() :: [ ice_servers: [ice_server()], ice_ip_filter: (:inet.ip_address() -> boolean()), audio_codecs: [ExWebRTC.RTPCodecParameters.t()], video_codecs: [ExWebRTC.RTPCodecParameters.t()], rtp_hdr_extensions: [rtp_hdr_extension()] ]
Options that can be passed to ExWebRTC.PeerConnection.start_link/1
.
ice_servers
- list of STUN servers to use. TURN servers are not supported right now and will be filtered out.ice_ip_filter
- filter applied when gathering local candidatesaudio_codecs
- list of audio codecs to use. Usedefault_audio_codecs/0
to get a list of default audio codecs. This option overrides default audio codecs. If you wish to add codecs to default ones doaudio_codecs: Configuration.default_audio_codecs() ++ my_codecs
video_codecs
- the same asaudio_codecs
but for video. If you wish to e.g. only use AV1, pass as video_codecs:video_codecs: [ %ExWebRTC.RTPCodecParameters{ payload_type: 45, mime_type: "video/AV1", clock_rate: 90_000 } ]
rtp_hdr_extensions
- list of RTP header extensions to use. MID extension is enabled by default and cannot be turned off. If an extension can be used both for audio and video media, it will be added to every mline. If an extension is audio-only, it will only be added to audio mlines. If an extension is video-only, it will only be added to video mlines.
Besides options listed above, ExWebRTC uses the following config:
- bundle_policy - max_bundle
- ice_candidate_pool_size - 0
- ice_transport_policy - all
- rtcp_mux_policy - require
This config cannot be changed.
@type rtp_hdr_extension() :: :audio_level
Supported RTP header extensions.
Functions
@spec default_audio_codecs() :: [ExWebRTC.RTPCodecParameters.t()]
Returns a list of default audio codecs.
@spec default_video_codecs() :: [ExWebRTC.RTPCodecParameters.t()]
Returns a list of default video codecs.