From f6004a9bc0ca9ae8b874f9b5c30f5376290458f7 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 14 Nov 2025 18:37:50 +0100 Subject: [PATCH] Fix ICE candidate handling in connection manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove hardcoded sdpMLineIndex and sdpMid values - Create RTCIceCandidate properly from candidate string - Let WebRTC parse candidate metadata automatically - Fixes ICE connection failures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/connection.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/connection.ts b/src/connection.ts index 6301f2a..a47ebae 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -246,11 +246,11 @@ export class RondevuConnection { ); for (const candidate of candidates) { - await this.pc.addIceCandidate({ - candidate: candidate.candidate, - sdpMLineIndex: 0, - sdpMid: '0' - }); + // Create ICE candidate from candidate string only + // Don't hardcode sdpMLineIndex/sdpMid - let WebRTC parse from candidate string + await this.pc.addIceCandidate(new RTCIceCandidate({ + candidate: candidate.candidate + })); this.lastIceTimestamp = candidate.createdAt; } } catch (err) {