Video Conference

The Methods below are available for Video Conference:

Method Description
sendConferenceRequest Allows logged-in user to initiate a video Conference in a joined group
joinConference Invite Other users to join a video conference
startConferenceInContainer start conference using call Id
endConference Allows logged-in user to leave the conference
muteAudio Allows logged in user to mute/unmute his audio
switchSpeakers Allows logged-in user to switch the speaker
pauseVideo Allows logged in user to turn off/on his video
toggleCamera Allows logged-in user to switch the camera

sendConferenceRequest

Allows logged-in user to initiate a video Conference in a joined group
Method Signature:

- (void)sendConferenceRequest:(NSString *)chatroomID
                      success:(void (^)(NSDictionary *))success
                      failure:(void (^)(NSError *))failure;

Example:

[cometChat sendConferenceRequest:@"15" success:^(NSDictionary *response) {
    /* Code Block */
} failure:^(NSError *error) {
    /* Code Block */
}];

Arguments:

Argument Description
callback success and failure callbacks

Response for successCallback:

{
    "status": "Conference request sent successfully"
}

Description:

Response Property Description
status text indicating the request has been sent successfully

joinConference

Call this method to join the video conference.
Method Signature:

- (void)joinConference:(NSString *)callID
               success:(void (^)(NSDictionary *response))success
               failure:(void (^)(NSError *error))failure;

Example:

[cometChat joinConference:@"bf1e7055f8e15d6f8662c7c4b6f8adb9" success:^(NSDictionary *response) {
    /* Code Block */
} failure:^(NSError *error) {
    /* Code Block */
}];

Argument Description
activity instance of the activity
callID id of a call received in onAvchatMessageReceived() callback
container UI container to hold AV Call UI
callback callbacks to indicate success or failure

startConferenceInContainer

On Success of Join Conference.Launch UI Window and call start conference to start conference.
Method Signature:

/* Start AudioVideo group conference in the currently joined chatroom */
- (void)startConferenceInContainer:(NSString *)callID
                     containerView:(UIView *)container
                changeInAudioRoute:(void(^)(NSDictionary *audioRouteInformation))audioRouteInformation
                           failure:(void (^)(NSError *error))failure;

Example:

[cometChat startConferenceInContainer:@"bf1e7055f8e15d6f8662c7c4b6f8adb9" containerView:(UIView *) changeInAudioRoute:^(NSDictionary *audioRouteInformation) {
    /* Code Block */
} failure:^(NSError *error) {
    /* Code Block */
}];

Argument Description
callID id of a call received in onAvchatMessageReceived() callback
container UI container to hold AV Call UI
callback callbacks to indicate success or failure

endConference

Allows logged-in user to leave the conference
Method Signature:

- (void)endConference:(NSString *)groupid
               callID:(NSString *)callID
              success:(void (^)(NSDictionary *response))success
              failure:(void (^)(NSError *error))failure;

Example:

[cometChat endConference:@"15" callID:@"bf1e7055f8e15d6f8662c7c4b6f8adb9" success:^(NSDictionary *response) {
   /* Code Block */
} failure:^(NSError *error) {
   /* Code Block */
}];

Arguments:

Argument Description
groupid Id of group in which conference to end
callID Unique call id
callback success and failure callbacks

muteAudio

Allows logged in user to mute/unmute the audio
Method Signature:

- (void)toggleAudioSDK:(BOOL)audioControlFlag;

Example:

[cometChat toggleAudioSDK:YES];

Arguments:

Argument Description
audioControlFlag turn audio on/off

switchSpeakers

Allows logged-in user to switch the speaker
Method Signature:

- (void)switchAudioRouteSDK;

Example:

[cometChat switchAudioRouteSDK];

pauseVideo

Allows logged in user to pause/unpause the video
Method Signature:

- (void)toggleVideoSDK:(BOOL)videoControlFlag;

Example:

[cometChat toggleVideoSDK:YES];

Arguments:

Argument Description
videoControlFlag turn video on/off

toggleCamera

Allows logged-in user to switch the camera
Method Signature:

- (void)switchCameraSDK;

Example:

[cometChat switchCameraSDK];

  • Was this helpful?
  • Yes   No