@@ -157,6 +157,13 @@ defmodule ExWebRTC.PeerConnection.Configuration do
157157 * `ice_transport_policy` - which type of ICE candidates should be used. Defaults to `:all`.
158158 * `ice_ip_filter` - filter applied when gathering local candidates. By default, all IP addresses are accepted.
159159 * `ice_port_range` - range of ports that ICE will use for gathering host candidates. Defaults to ephemeral ports.
160+ * `ice_aggressive_nomination` - whether ICE agent should use aggressive nomination. By default, ICE agent
161+ relies on the regular nomination defined in RFC 8445. However, some WebRTC implementations require
162+ the controlling side to nominate a pair before they can start sending data (e.g. Pion, Firefox).
163+ This can result in longer, connection establishment time as regular nomination nominates only one pair,
164+ at the very end of the whole connection establishment process. To mitigate this issue, you can eitehr add an empty
165+ ICE candidate (this will indicate that there won't be further remote candidates and once all connectivity checks pass,
166+ ICE will nominate the pair), or use aggressive nomination. Defaults to false.
160167 * `audio_codecs` and `video_codecs` - lists of audio and video codecs to negotiate. By default these are equal to
161168 `default_audio_codecs/0` and `default_video_codecs/0`. To extend the list with your own codecs, do
162169 `audio_codecs: Configuration.default_audio_codecs() ++ my_codecs`.
@@ -181,6 +188,7 @@ defmodule ExWebRTC.PeerConnection.Configuration do
181188 ice_transport_policy: :relay | :all ,
182189 ice_ip_filter: ICEAgent . ip_filter ( ) ,
183190 ice_port_range: Enumerable . t ( non_neg_integer ( ) ) ,
191+ ice_aggressive_nomination: boolean ( ) ,
184192 audio_codecs: [ RTPCodecParameters . t ( ) ] | [ audio_codec_name ( ) ] ,
185193 video_codecs: [ RTPCodecParameters . t ( ) ] | [ video_codec_name ( ) ] ,
186194 features: [ feature ( ) ] ,
@@ -200,6 +208,7 @@ defmodule ExWebRTC.PeerConnection.Configuration do
200208 ice_transport_policy: :relay | :all ,
201209 ice_ip_filter: ( :inet . ip_address ( ) -> boolean ( ) ) | nil ,
202210 ice_port_range: Enumerable . t ( non_neg_integer ( ) ) ,
211+ ice_aggressive_nomination: boolean ( ) ,
203212 audio_codecs: [ RTPCodecParameters . t ( ) ] ,
204213 video_codecs: [ RTPCodecParameters . t ( ) ] ,
205214 audio_extensions: [ Extmap . t ( ) ] ,
@@ -218,6 +227,7 @@ defmodule ExWebRTC.PeerConnection.Configuration do
218227 ice_servers: [ ] ,
219228 ice_transport_policy: :all ,
220229 ice_port_range: [ 0 ] ,
230+ ice_aggressive_nomination: false ,
221231 audio_codecs: @ default_audio_codecs ,
222232 video_codecs: @ default_video_codecs ,
223233 features: @ default_features
0 commit comments