IRCCallPlusEventListener

public interface IRCCallPlusEventListener

Functions

Link copied to clipboard
public void onCallConnected(RCCallPlusSession callSession)
通话建立成功。
Link copied to clipboard
public void onCallEnded(RCCallPlusSession session, RCCallPlusReason reason)
己方参与过的通话结束时,收到该通话结束通知。如果本端正在进行中的通话结束后,getCurrentCallSession 会为空。
Link copied to clipboard
public void onCallFirstFrameTimeFromServer(long callFirstFrameTime)
客户端收到首帧时间戳(当前时间到1970-1-1 00:00:00的总毫秒数)。
Link copied to clipboard
public void onCallStartTimeFromServer(long callStartTime)
通话开始时间戳(当前时间到1970-1-1 00:00:00的总毫秒数)。
Link copied to clipboard
public void onCallTypeChanged(String callId, RCCallPlusType callType)
单人通话时(PRIVATE),调用 invite 邀请其他人员成功,当前通话升级为群通话(MULTI)
Link copied to clipboard
public void onFirstLocalVideoFrame(int width, int height)
接收到本端摄像头流首帧回调。
Link copied to clipboard
public void onFirstRemoteAudioFrame(String userId)
接收到远端音频流首帧回调。
Link copied to clipboard
public void onFirstRemoteVideoFrame(String userId, int width, int height)
接收到远端视频流首帧回调。
Link copied to clipboard
public abstract void onReceivedCall(RCCallPlusSession callSession, String extra)
本端用户通过该回调接收到通话呼叫。 该方法回调场景:
  1. 本端用户没有正在进行中的音视频通话(getCurrentCallSession 获取的对象为空)时,远端用户通过 startCall 、invite 函数邀请本端用户进行通话。
  2. 本端用户正在进行音视频通话(getCurrentCallSession 获取的对象不为空)时,远端用户通过 startCall、invite 函数邀请本端用户进行通话。
如果本端用户需要接听该通话,需要先调用 hangup 方法挂断当前正在进行中的通话。再调用 accept 方法接听。 判断本端是否正在进行通话,又收到第二通呼叫方法:


public void onReceivedCall(RCCallPlusSession callSession) {
    RCCallPlusSession currentCallSession = RCCallPlusClient.getInstance().getCurrentCallSession();
    if (currentCallSession != null && !TextUtils.equals(callSession.getCallId(), currentCallSession.getCallId())) {
        //在此处理有正在进行中的通话,又有第二通通话呼入的情况
        //需要挂断 currentCallSession ,再接听新的通话
    }
}

Link copied to clipboard
public void onReceivedCallPlusSummaryMessage(Message message)
己方参与过的通话结束时,通话消息监听回调 目前,本回调仅在单人通话结束时(通话类型为PRIVATE)触发,并返回相应的信息。 在 IM Lib 登录成功后,将获取离线时产生的通话消息()。为了确保在登录成功后立即获取到这些消息,请在IM Lib初始化之前注册监听器:setCallPlusEventListener
Link copied to clipboard
public void onReceivedCallRecord(RCCallPlusCallRecord record)
己方参与过的通话结束时,收到该通话的通话记录。
Link copied to clipboard
public void onReceivedChangeMediaTypeRequest(String transactionId, String userId, RCCallPlusMediaType mediaType)
远端用户调用请求切换媒体 requestChangeMediaType 成功后收到 。
Link copied to clipboard
public void onReceivedChangeMediaTypeResult(String transactionId, String userId, RCCallPlusMediaType mediaType, RCCallPlusMediaTypeChangeResult result)
通话媒体类型应答回调。
Link copied to clipboard
public void onRemoteCameraStateChanged(String callId, String userId, boolean disabled)
远端用户摄像头状态改变监听。
Link copied to clipboard
public void onRemoteMicrophoneStateChanged(String callId, String userId, boolean disabled)
远端用户麦克风状态改变监听。
Link copied to clipboard
public void onRemoteUserInvited(String callId, ArrayList<String> inviteeUserList, String inviterUserId)
远端用户被邀请回调。
Link copied to clipboard
public void onRemoteUserStateChanged(String callId, String userId, RCCallPlusUserSessionStatus status, RCCallPlusReason reason)
远端用户状态改变监听。
Link copied to clipboard
public void onUserAudioLevelChanged(HashMap<String, Integer> hashMap)
用户音量改变回调,每秒回调一次。