Add Trickle ICE support on the server

This commit is contained in:
sergystepanov 2026-06-03 18:41:21 +03:00
parent 7c604e94fb
commit 337bf6149c

View file

@ -92,8 +92,9 @@ func (p *Peer) NewCall(vCodec, aCodec string, onICECandidate func(ice any)) (sdp
}
p.conn.OnICEConnectionStateChange(p.handleICEState(func() { p.log.Info().Msg("Connected") }))
// Stream provider supposes to send offer
offer, err := p.conn.CreateOffer(nil)
offer, err := p.conn.CreateOffer(&webrtc.OfferOptions{
OfferAnswerOptions: webrtc.OfferAnswerOptions{ICETricklingSupported: true},
})
if err != nil {
return "", err
}