Audio/Video Group Conference

To add Audio/Video Group Conference support in your application,

Include CustomUI.js in your index.html file to access the Custom UI functionality in your Cordova app

All the method calls will invoke their respective callback blocks as defined below.

1. Send conference call request
Send audio-video call request to all the users of the currently joined chatroom. (Ensure that logged-in user has joined a chatroom)


function callbackmeth(result){
  alert(result);
}

CustomUI.sendConferenceRequest(callbackmeth);

Invocation: After audio video call request is sent successfully.
Response: Callback containing success message
Eg:

"success"={  
   "status"="Conference request sent successfully";
}

2. Join conference
Join the Audio/Video conference started by another member of the current chatroom. HAS STARTED A VIDEO CONVERSATION message is received in the onAVChatMessageReceived callback block.


function callbackmeth(result){
  alert(result);
}

CustomUI.joinConference(callbackmeth);

Invocation: After joining the audio/video conference successfully
Response: Callback containing success message
Eg:

"success"={
   "status" = "Conference joined successfully";
}

3. Start Audio/Video call
Start an audio-video call the currently joined conference within the container view. This function has to be called after sending/joining a conference request.


function callbackmeth(result){
  alert(result);
}

CustomUI.startConferenceInContainer(this,callbackmeth);

4. End/Leave conference call
End audio-video call with the user corresponding to userID specified.(Ensure that userID specified should be same as given when starting the audio-video call and also userID cannot be nil or empty)


function callbackmeth(result){
  alert(result);
}

CustomUI.endConference(callbackmeth);

Invocation: After ending audio video call successfully
Response: Callback containing id of the user with whom audio/video call has been ended
Eg:

"success"={  
   "status"="Conference ended successfully";
}

5. Toggle Audio to ON(YES) or OFF(NO) state


function callbackmeth(result){
  alert(result);
}

CustomUI.toggleGroupAVAudioSDK(true,callbackmeth);

6. Toggle Video to ON(YES) or OFF(NO) state


function callbackmeth(result){
  alert(result);
}

CustomUI.toggleGroupAVVideoSDK(true,callbackmeth);

7. Switch between front and rear camera in Group Video call


function callbackmeth(result){
  alert(result);
}

CustomUI.switchGroupAVCameraSDK(callbackmeth);

Please refer ‎error codes for failure responses.

Not finding what you need?

The CometChat team is here to help!