QuickBlox Documentation

QuickBlox provides powerful Chat API and SDK to add real-time messaging and video calls to your web and mobile apps. Learn how to integrate QuickBlox across multiple platforms.

Advanced

Learn how to mute audio and disable video.

Mute audio

Mute the audio by calling enableAudio() method with sessionId 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.

String sessionId = "5d4175afa0eb4715cae5b63f";
bool mute = true;

try {
  await QB.webrtc.enableAudio(_sessionId, enable: mute);
} on PlatformException catch (e) {
  // Some error occured, look at the exception message for more details 
}

Parameters

Description

sessionId

Call session identifier.

mute

Boolean parameter. true is mute.

Disable video

Turn off the video by calling enableVideo() method with sessionId 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.

To turn off a video call enableVideo() method.

String sessionId = "5d4175afa0eb4715cae5b63f";
bool enable = true;

try {
  await QB.webrtc.enableVideo(sessionId, enable: enable);
} on PlatformException catch (e) {
    // Some error occured, look at the exception message for more details      
}

Parameters

Description

sessionId

Call session identifier.

enable

Boolean parameter. true is enabled, false is disabled.

General settings

You can change different settings for your calls using QB.rtcConfig class. All of them are listed below.

Answer time interval

If an opponent hasn't answered within an answer time interval, the QBRTCEventTypes.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.

//Interval in seconds
int interval = 15;

try {
  await QB.rtcConfig.setAnswerTimeInterval(interval);
} on PlatformException catch (e) {
  // Some error occured, look at the exception message for more details 
}

📘

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.

//Interval in seconds
int interval = 15;

try {
  await QB.rtcConfig.setDialingTimeInterval(interval);
} on PlatformException catch (e) {
  // Some error occured, look at the exception message for more details 
}

📘

By default, the dialing time interval is 5 seconds.
The minimum value is 3 seconds.

Updated 27 days ago


What's Next

Video Conference

Advanced


Learn how to mute audio and disable video.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.