mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 19:03:24 +00:00
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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user