openvidu-browser: single iceServer on RTCPeerConnection

pull/621/head
pabloFuente 2021-03-26 22:02:53 +01:00
parent a3d226a4cb
commit 464ef90c79
1 changed files with 1 additions and 4 deletions

View File

@ -1427,12 +1427,9 @@ export class Session extends EventDispatcher {
private processJoinRoomResponse(opts: LocalConnectionOptions) {
this.sessionId = opts.session;
if (opts.coturnIp != null && opts.turnUsername != null && opts.turnCredential != null) {
const stunUrl = 'stun:' + opts.coturnIp + ':3478';
const turnUrl1 = 'turn:' + opts.coturnIp + ':3478';
const turnUrl2 = turnUrl1 + '?transport=tcp';
this.openvidu.iceServers = [
{ urls: [stunUrl] },
{ urls: [turnUrl1, turnUrl2], username: opts.turnUsername, credential: opts.turnCredential }
{ urls: [turnUrl1], username: opts.turnUsername, credential: opts.turnCredential }
];
logger.log("STUN/TURN server IP: " + opts.coturnIp);
logger.log('TURN temp credentials [' + opts.turnUsername + ':' + opts.turnCredential + ']');