public interface IAgoraEventHandler
Modifier and Type | Method and Description |
---|---|
void |
onApiCallExecuted(int error,
java.lang.String api,
java.lang.String result)
API执行完毕后,该回调会被触发
|
void |
onAudioEffectFinished(int soundId) |
void |
onAudioMixingFinished() |
void |
onAudioMixingPositionChanged(long position) |
void |
onAudioMixingStateChanged(int state,
int reasonCode)
Occurs when the state of the local user's audio mixing file changes.
|
void |
onAudioPublishStateChanged(java.lang.String channel,
int oldState,
int newState,
int elapseSinceLastState)
Occurs when the audio publish state changed.
|
void |
onAudioRouteChanged(int routing) |
void |
onAudioSubscribeStateChanged(java.lang.String channel,
int uid,
int oldState,
int newState,
int elapseSinceLastState)
Occurs when the audio subscribe state changed.
|
void |
onAudioVolumeIndication(IRtcEngineEventHandler.AudioVolumeInfo[] speakers,
int totalVolume)
远端音频流音量强度回调
|
void |
onCameraExposureAreaChanged(Rect rect)
The camera exposure area has changed.
|
void |
onCameraFocusAreaChanged(Rect rect)
摄像头对焦区域或状态发生变化之后,该回调将会被触发
|
void |
onCameraReady()
摄像头设备就绪之后,该回调将被触发
|
void |
onChannelMediaRelayEvent(int code) |
void |
onChannelMediaRelayStateChanged(int state,
int code) |
void |
onClientRoleChanged(int oldRole,
int newRole) |
void |
onClientRoleChangeFailed(int reason,
int currentRole) |
void |
onConnectionBanned()
连接被服务器禁止,该回调会被触发
|
void |
onConnectionInterrupted()
连接意外断开后,该回调会被触发
|
void |
onConnectionLost()
确认连接不可用后,该回调会被调用
|
void |
onConnectionStateChanged(int state,
int reason)
连接状态改变后,该回调会被触发
|
void |
onContentInspectResult(int result) |
void |
onDownlinkNetworkInfoUpdated(IRtcEngineEventHandler.DownlinkNetworkInfo info) |
void |
onEncryptionError(int errorType) |
void |
onError(int err)
错误信息回调
|
void |
onFacePositionChanged(int imageWidth,
int imageHeight,
IRtcEngineEventHandler.AgoraFacePositionInfo[] faceRectArr)
Occurs when the camera exposure area has changed.
|
void |
onFirstLocalAudioFramePublished(int elapsed)
当引擎发送本地首帧音频帧时,该回调会被调用
|
void |
onFirstLocalVideoFrame(Constants.VideoSourceType source,
int width,
int height,
int elapsed)
当引擎获取到本地首帧视频信息之后,该回调会被调用
|
void |
onFirstLocalVideoFramePublished(Constants.VideoSourceType source,
int elapsed)
Occurs when the first video frame is published.
|
void |
onFirstRemoteAudioDecoded(int uid,
int elapsed) |
void |
onFirstRemoteAudioFrame(int uid,
int elapsed) |
void |
onIntraRequestReceived() |
void |
onLastmileProbeResult(IRtcEngineEventHandler.LastmileProbeResult result) |
void |
onLastmileQuality(int quality)
Lastmile测试得到的网络质量回调
|
void |
onLeaveChannel(IRtcEngineEventHandler.RtcStats stats)
退出频道的回调
|
void |
onLicenseValidationFailure(int error)
Occurs when connection license verification fails
You can know the reason according to error code
|
void |
onLocalAudioStats(IRtcEngineEventHandler.LocalAudioStats stats) |
void |
onLocalPublishFallbackToAudioOnly(boolean isFallbackOrRecover) |
void |
onLocalUserRegistered(int uid,
java.lang.String userAccount)
Occurs when the local user successfully registers a user account by calling the
\ref agora::rtc::IRtcEngine::registerLocalUserAccount "registerLocalUserAccount" method
or joins a channel by calling the \ref agora::rtc::IRtcEngine::joinChannelWithUserAccount
"joinChannelWithUserAccount" method.
|
void |
onLocalVideoStat(int sentBitrate,
int sentFrameRate)
Deprecated.
|
void |
onLocalVideoStats(Constants.VideoSourceType source,
IRtcEngineEventHandler.LocalVideoStats stats)
近端视频流质量回调
|
void |
onMediaEngineLoadSuccess() |
void |
onMediaEngineStartCallSuccess() |
void |
onNetworkTypeChanged(int type)
网络类型改变后,该回调会被触发
|
void |
onPermissionError(int permission) |
void |
onRemoteAudioStats(IRtcEngineEventHandler.RemoteAudioStats stats)
远端音频流质量回调
|
void |
onRemoteVideoStats(IRtcEngineEventHandler.RemoteVideoStats stats)
远端视频流质量回调
|
void |
onRequestToken() |
void |
onRtcStats(IRtcEngineEventHandler.RtcStats stats)
状态信息回调
|
void |
onRtmpStreamingEvent(java.lang.String url,
int event) |
void |
onRtmpStreamingStateChanged(java.lang.String url,
int state,
int errCode) |
void |
onSnapshotTaken(int uid,
java.lang.String filePath,
int width,
int height,
int errCode) |
void |
onTokenPrivilegeWillExpire(java.lang.String token) |
void |
onTranscodingUpdated() |
void |
onUplinkNetworkInfoUpdated(IRtcEngineEventHandler.UplinkNetworkInfo info) |
void |
onUploadLogResult(java.lang.String requestId,
boolean success,
int reason)
Reports the user log upload result
|
void |
onUserInfoUpdated(int uid,
UserInfo info)
Occurs when the SDK gets the user ID and user account of the remote user.
|
void |
onUserStateChanged(int uid,
int state)
Occurs when the remote user state is updated.
|
void |
onVideoPublishStateChanged(Constants.VideoSourceType source,
java.lang.String channel,
int oldState,
int newState,
int elapseSinceLastState)
Occurs when the video publish state changed.
|
void |
onVideoStopped()
所有视频流都停止之后,该回调会被触发
|
void |
onVideoSubscribeStateChanged(java.lang.String channel,
int uid,
int oldState,
int newState,
int elapseSinceLastState)
Occurs when the video subscribe state changed.
|
void |
onWarning(int warn)
警告信息回调
|
void |
onWlAccMessage(int reason,
int action,
java.lang.String wlAccMsg)
Occurs when the WIFI message need be sent to the user.
|
void |
onWlAccStats(IRtcEngineEventHandler.WlAccStats currentStats,
IRtcEngineEventHandler.WlAccStats averageStats)
Occurs when SDK statistics WIFI acceleration optimization effect.
|
void onWarning(int warn)
warn
- 警告号void onError(int err)
err
- 错误号void onApiCallExecuted(int error, java.lang.String api, java.lang.String result)
error
- 如果调用失败这里返回错误号,0为成功api
- 所调用的APIresult
- 调用结果void onCameraReady()
void onCameraFocusAreaChanged(Rect rect)
rect
- 对焦的区域void onCameraExposureAreaChanged(Rect rect)
setCameraExposurePosition
method.rect
- Rectangular area in the camera zoom specifying the exposure area.void onContentInspectResult(int result)
void onSnapshotTaken(int uid, java.lang.String filePath, int width, int height, int errCode)
void onFacePositionChanged(int imageWidth, int imageHeight, IRtcEngineEventHandler.AgoraFacePositionInfo[] faceRectArr)
imageWidth
- width of output image.imageHeight
- height of output image.faceRectArr
- Rectangular area in the camera zoom that specifies the focus area.void onVideoStopped()
void onLeaveChannel(IRtcEngineEventHandler.RtcStats stats)
stats
- 状态信息void onRtcStats(IRtcEngineEventHandler.RtcStats stats)
stats
- 状态信息void onAudioVolumeIndication(IRtcEngineEventHandler.AudioVolumeInfo[] speakers, int totalVolume)
speakers
- 音频信息数组,包含每个远端用户的UID及其音量totalVolume
- 所有音频流信息混音后总音量强度void onLastmileQuality(int quality)
quality
- 网络质量评分void onLastmileProbeResult(IRtcEngineEventHandler.LastmileProbeResult result)
@Deprecated void onLocalVideoStat(int sentBitrate, int sentFrameRate)
void onRemoteVideoStats(IRtcEngineEventHandler.RemoteVideoStats stats)
void onRemoteAudioStats(IRtcEngineEventHandler.RemoteAudioStats stats)
void onLocalVideoStats(Constants.VideoSourceType source, IRtcEngineEventHandler.LocalVideoStats stats)
void onLocalAudioStats(IRtcEngineEventHandler.LocalAudioStats stats)
void onFirstLocalVideoFrame(Constants.VideoSourceType source, int width, int height, int elapsed)
width
- 帧宽度height
- 帧高度elapsed
- 此刻距离用户发出登陆请求包的时间间隔void onConnectionLost()
void onConnectionInterrupted()
void onConnectionStateChanged(int state, int reason)
void onNetworkTypeChanged(int type)
void onConnectionBanned()
void onMediaEngineLoadSuccess()
void onMediaEngineStartCallSuccess()
void onAudioMixingFinished()
void onRequestToken()
void onLicenseValidationFailure(int error)
error
- license verify fail reason:
- `LICENSE_ERR_INVALID(1)`: Invalid license.
- `LICENSE_ERR_EXPIRE(2)`: License expired.
- `LICENSE_ERR_MINUTES_EXCEED(3)`: Exceed license minutes limit.
- `LICENSE_ERR_LIMITED_PERIOD(4)`: License use in limited period.
- `LICENSE_ERR_DIFF_DEVICES(5)`: Same license used in different devices at the same time.
- `LICENSE_ERR_INTERNAL(99)`: SDK internal error.void onAudioRouteChanged(int routing)
void onAudioMixingStateChanged(int state, int reasonCode)
state
- The state code. See #AUDIO_MIXING_STATE_*.reasonCode
- The error code. See #AUDIO_MIXING_REASON_*.void onAudioMixingPositionChanged(long position)
position
- Current AudioMixing progress (millisecond).void onFirstLocalAudioFramePublished(int elapsed)
elapsed
- 此刻距离用户发出登陆请求包的时间间隔void onFirstRemoteAudioFrame(int uid, int elapsed)
void onFirstRemoteAudioDecoded(int uid, int elapsed)
void onAudioEffectFinished(int soundId)
void onClientRoleChanged(int oldRole, int newRole)
void onClientRoleChangeFailed(int reason, int currentRole)
void onRtmpStreamingStateChanged(java.lang.String url, int state, int errCode)
void onRtmpStreamingEvent(java.lang.String url, int event)
void onTranscodingUpdated()
void onTokenPrivilegeWillExpire(java.lang.String token)
void onLocalPublishFallbackToAudioOnly(boolean isFallbackOrRecover)
void onChannelMediaRelayStateChanged(int state, int code)
void onChannelMediaRelayEvent(int code)
void onIntraRequestReceived()
void onUplinkNetworkInfoUpdated(IRtcEngineEventHandler.UplinkNetworkInfo info)
void onDownlinkNetworkInfoUpdated(IRtcEngineEventHandler.DownlinkNetworkInfo info)
void onEncryptionError(int errorType)
void onPermissionError(int permission)
void onLocalUserRegistered(int uid, java.lang.String userAccount)
uid
- The ID of the local user.userAccount
- The user account of the local user.void onUserInfoUpdated(int uid, UserInfo info)
uid
- The ID of the remote user.info
- The `UserInfo` object that contains the user ID and user account of the remote user.void onUserStateChanged(int uid, int state)
uid
- The uid of the remote user.state
- The remote user state. Just & #REMOTE_USER_STATEvoid onFirstLocalVideoFramePublished(Constants.VideoSourceType source, int elapsed)
elapsed
- The time elapsed (ms) from the local user calling joinChannel to the SDK
triggers this callback.void onAudioSubscribeStateChanged(java.lang.String channel, int uid, int oldState, int newState, int elapseSinceLastState)
channel
- The channel name of user joined.uid
- The remote user ID that is subscribed to.oldState
- The old state of the audio stream subscribe :
#STREAM_SUBSCRIBE_STATE.newState
- The new state of the audio stream subscribe :
#STREAM_SUBSCRIBE_STATE.elapseSinceLastState
- The time elapsed (ms) from the old state to the new state.void onVideoSubscribeStateChanged(java.lang.String channel, int uid, int oldState, int newState, int elapseSinceLastState)
channel
- The channel name of user joined.uid
- The remote user ID that is subscribed to.oldState
- The old state of the video stream subscribe :
#STREAM_SUBSCRIBE_STATE.newState
- The new state of the video stream subscribe :
#STREAM_SUBSCRIBE_STATE.elapseSinceLastState
- The time elapsed (ms) from the old state to the new state.void onAudioPublishStateChanged(java.lang.String channel, int oldState, int newState, int elapseSinceLastState)
channel
- The channel name of user joined.oldState
- The old state of the audio stream publish : #STREAM_PUBLISH_STATE.newState
- The new state of the audio stream publish : #STREAM_PUBLISH_STATE.elapseSinceLastState
- The time elapsed (ms) from the old state to the new state.void onVideoPublishStateChanged(Constants.VideoSourceType source, java.lang.String channel, int oldState, int newState, int elapseSinceLastState)
source
- source type of the originated video source.channel
- The channel name of user joined.oldState
- The old state of the video stream publish : #STREAM_PUBLISH_STATE.newState
- The new state of the video stream publish : #STREAM_PUBLISH_STATE.elapseSinceLastState
- The time elapsed (ms) from the old state to the new state.void onUploadLogResult(java.lang.String requestId, boolean success, int reason)
requestId
- RequestId of the uploadsuccess
- Is upload successreason
- Reason of the upload, 0: OK, 1 Network Error, 2 Server Error.void onWlAccMessage(int reason, int action, java.lang.String wlAccMsg)
reason
- The reason of notifying the user of a message.action
- Suggest an action for the user.wlAccMsg
- Notification message to the user.void onWlAccStats(IRtcEngineEventHandler.WlAccStats currentStats, IRtcEngineEventHandler.WlAccStats averageStats)
currentStats
- Instantaneous value of optimization effect.averageStats
- Average value of cumulative optimization effect.