Fixing URL passing in WebRtc setup

This commit is contained in:
David Négrier 2020-08-28 16:29:21 +02:00
parent 3875c0afe8
commit 8655aef629
2 changed files with 19 additions and 2 deletions

View File

@ -24,7 +24,7 @@ export class ScreenSharingPeer extends Peer {
urls: 'stun:stun.l.google.com:19302' urls: 'stun:stun.l.google.com:19302'
}, },
{ {
urls: TURN_SERVER, urls: TURN_SERVER.split(','),
username: TURN_USER, username: TURN_USER,
credential: TURN_PASSWORD credential: TURN_PASSWORD
}, },

View File

@ -19,7 +19,7 @@ export class VideoPeer extends Peer {
urls: 'stun:stun.l.google.com:19302' urls: 'stun:stun.l.google.com:19302'
}, },
{ {
urls: TURN_SERVER, urls: TURN_SERVER.split(','),
username: TURN_USER, username: TURN_USER,
credential: TURN_PASSWORD credential: TURN_PASSWORD
}, },
@ -27,6 +27,23 @@ export class VideoPeer extends Peer {
} }
}); });
console.log('PEER SETUP ', {
initiator: initiator ? initiator : false,
reconnectTimer: 10000,
config: {
iceServers: [
{
urls: 'stun:stun.l.google.com:19302'
},
{
urls: TURN_SERVER,
username: TURN_USER,
credential: TURN_PASSWORD
},
]
}
})
//start listen signal for the peer connection //start listen signal for the peer connection
this.on('signal', (data: unknown) => { this.on('signal', (data: unknown) => {
this.sendWebrtcSignal(data); this.sendWebrtcSignal(data);