Helpers

The following methods used to get the information about current call details, user call status, user audio/video mute/unmute status, etc... So you don't need to store these information in the client side.

Get Call Info#

To get the current details such as roomId, calltype & groupId use below method.

SDK.getCallInfo()

Sample Response:#

// Response Structure
{
callType: "audio|video",
groupId: "GROUP_ID",
isAudioMute: 'BOOLEAN',
isVideoMute: 'BOOLEAN',
joinMode: null,
roomId: "ROOM_ID",
roomLink: "ofg-iyim-uyw",
toUsers: ["USER_JID"],
userDetails: {},
}

Response Property Details:#

PropertyDescription
roomIdCall room ID.
callTypeDescribe the audio or video call.
groupIdContain the group ID If the call is group call. Otherwise, the value will be NULL.
isAudioMuteTo determine audio is mute or not
isVideoMuteTo determine video is mute or not
roomLinkCall room Link.
toUsersArray of User JID of callee users.
userDetailsUser details object of the callee users.

Get User Call Status#

Get a user call status by providing the user JID into getUserCallStatus method. The response will be the status of the user. If no user found, it will return undefined

SDK.getUserCallStatus('USER_JID');

Sample Response:#

// Response Structure
STRING
// Example
"ringing" or "connecting" or "connected" or "reconnecting" or "disconnected"

Request Params#

ParamDescriptionTypeRequired
USER_JIDUser JIDStringtrue

Get All Participants list#

Get a call participant list from getAllParticipantUsers method. The response will be the list of the userJid. If no user found, it will return undefined

SDK.getAllParticipantUsers();

Sample Response:#

// Response Structure
[String]
// Example
['USER_JID1','USER_JID2',...];

Get User Audio mute/unmute state#

Get a user audio track mute/unmute state by providing the user JID into isRemoteAudioMuted method. The response will be the boolean based on mute/unmute state.

SDK.isRemoteAudioMuted('USER_JID');

Sample Response:#

// Response Structure
BOOLEAN
// true - muted
// false - unmuted

Request Params#

ParamDescriptionTypeRequired
USER_JIDUser JIDStringtrue

Get User Video mute/unmute state#

Get a user video track mute/unmute state by providing the user JID into isRemoteVideoMuted method. The response will be the boolean based on mute/unmute state.

SDK.isRemoteVideoMuted('USER_JID');

Sample Response:#

// Response Structure
BOOLEAN
// true - muted
// false - unmuted

Request Params#

ParamDescriptionTypeRequired
USER_JIDUser JIDStringtrue

Get All Users in Call Video mute/unmute state#

Get all the users in call video track mute/unmute state by using isAllUsersVideoMuted method. The response will be the boolean based on mute/unmute state.

SDK.isAllUsersVideoMuted();

Sample Response:#

// Response Structure
BOOLEAN
// true - muted
// false - unmuted

Prevent Socket disconnect when the proximity sensor is enabled.#

When the proximity sensor is enabled socket will be disconnected so prevent the socket disconnect use below method . Pass the boolean value true when the proximity sensor is enabled & false when the proximity sensor is disabled.

SDK.socketEmitEvent(Boolean);

Request Params#

ParamDescriptionTypeRequired
BOOLEANtrue - Proximity enabled
false - Proximity disabled
BOOLEANtrue