接口 EaseCallKitListener
-
public interface EaseCallKitListenerthe callkit events listener。 the user can implementation this to listen the events occured in the video or audio .
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidonCallError(EaseCallError type, int errorCode, java.lang.String description)Call error callbackvoidonEndCallWithReason(EaseCallType callType, java.lang.String channelName, EaseCallEndReason reason, long callTime)Ending a Calldefault voidonGenerateRTCToken(java.lang.String userId, java.lang.String channelName, EaseCallKitTokenCallback callback)Get the RTC token Users can configure whether to enable RTC token verification inEaseCallKitConfig.setEnableRTCToken(boolean)(Boolean)}.voidonInViteCallMessageSent()Callback when a user sends a call invitation messagevoidonInviteUsers(EaseCallType callType, java.lang.String[] existMembers, org.json.JSONObject ext)Invite new users to join a audio or video call during a multi-party chatvoidonReceivedCall(EaseCallType callType, java.lang.String fromUserId, org.json.JSONObject ext)receive a invite callvoidonRemoteUserJoinChannel(java.lang.String channelName, java.lang.String userName, int uid, EaseCallGetUserAccountCallback callback)Callback when the remote user joins the channel In this case, the user should query the AgoraChat userId corresponding to the uid in the app server through the passed parameter, encapsulate it into aEaseUserAccountobject, and then callback to the callback object passed through the parameter.default voidonUserInfoUpdate(java.lang.String userName)Notifies the user to update the user information,Fired when a UI change occurs within the Callkit or some change event is received in a channel。
-
-
-
方法详细资料
-
onInviteUsers
void onInviteUsers(EaseCallType callType, java.lang.String[] existMembers, org.json.JSONObject ext)
Invite new users to join a audio or video call during a multi-party chat- 参数:
callType- call typeexistMembers- Users who already exist in the channel, excluding the inviter selfext- the ext information ,type of JSONObject
-
onEndCallWithReason
void onEndCallWithReason(EaseCallType callType, java.lang.String channelName, EaseCallEndReason reason, long callTime)
Ending a Call- 参数:
callType- call typechannelName- channel namereason- Reason for Ending a CallcallTime- total call time
-
onReceivedCall
void onReceivedCall(EaseCallType callType, java.lang.String fromUserId, org.json.JSONObject ext)
receive a invite call- 参数:
callType- call typefromUserId- inviter's userId(AgoraChat userId)ext- the ext information of invite ,type of JSONObject
-
onGenerateRTCToken
default void onGenerateRTCToken(java.lang.String userId, java.lang.String channelName, EaseCallKitTokenCallback callback)Get the RTC token Users can configure whether to enable RTC token verification inEaseCallKitConfig.setEnableRTCToken(boolean)(Boolean)}. If RTC token verification is not enabled, the method will not be called back. On the other hand. In this method, the user should first obtain the RTC token and agora uid from the app server, and then callback the RTC token and agora uid to the callback object passed in the parameter, so that the callkit can get the RTC token and agora uid to join in the calling room. if get RTC token success:EaseCallKitTokenCallback.onSetToken(java.lang.String, int)of the callback object is called failure: theEaseCallKitTokenCallback.onGetTokenError(int, java.lang.String)method of the callback object is called, which returns the error code and error message. *- 参数:
userId- userId(AgoraChat userId)channelName- channel namecallback- a callback object
-
onCallError
void onCallError(EaseCallError type, int errorCode, java.lang.String description)
Call error callback- 参数:
type- call error type ,seeEaseCallErrorerrorCode- errorCode ,seeEaseCallProcessErrordescription- the error des
-
onInViteCallMessageSent
void onInViteCallMessageSent()
Callback when a user sends a call invitation message
-
onRemoteUserJoinChannel
void onRemoteUserJoinChannel(java.lang.String channelName, java.lang.String userName, int uid, EaseCallGetUserAccountCallback callback)Callback when the remote user joins the channel In this case, the user should query the AgoraChat userId corresponding to the uid in the app server through the passed parameter, encapsulate it into aEaseUserAccountobject, and then callback to the callback object passed through the parameter. Success is to call its {@link EaseCallGetUserAccountCallback# onUserAccount (IO. Agora. Chat. Callkit. Beans. EaseUserAccount)} toEaseUserAccountobject is passed. Failure is to call its {@link EaseCallGetUserAccountCallback# onSetUserAccountError (int, Java. Lang. String)} transfer error code and error description .- 参数:
channelName- channel nameuserName- userId(AgoraChat userId)uid- agora uidcallback- a callback object
-
onUserInfoUpdate
default void onUserInfoUpdate(java.lang.String userName)
Notifies the user to update the user information,Fired when a UI change occurs within the Callkit or some change event is received in a channel。 Users can customize user nicknames, images and so on here. Note that the update process is placed in the synchronous method to achieve timely page refresh.Users do not need to achieve this requirement.- 参数:
userName- userId(AgoraChat userId)
-
-