Logging if the remote peer supports trickle ice.

This commit is contained in:
Filipi Fuchter
2025-03-24 08:59:21 -03:00
parent 3be6973e2c
commit fee0409f63

View File

@@ -52,7 +52,7 @@ export class SmallWebRTCTransport {
private createPeerConnection(): RTCPeerConnection {
const config: RTCConfiguration = {
//iceServers: [{ urls: ['stun:stun.l.google.com:19302'] }]
iceServers: [{ urls: ['stun:stun.l.google.com:19302'] }]
};
let pc = new RTCPeerConnection(config);
@@ -208,6 +208,7 @@ export class SmallWebRTCTransport {
// @ts-ignore
this.log(`Received answer for peer connection id ${answer.pc_id}`)
await this.pc!.setRemoteDescription(answer);
this.log(`Remote candidate supports trickle ice: ${this.pc.canTrickleIceCandidates}`)
} catch (e) {
this.log(`Reconnection attempt ${this.reconnectionAttempts} failed: ${e}`);
this.isReconnecting = false