The QuickBlox Developer Hub

Welcome to the QuickBlox developer hub. You'll find comprehensive guides and documentation to help you start working with QuickBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Advanced

Use this page to configure some additional settings for your video calling app.

This is our new documentation for beta version of QuickBlox React Native SDK. Please contact our Customer Support Team to provide your feedback, suggestions, and requests to improve this page.

Mute audio

Mute the audio by calling enableAudio() 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 WebRTC session. The audio is muted when the argument is set to false and unmuted when true.

QB.webrtc
 .enableAudio({ sessionId, userId, enable: false })
 .then(() => { /* muted audio successfully */ })
 .catch(e => { /* handle error */ })
Parameters
Description

sessionId

WebRTC session identifier.

userId

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

Boolean parameter. true is enabled, false is disabled.

Disable video

Turn off the video by calling enableVideo() 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 session. The video is disabled when the argument is set to false and enabled when true.

To turn off a video call enableVideo() method.

QB.webrtc
 .enableVideo({ sessionId, userId, enable: false })
 .then(() => { /* muted video successfully */ })
 .catch(e => { /* handle error */ })
Parameters
Description

sessionId

WebRTC session identifier.

userId

(optional) 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

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 passing switchCamera() with sessionId parameter.

QB.webrtc
 .switchCamera({ sessionId })
 .then(() => { /* camera switched successfully */ })
 .catch(e => { /* handle error */ })
Parameters
Description

sessionId

WebRTC session identifier.

Mirror local video

Mirror functionality allows to flip the video horizontally. Enable the mirror by setting mirror prop as true.

import WebRTCView from 'quickblox-react-native-sdk/RTCView'

...
render() {
 ...
 <WebRTCView
 	mirror={true}
 	sessionId={sessionId}
 	style={styles.video}
 	userId={userId}
 />
 ...
Parameters
Description

mirror

Boolean parameter. true is enabled, false is disabled.

sessionId

WebRTC 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.

QB.webrtc
  .switchAudioOutput({ output: QB.webrtc.AUDIO_OUTPUT.LOUDSPEAKER })
  .then(() => { /* audio should now go through loudspeaker */ })
  .catch(e => { /* handle error */ })

Updated 10 days ago


What's Next

Content

Advanced


Use this page to configure some additional settings for your video calling app.

Suggested Edits are limited on API Reference Pages

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