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
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:

SendConferenceRequest(ICallbacks callback )

Example:

cometChat.SendConferenceRequest(new MyCallbacks(success => successcallback(success), fail => failcallback(fail)));

    public void successcallback(JSONObject p0)
        {
           //block of code
        }

        public void failcallback(JSONObject p0)
        {
      //block of code
        }

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. If you are the initiator of the conference, then call this method on the success of sendConferenceRequest()
Method Signature:

JoinConference(Context context, String callid, RelativeLayout container, ICallbacks callbacks)

Example:

cometChat.JoinConference(MainActivity.this, "bf1e7055f8e15d6f8662c7c4b6f8adb9", container ,new MyCallbacks(success => successcallback(success), fail => failcallback(fail)));

    public void successcallback(JSONObject p0)
        {
           //block of code
        }

        public void failcallback(JSONObject p0)
        {
      //block of code
        }
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

EndConference

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

EndConference(ICallbacks callback )

Example:

cometChat.EndConference(new MyCallbacks(success => successcallback(success), fail => failcallback(fail)));

    public void successcallback(JSONObject p0)
        {
           //block of code
        }

        public void failcallback(JSONObject p0)
        {
      //block of code
        }

Arguments:

Argument Description
callback success and failure callbacks

MuteAudio

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

MuteAudio(Boolean flag)

Example:

cometChat.MuteAudio(true);

Arguments:

Argument Description
flag turn audio on/off

SwitchSpeakers

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

SwitchSpeakers()

Example:

cometChat.SwitchSpeakers();

pauseVideo

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

PauseVideo(Boolean flag)

Example:

cometChat.PauseVideo(true);

Arguments:

Argument Description
flag turn video on/off

ToggleCamera

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

ToggleCamera()

Example:

cometChat.ToggleCamera();

  • Was this helpful?
  • Yes   No