Mute audio
Mute the audio by calling theenableAudio()
method with sessionId
, userId
, and enable
parameters. Using this method we can tell SDK to send/not send audio data from a remote or local peer in the specified call session.
Dart
Argument | Required | Desription |
---|---|---|
sessionId | yes | Call session identifier. |
mute | yes | Boolean parameter. true is muted, false is unmuted. |
userId | no | ID of the user. This is an optional parameter. If the userId is not passed to this method, a local audio stream is muted/unmuted. If the userId is passed, a remote audio stream is muted/unmuted (by userId provided). |
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 from a remote or local peer in the specified call session.
Dart
Argument | Required | Description |
---|---|---|
sessionId | yes | Call session identifier. |
enable | yes | Boolean parameter. true is enabled, false is disabled. |
userId | no | ID of the user. If the userId is not passed to this method, a remote video stream is turned on/off. If userId is passed, a remote video stream is rendered/not rendered (by userId provided). |
Mirror local video
The mirror functionality allows flipping the video horizontally. To enable mirroring, use thesetMirror()
method in the RTCVideoViewController
.
Dart
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 within an answer time interval, theQBRTCEventTypes.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.
Dart
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.Dart
By default, the dialing time interval is 5 seconds.
The minimum value is 3 seconds.
Switch audio output device
You can switch an audio output. Call theswitchAudioOutput()
method and pass the type of the audio device to it.
You can switch the audio input only after receiving/creating a webrtc session.
Dart
Argument | Required | Description |
---|---|---|
output | yes | Type of the audio device:QBRTCAudioOutputTypes.EARSPEAKER, QBRTCAudioOutputTypes.LOUDSPEAKER, QBRTCAudioOutputTypes.HEADPHONES, QBRTCAudioOutputTypes.BLUETOOTH. |