Skip to main content

通话中的事件监听,可以使用通话实体 ICallSession 对象来进行注册。

mCallSession.addListener("SingleCallActivity", this);

回调事件定义如下。

interface ICallSessionListener {
//通话已接通
void onCallConnect();

//通话已结束
void onCallFinish(CallConst.CallFinishReason finishReason);

//通话中的错误回调
void onErrorOccur(CallConst.CallErrorCode errorCode);

// 用户被邀请(多人通话中使用)
void onUsersInvite(String inviterId, List<String> userIdList);

// 用户加入通话(多人通话中使用)
void onUsersConnect(List<String> userIdList);

// 用户退出通话(多人通话中使用)
void onUsersLeave(List<String> userIdList);

// 用户开启/关闭摄像头
void onUserCameraEnable(String userId, boolean enable);

// 用户开启/关闭麦克风
void onUserMicrophoneEnable(String userId, boolean enable);

// 用户声音大小变化
// userId 为 key,声音大小为 value
void onSoundLevelUpdate(HashMap<String, Float> soundLevels);

// 视频渲染第一祯回调
void onVideoFirstFrameRender(String userId);
}