After the WRTC JS object is created and mapped with the WRTC events you have to initialize WRTC SDK JS object. While Initializing the client SDK, the client SDK specific data are obtained either from Server or Custom web application. If the WRTC SDK Config data type is set to client, user can get required client SDK data from web application else the required SDK config data are fetched from WRTC server.
The SDK is initialized by passing other parameters as shown below:
turnUrl and stunUrl is the TURN and STUN server URL,
turnCredential TURN server credential,
turnUserName is the TURN server username
RTCPMux is a boolean variable. The value true - rtcpMuxPolicy is set to "require" in RTCPeerConnection object, false - rtcpMuxPolicy is set to "negotiate" in RTCPeerConnection object.
Statistics Server URL is statistics server url to view the media-related statistics
sonus is the WRTC client object created.
The following code snippet shows a sample JSONconfiguration information for server:
It is expected that you configure the STUN and TURN servers. If you are not configuring the servers it will be assigned with its default values - 184.108.40.206:3478 for STUN server and 220.127.116.11:5000 for TURN server.