webrtc: improve performance by ignoring mDNS candidates (#4963) (#6064)

mDNS candidates sometimes require a large CPU portion, they are not
involved in any connectivity method mentioned in the documentation, they work in
local networks only.
This commit is contained in:
Alessandro Ros
2026-08-10 12:00:23 +00:00
committed by GitHub
parent 8e46f37ba7
commit a146e55978
@@ -244,6 +244,12 @@ func (co *PeerConnection) Start() error {
settingsEngine.SetNet(co.Net)
// Do not generate mDNS candidates and do not use mDNS candidates of remote peers.
// * they sometimes require a large CPU portion
// * they are not involved in any connectivity method mentioned in the documentation
// * they work in local networks only
settingsEngine.SetICEMulticastDNSMode(ice.MulticastDNSModeDisabled)
mediaEngine := &webrtc.MediaEngine{}
if co.Publish {