Disable renegotiation when ICE fails

This commit is contained in:
sergystepanov 2026-06-04 23:11:45 +03:00
parent bc17b1c2a0
commit d9a13f006c

View file

@ -203,6 +203,8 @@ export const webrtc = {
) => {
log.debug("[rtc] [sdp] remote SDP", sdp);
if (!pc) return;
try {
await pc.setRemoteDescription(new RTCSessionDescription(sdp));
} catch (e) {
@ -230,6 +232,8 @@ export const webrtc = {
addCandidate: (
/** @type {RTCLocalIceCandidateInit | string} */ candidate,
) => {
if (!pc) return;
if (hasRemoteDescription()) {
addRemoteCandidate(candidate);
} else {