Interface IRongCallListener
-
- All Implemented Interfaces:
public interface IRongCallListener
通话事件监听
-
-
Method Summary
Modifier and Type Method Description abstract void
onCallIncoming(RongCallSession callSession, SurfaceView localVideo)
接收到来电。 被叫端收到来电后,通过回调 onCallIncoming 通知当前 call 的详细信息。 abstract void
onCallOutgoing(RongCallSession callSession, SurfaceView localVideo)
电话已拨出。 主叫端拨出电话后,通过回调 onCallOutgoing 通知当前 call 的详细信息。 abstract void
onCallConnected(RongCallSession callSession, SurfaceView localVideo)
已建立通话。 通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息。 abstract void
onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason)
通话结束。 通话中,对方挂断,己方挂断,或者通话过程网络异常造成的通话中断,都会回调 onCallDisconnected。 abstract void
onRemoteUserRinging(String userId)
被叫端正在振铃。 主叫端拨出电话,被叫端收到请求,发出振铃响应时,回调 onRemoteUserRinging。 abstract void
onRemoteUserAccept(String userId, RongCallCommon.CallMediaType mediaType)
Add From 5.1. abstract void
onRemoteUserJoined(String userId, RongCallCommon.CallMediaType mediaType, int userType, SurfaceView remoteVideo)
被叫端加入通话。 主叫端拨出电话,被叫端收到请求后,加入通话,回调 onRemoteUserJoined。 abstract void
onRemoteUserInvited(String userId, RongCallCommon.CallMediaType mediaType)
通话中的某一个参与者,邀请好友加入通话,发出邀请请求后,回调 onRemoteUserInvited。 abstract void
onRemoteUserLeft(String userId, RongCallCommon.CallDisconnectedReason reason)
通话中的远端参与者离开。 回调 onRemoteUserLeft 通知状态更新。 abstract void
onMediaTypeChanged(String userId, RongCallCommon.CallMediaType mediaType, SurfaceView video)
当通话中的某一个参与者切换通话类型,例如由 audio 切换至 video,回调 onMediaTypeChanged。 abstract void
onError(RongCallCommon.CallErrorCode errorCode)
通话过程中,发生异常。 abstract void
onRemoteCameraDisabled(String userId, boolean disabled)
远端参与者 camera 状态发生变化时,回调 onRemoteCameraDisabled 通知状态变化。 abstract void
onRemoteMicrophoneDisabled(String userId, boolean disabled)
远端参与者 麦克风 状态发生变化时,回调 onRemoteMicrophoneDisabled 通知状态变化。 abstract void
onNetworkReceiveLost(String userId, int lossRate)
接收丢包率信息回调 abstract void
onNetworkSendLost(int lossRate, int delay)
发送丢包率信息回调 abstract void
onFirstRemoteVideoFrame(String userId, int height, int width)
收到某个用户的第一帧视频数据 abstract void
onFirstRemoteAudioFrame(String userId)
收到某个用户的第一帧音频数据 abstract void
onAudioLevelSend(String audioLevel)
本端音量大小回调 abstract void
onAudioLevelReceive(HashMap<String, String> audioLevel)
对端音量大小回调 abstract void
onRemoteUserPublishVideoStream(String userId, String streamId, String tag, SurfaceView surfaceView)
远端用户发布了自定义视频流 调用RongCallClient.getInstance(). abstract void
onRemoteUserUnpublishVideoStream(String userId, String streamId, String tag)
远端用户取消发布自定义视频流 -
-
Method Detail
-
onCallIncoming
@Deprecated() abstract void onCallIncoming(RongCallSession callSession, SurfaceView localVideo)
接收到来电。 被叫端收到来电后,通过回调 onCallIncoming 通知当前 call 的详细信息。
- Parameters:
callSession
- 通话实体。localVideo
- 本地 camera 信息。localVideo=null,不建议使用。如果想实现接听端预览功能请在收到通话邀请后调用 startIncomingPreview 实现。
-
onCallOutgoing
abstract void onCallOutgoing(RongCallSession callSession, SurfaceView localVideo)
电话已拨出。 主叫端拨出电话后,通过回调 onCallOutgoing 通知当前 call 的详细信息。
- Parameters:
callSession
- 通话实体。localVideo
- 本地 camera 信息。
-
onCallConnected
abstract void onCallConnected(RongCallSession callSession, SurfaceView localVideo)
已建立通话。 通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息。
- Parameters:
callSession
- 通话实体。localVideo
- 本地 camera 信息。
-
onCallDisconnected
abstract void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason)
通话结束。 通话中,对方挂断,己方挂断,或者通话过程网络异常造成的通话中断,都会回调 onCallDisconnected。
- Parameters:
callSession
- 通话实体。reason
- 通话中断原因。
-
onRemoteUserRinging
abstract void onRemoteUserRinging(String userId)
被叫端正在振铃。 主叫端拨出电话,被叫端收到请求,发出振铃响应时,回调 onRemoteUserRinging。
- Parameters:
userId
- 振铃端用户 id。
-
onRemoteUserAccept
abstract void onRemoteUserAccept(String userId, RongCallCommon.CallMediaType mediaType)
Add From 5.1.12
远端用户接听时回调 onRemoteUserAccept
- Parameters:
userId
- 接听的用户 idmediaType
- 加入用户的媒体类型,audio or video。
-
onRemoteUserJoined
abstract void onRemoteUserJoined(String userId, RongCallCommon.CallMediaType mediaType, int userType, SurfaceView remoteVideo)
被叫端加入通话。 主叫端拨出电话,被叫端收到请求后,加入通话,回调 onRemoteUserJoined。
- Parameters:
userId
- 加入用户的 id。mediaType
- 加入用户的媒体类型,audio or video。userType
- 加入用户的类型,1:正常用户,2:观察者。remoteVideo
- 加入用户者的 camera 信息。如果 userType为2,remoteVideo对象为空;如果对端调用startCall 或 acceptCall开始的音视频通话,则可以使用如下设置改变对端视频流的镜像显示:public void onRemoteUserJoined(String userId, RongCallCommon.CallMediaType mediaType, int userType, SurfaceView remoteVideo) { if (null != remoteVideo) { ((RCRTCVideoView) remoteVideo).setMirror( boolean);//观看对方视频流是否镜像处理 } }
-
onRemoteUserInvited
abstract void onRemoteUserInvited(String userId, RongCallCommon.CallMediaType mediaType)
通话中的某一个参与者,邀请好友加入通话,发出邀请请求后,回调 onRemoteUserInvited。
- Parameters:
userId
- 被邀请者的ID ,可以通过RongCallClient.getInstance().getCallSession().getObserverUserList().
-
onRemoteUserLeft
abstract void onRemoteUserLeft(String userId, RongCallCommon.CallDisconnectedReason reason)
通话中的远端参与者离开。 回调 onRemoteUserLeft 通知状态更新。
- Parameters:
userId
- 远端参与者的 id。reason
- 远端参与者离开原因。
-
onMediaTypeChanged
abstract void onMediaTypeChanged(String userId, RongCallCommon.CallMediaType mediaType, SurfaceView video)
当通话中的某一个参与者切换通话类型,例如由 audio 切换至 video,回调 onMediaTypeChanged。
- Parameters:
userId
- 切换者的 userId。mediaType
- 切换者,切换后的媒体类型。video
- 切换者,切换后的 camera 信息,如果由 video 切换至 audio,则为 null。
-
onError
abstract void onError(RongCallCommon.CallErrorCode errorCode)
通话过程中,发生异常。
- Parameters:
errorCode
- 异常原因。
-
onRemoteCameraDisabled
abstract void onRemoteCameraDisabled(String userId, boolean disabled)
远端参与者 camera 状态发生变化时,回调 onRemoteCameraDisabled 通知状态变化。
- Parameters:
userId
- 远端参与者 id。disabled
- 远端参与者 camera 是否可用。
-
onRemoteMicrophoneDisabled
abstract void onRemoteMicrophoneDisabled(String userId, boolean disabled)
远端参与者 麦克风 状态发生变化时,回调 onRemoteMicrophoneDisabled 通知状态变化。
- Parameters:
userId
- 远端参与者 id。disabled
- 远端参与者 Microphone 是否可用。
-
onNetworkReceiveLost
abstract void onNetworkReceiveLost(String userId, int lossRate)
接收丢包率信息回调
- Parameters:
userId
- 远端用户的IDlossRate
- 丟包率:0-100
-
onNetworkSendLost
abstract void onNetworkSendLost(int lossRate, int delay)
发送丢包率信息回调
- Parameters:
lossRate
- 丢包率,0-100delay
- 发送端的网络延迟
-
onFirstRemoteVideoFrame
abstract void onFirstRemoteVideoFrame(String userId, int height, int width)
收到某个用户的第一帧视频数据
-
onFirstRemoteAudioFrame
abstract void onFirstRemoteAudioFrame(String userId)
收到某个用户的第一帧音频数据
-
onAudioLevelSend
abstract void onAudioLevelSend(String audioLevel)
本端音量大小回调
-
onAudioLevelReceive
abstract void onAudioLevelReceive(HashMap<String, String> audioLevel)
对端音量大小回调
- Parameters:
audioLevel
- key:userId , value:音量等级
-
onRemoteUserPublishVideoStream
abstract void onRemoteUserPublishVideoStream(String userId, String streamId, String tag, SurfaceView surfaceView)
远端用户发布了自定义视频流
调用RongCallClient.getInstance().publishCustomVideoStream(String tag, publishCallBack callBack) 方法发布自定义视频流
- Parameters:
userId
- 用户 IDstreamId
- 自定义视频流 idtag
- 自定义视频流 tagsurfaceView
- 自定义视频流视图
-
onRemoteUserUnpublishVideoStream
abstract void onRemoteUserUnpublishVideoStream(String userId, String streamId, String tag)
远端用户取消发布自定义视频流
- Parameters:
userId
- 用户 IDstreamId
- 自定义视频流 idtag
- 自定义视频流 tag
-
-
-
-