Skip to main content

请在 IM 连接成功的状态下,传入对方的 userId 进行呼叫。开发者需要提前向用户申请麦克风和摄像头权限。

//发起单人视频呼叫
ICallSession callSession = JIM.getInstance().getCallManager().startSingleCall(userId, CallConst.CallMediaType.VIDEO, null);

//发起单人音频呼叫
ICallSession callSession = JIM.getInstance().getCallManager().startSingleCall(userId, CallConst.CallMediaType.VOICE, null);

可以同时传入多个的 userId 进行多人呼叫。同样需要提前向用户申请麦克风和摄像头权限。

//发起多人视频呼叫
ICallSession callSession = JIM.getInstance().getCallManager().startMultiCall(userIdList, CallConst.CallMediaType.VIDEO, null);

//发起多人音频呼叫
ICallSession callSession = JIM.getInstance().getCallManager().startMultiCall(userIdList, CallConst.CallMediaType.VOICE, null);