Converts a TurnConfig into a standard RTCIceServer, omitting the username/credential fields when they are not provided.
RTCIceServer
username
credential
TURN/STUN server description.
An RTCIceServer suitable for CallOptions.iceServers.
const iceServers = [ turnConfigToIceServer({ urls: ['stun:stun.example.com:3478'] }), turnConfigToIceServer({ urls: ['turn:turn.example.com:3478'], username: 'user', credential: 'pass', }),] Copy
const iceServers = [ turnConfigToIceServer({ urls: ['stun:stun.example.com:3478'] }), turnConfigToIceServer({ urls: ['turn:turn.example.com:3478'], username: 'user', credential: 'pass', }),]
Converts a TurnConfig into a standard
RTCIceServer, omitting theusername/credentialfields when they are not provided.