Skip to content

Commit

Permalink
openvidu-browser: comment ICE server configuration priority
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Jun 5, 2024
1 parent 2493d3c commit dc759df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openvidu-browser/src/OpenVidu/Stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dc759df

Please sign in to comment.