Fix ICE candidate handling in connection manager

- 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 <noreply@anthropic.com>
This commit is contained in:
2025-11-14 18:37:50 +01:00
parent 5a47e0a397
commit f6004a9bc0

View File

@@ -246,11 +246,11 @@ export class RondevuConnection {
); );
for (const candidate of candidates) { for (const candidate of candidates) {
await this.pc.addIceCandidate({ // Create ICE candidate from candidate string only
candidate: candidate.candidate, // Don't hardcode sdpMLineIndex/sdpMid - let WebRTC parse from candidate string
sdpMLineIndex: 0, await this.pc.addIceCandidate(new RTCIceCandidate({
sdpMid: '0' candidate: candidate.candidate
}); }));
this.lastIceTimestamp = candidate.createdAt; this.lastIceTimestamp = candidate.createdAt;
} }
} catch (err) { } catch (err) {