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:

public virtual void sendConferenceRequest(
                             string chatroomID,
                             Action < NSDictionary > response,
                             Action < NSError> failure
                             )

Example:

cometchat.sendConferenceRequest("15",
                   (dict) => { this.response(dict); /* code block */ },
                   (err) => { this.failure(err); /* 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:

public virtual void joinConference(
                             string callID,
                             Action < NSDictionary > response,
                             Action < NSError> failure
                             )

Example:

cometchat.joinConference("bf1e7055f8e15d6f8662c7c4b6f8adb9",
                   (dict) => { this.response(dict); /* code block */ },
                   (err) => { this.failure(err); /* 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 */
public virtual void startConferenceInContainer(
                             string callID,
                             NSObject container,
                             Action < NSDictionary > response,
                             Action < NSError> failure
                             )

Example:

cometchat.startConferenceInContainer("bf1e7055f8e15d6f8662c7c4b6f8adb9",this,
                   (dict) => { this.response(dict); /* code block */ },
                   (err) => { this.failure(err); /* 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:

public virtual void endConference(
                             string groupid,
                             string callID,
                             Action < NSDictionary > response,
                             Action < NSError> failure
                             )

Example:

cometchat.endConference("15","bf1e7055f8e15d6f8662c7c4b6f8adb9",
                   (dict) => { this.response(dict); /* code block */ },
                   (err) => { this.failure(err); /* 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:

public virtual void MuteAudio( bool audioControlFlag );

Example:

cometChat.MuteAudio(true);

Arguments:

Argument Description
audioControlFlag turn audio on/off

switchSpeakers

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

public virtual void SwitchSpeakers();

Example:

cometChat.SwitchSpeakers();

pauseVideo

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

public virtual void pauseVideo( bool videoControlFlag );

Example:

cometChat.pauseVideo(true);

Arguments:

Argument Description
videoControlFlag turn video on/off

toggleCamera

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

public virtual void ToggleCamera();

Example:

cometChat.ToggleCamera();

  • Was this helpful?
  • Yes   No