Handling call events
#
Listening to the call eventsIn order to listen to the call events you need to listen to the Plugin Events using the below methods.
info
The call events mentioned below will return the JSON response. You can decode it to get the details for these events.
info
AudioLevel ranges from 0 to 10, 0 being very low sound and 10 being too loud.
#
Handling mute eventsWhenever call end user mute/unmute video or audio, the below listener will be triggered.
muteEvent
value will be anyone of the values of annotation class MuteEvent
.
muteEvent Value | Call event |
---|---|
MuteStatus.remoteVideoMute | when the remote user muted his video |
MuteStatus.remoteVideoUnMute | when the remote user unmuted his video |
MuteStatus.remoteAudioMute | when the remote user muted his audio |
MuteStatus.remoteAudioUnMute | when the remote user unmuted his video |
#
Handling call status eventsWhenever call status changed in video or audio call, the below listener will be triggered.
callStatus
value will be anyone of the values of annotation class CallStatus
.
callStatus Value | Call event |
---|---|
CallStatus.calling | the initial state of the call |
CallStatus.connecting | The current call is in connecting state |
CallStatus.ringing | the remote user is having internet and acknowledged the call |
CallStatus.attended | the user attended call and UI can be presented with the users in the call |
CallStatus.connected | the call is successfully connected and audio/video tracks transmission is about to start |
CallStatus.disconnected | the call is disconnected and call UI can be closed |
CallStatus.reconnected | the call is connected back after a reconnecting state |
CallStatus.onHold | the remote user has put your call on hold, it will happedn when the remote user attended gsm call |
CallStatus.onResume | the remote user has resumed your call after a on hold, it will happen when the remote user disconnected gsm call |
CallStatus.callTimeout | when we don't receive ack for the outgoing call from the remote user within 30 seconds, When we don't receive ack for the incoming call from the caller within 30 seconds, When we don't receive ack for the call invite from the invited user within 30 seconds |
#
Handling call action eventsWhenever call action received in video or audio call, the below delegate will be triggered,
callAction
value will be anyone of the values of annotation class CallAction
.
callAction Value | Call event |
---|---|
CallAction.localHangup | whenever you disconnect the call, the action will be received |
CallAction.remoteHangup | whenever remote user disconnect the call, the action will be received |
CallAction.denyCall | when you decline the incoming call, the action will be received for callee |
CallAction.remoteEngaged | when the remote user is engaged in the another call, the action will be received for the caller |
CallAction.remoteBusy | when the remote user declines incoming the call, the action will be received for the caller |
CallAction.audioDeviceChanged | whenever the audio device changed in call, update the audio device UI |
CallAction.videoCallConversionRejected | When remote user declined our video call switch request |
CallAction.videoCallConversionAccepted | When remote user accepted our video call switch request |
CallAction.videoCallConversionCancel | When remote user cancels the video call switch request made by them |
CallAction.cameraSwitchSuccess | When camera switch done, the action will be received |
CallAction.changedToAudioCall | When ui needs to be changed as audio call ui this action will be received |
CallAction.videoCallConversionRequest | When Remote user request to switch Audio call to Video call this action will be received |