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).
Conference endpoint
QBRTCConfig
class introduces new setting for Conference - conference endpoint. To set a specific conference endpoint use the following method:
The endpoint should be a correct QuickBlox Conference server endpoint.
Use this method to get a current conference endpoint. The default value is nil
.
Conference client
The conference module has its own client.
Conference client delegate
Conference client delegate is inherited from base client delegate and has all of its protocol methods implemented as well.
Base client delegate protocol methods
All protocol methods below have their own explanation inlined and are optional.
Conference client delegate protocol methods
All protocol methods below are conference client-specific, optional, and have their own explanation inlined.
Conference client interface
QBRTCConferenceClient
is a singleton-based class that is used to create and operate with conference sessions. It has an observer (delegates) manager which can be activated/deactivated with two simple methods:
The delegate should conform to the QBRTCConferenceClientDelegate
protocol, which is inherited from the base client delegate. In order to create a new conference session, use the method below:
This method will create the session locally first, without a session ID, until the server will perform a didCreateNewSession()
callback in QBRTCConferenceClientDelegate
protocol, where the session ID will be assigned and the session will receive its QBRTCSessionStateNew
state. After that, you can join or leave it. The conference session is explained below.
Conference session
QBRTCConferenceSession
is inherited from the base session class and has all of its basics such as state
, currentUserID
, localMediaStream
as well as the ability to get remote audio and video tracks for specific user IDs.
It also has the ability to get a connection state for a specific user ID if their connection is opened.
See a QBRTCBaseSession
class for more inline documentation. As for conference-specific methods, the conference session ID is NSNumber
. Each conference session is tied to a specific QuickBlox dialog ID (NSString
).
Join video room
A QBRTCConferenceSession
also has a publishers list property. But the publishers list will be only valid if you call joinAsPublisher()
method allowing to join the session as a publisher using method below.
This method joins the session and will publish your feed making you an active publisher in the room. Everyone in the room will be able to subscribe and receive your feed.
joinAsPublisher()
can be used only when the session has a valid session ID, e.g. is created on the server and notified to you with didCreateNewSession()
callback from QBRTCConferenceClientDelegate
protocol.
Subscribe/Unsubscribe
You can subscribe and unsubscribe from publishers using the methods below.
You do not need to be joined as a publisher in order to perform subscription-based operations in the session.
These methods can also be used only when the session has a valid session ID, e.g. is created on the server and is notified to you with didCreateNewSession()
callback from QBRTCConferenceClientDelegate
protocol.
Mute local audio
Mute the audio by calling the localMediaStream.audioTrack.enabled()
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 enabled property for a specific remote media track.
Disable local video
Turn off the video by calling localVideoTrack.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 localVideoTrack.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 session, you can perform the leave()
method.
This method can be called in any state of the session and will always close it no matter what.
Camera resolution
It’s possible to set custom video resolution using QBRTCVideoFormat
.
Parameters | Description |
---|---|
width | Video width. Default: 640. |
height | Video hight. Default: 480. |
frameRate | Video frames per second. Default: 30. |
pixelFormat | Video pixel format. Default: QBRTCPixelFormat420f. |
You can also get a list of available resolution formats using formats(with:)
method and set a needed one from the list.
Was this page helpful?