Video Conference
Learn how to add video conference calls to your app.
This feature is available for customers on the Enterprise plan only. Take advantage of Enterprise features to unlock new value and opportunities for users. For more information and if you want to request a Demo, please contact us by mail: enterprise@quickblox.com.
QuickBlox provides a Multiparty Video Conferencing solution allowing to set up a video conference between 10-12 people. It is built on top of WebRTC SFU technologies.
Features supported:
- Video/Audio Conference with 10-12 people. - Join/Rejoin video room functionality (like Skype). - Mute/Unmute audio/video stream (own and opponents). - Display bitrate. - Switch video input device (camera).
Initialize
In order to start working with Multiparty Video Conferencing API, you need to initialize a conference endpoint. To request the conference server URL, please contact us:enterprise@quickblox.com.
Argument | Required | Description |
---|---|---|
conferenceServer | yes | A conference server URL. |
Create session
Create a session using createSession()
method. ConferenceClient
instance is a client model responsible for managing the conference session. ConferenceClient
has a setAutoSubscribeAfterJoin
option signifying that your client will be subscribed to all online publishers after joining some room. By default, setAutoSubscribeAfterJoin
is true
. ConferenceSession
is a session within a certain video room, managing all current processes.
Callbacks
To have the ability to receive callbacks about the current ConferenceSession
instance state and conference events, you should implement appropriate interfaces. Implement the QBRTCSessionStateCallback
for tracking connection state:
Implement ConferenceSessionCallbacks
for tracking conference events:
Video and audio tracks
For obtaining video and audio tracks implement interface RTCClientVideoTracksCallbacks
and RTCClientAudioTracksCallback
.
To render the video track, use the QBConferenceSurfaceView
as renderer:
Join video room
You can join a room as a listener or as a publisher. As a listener, you subscribe only to the publishers, without giving your own video and audio streams.
To subscribe to the active publisher, you should use the snippet below:
You should subscribe to publishers only when the session state becomes connected. Use onStateChanged()
callback method to track session states.
If you are subscribing as a listener, then you can subscribe to publishers right after the successful joinDialog()
. To unsubscribe from the publisher, use the unSubscribeFromPublisher()
method.
Mute local audio
Mute the audio by calling getLocalAudioTrack().setEnabled()
method. Using this method, we can tell SDK to send/not send audio data from a local peer in the specified WebRTC session.
Mute remote audio
You can always get remote audio tracks for a specific user ID in the call using the above-specified QBRTCSession
methods (assuming that they are existent). You can also mute remote media tracks on your side by changing the value of the enabled property for a specific remote media track.
Disable local video
Turn off the video by calling getLocalVideoTrack().setEnabled()
. Using this method, we can tell SDK not to send video data from a local peer in the specified session.
Disable remote video
Turn off the video by calling getVideoTrack(opponentID).setEnabled()
. Using this method, we can tell SDK not to send video data from a remote peer in the specified session.
Leave video room
To leave the current joined video room, use the leave()
method.
Camera resolution
The camera resolution is a video stream encoding parameter. It’s possible to set the custom video resolution to provide guarantees for the predictable behavior of the video stream.
Was this page helpful?