A class defining the properties of the
config parameter in the createClient method.
- Ensure that you do not leave mode and codec as empty.
- Ensure that you set these properties before calling Client.join.
Set the Channel Profile
The table below lists the corresponding channel profile settings between different versions of the Web SDK:
|Before v2.3||From v2.3|
Set the Proxy Server
Proxy services by different service providers may result in slow performance if you are using the Firefox browser. Therefore, Agora recommends using the same service provider for the proxy services. If you use different service providers, Agora recommends not using the Firefox browser.
The codec the Web browser uses for encoding and decoding.
"vp8": Sets the browser to use VP8 for encoding and decoding.
"h264": Sets the browser to use H264 for encoding and decoding.
Set codec as
"h264" as long as Safari is involved in the call.
The channel profile.
Agora Web SDK needs to know the application scenario to apply different optimization methods.
Currently Agora Web SDK supports the following channel profiles:
"live": Sets the channel profile as live broadcast.
"rtc": Sets the channel profile as communication.
If you need to communicate with Agora Native SDK, Agora recommends the following settings:
- For Native SDK v2.3.2 and later:
- For Native SDK before v2.3.2, set mode as
"live"regardless of which channel profile the Native SDK uses.
If you set mode as
"rtc", the Agora Recording SDK is not supported.
Your Nginx server domain name.
Enterprise users with a company firewall can use this property to pass signaling messages to the Agora SD-RTN through the Nginx Server.
TURN server settings.
Enterprise users with a company firewall can use this property to pass audio and video data to the Agora SD-RTN through the TURN Server.
Sets whether to force data transfer by TURN Server:
- true: Force data transfer.
- false: (default) Not to force data transfer.
Your TURN Server password.
Optional tcpport?: string
The TCP port(s) you want add to TURN Server.
Your TURN Server URL address.
Optional udpport?: string
The UDP port(s) you want to add to TURN Server.
Your TURN Server username.