From dc759dffd4460ce332c7ff7ba8ee1b0071bc26e8 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 5 Jun 2024 18:03:23 +0200 Subject: [PATCH] openvidu-browser: comment ICE server configuration priority --- openvidu-browser/src/OpenVidu/Stream.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openvidu-browser/src/OpenVidu/Stream.ts b/openvidu-browser/src/OpenVidu/Stream.ts index 25378e102a..cb228f50a0 100644 --- a/openvidu-browser/src/OpenVidu/Stream.ts +++ b/openvidu-browser/src/OpenVidu/Stream.ts @@ -1726,15 +1726,19 @@ export class Stream { private getIceServersConf(): RTCIceServer[] | undefined { let returnValue; if (!!this.session.openvidu.advancedConfiguration.iceServers) { + // Priority 1: OpenViduAdvancedConfiguration.iceServers returnValue = this.session.openvidu.advancedConfiguration.iceServers === 'freeice' ? undefined : this.session.openvidu.advancedConfiguration.iceServers; } else if (!!this.session.openvidu.advancedConfiguration.rtcConfiguration?.iceServers) { + // Priority 2: OpenViduAdvancedConfiguration.rtcConfiguration.iceServers returnValue = this.session.openvidu.advancedConfiguration.rtcConfiguration.iceServers; } else if (this.session.openvidu.iceServers) { + // Priority 3: default ICE servers sent by openvidu-server returnValue = this.session.openvidu.iceServers; } else { + // Priority 4: freeice STUN servers returnValue = undefined; } return returnValue;