Mute audio
Mute the audio by callingenableAudio()
method with sessionId
, userId
, and enable
parameters. Using this method we can tell SDK to send/not send audio data either from a local or remote peer in the specified call session.
JavaScript
enableAudio()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
sessionId | yes | Call session identifier. |
userId | yes | ID of the user. This is an optional parameter. If userId is not passed to this method, a local audio stream is muted/unmuted. If userId is passed, a remote audio stream is muted/unmuted (by userid provided). |
enable | yes | Boolean parameter. true is enabled, false is disabled. |
Disable video
Turn off the video by calling theenableVideo()
method with sessionId
, userId
, and enable
parameters. Using this method we can tell SDK not to send video data either from a local or remote peer in the specified call session. The video is disabled when the argument is set to false
and enabled when true
.
JavaScript
enableVideo()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
sessionId | yes | Call session identifier. |
userId | no | ID of the user. If userId is not passed to this method, a local video stream is turned on/off. If userId is passed, a remote video stream is rendered/not rendered (by userId provided). |
enable | yes | Boolean parameter. true is enabled, false is disabled. |
Switch camera
You can switch the video camera during a call (by default is front camera) by passingswitchCamera()
with sessionId
parameter.
JavaScript
switchCamera()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
sessionId | yes | Call session identifier. |
Mirror local video
Mirror functionality allows to flip the video horizontally. Enable the mirror by settingmirror
prop as true
.
JavaScript
Parameters | Description |
---|---|
mirror | Boolean parameter. true is enabled, false is disabled. |
sessionId | Call session identifier. |
style | View style. |
userId | ID of the user. |
Switch audio output
You can switch the audio output to a loudspeaker or to ear-speaker during a call.JavaScript
Custom ICE servers
This feature is coming soon. Please check back later. For more updates and questions, feel free to contact our Customer Support Team.
General settings
You can change different settings for your calls usingQB.rtcconfig
class. All of them are listed below.
Answer time interval
If an opponent hasn’t answered you within an answer time interval, theQB.webrtc.EVENT_TYPE.NOT_ANSWER
event type will be received. The answer time interval shows how much time an opponent has to answer your call. Set the answer time interval using the code snippet below.
JavaScript
JavaScript
By default, the answer time interval is 60 seconds.
The minimum value is 10 seconds.
Dialing time interval
Dialing time interval indicates how often to notify your opponents about your call. Set the dialing time interval using the code snippet below.JavaScript
JavaScript
By default, the dialing time interval is 5 seconds.
The minimum value is 3 seconds.