public interface AgoraRtcEvents
Modifier and Type | Method and Description |
---|---|
void |
onAudioData(int connId,
int uid,
int sent_ts,
byte[] data,
AgoraRtcService.AudioFrameInfo info)
Occurs when receiving the audio frame of a remote user in the channel.
|
void |
onConnectionLost(int connId)
Occurs when connection of channel is disconnected from the server more than 10s
|
void |
onError(int connId,
int code,
java.lang.String msg)
Report error message during runtime.
|
void |
onJoinChannelSuccess(int connId,
int uid,
int elapsed_ms)
Occurs when local user joins channel successfully.
|
void |
onKeyFrameGenReq(int connId,
int requestedUid,
int streamType)
Occurs when a remote user requests a keyframe.
|
void |
onLicenseValidationFailure(int connId,
int error)
Occurs when connection license verification fails
You can know the reason accordding to error code
|
void |
onMediaCtrlMsg(int connId,
int uid,
byte[] payload)
Occur when receive a media ctrl message.
|
void |
onMixedAudioData(int connId,
byte[] data,
AgoraRtcService.AudioFrameInfo info)
Occurs every 20ms.
|
void |
onRdtMsg(int connId,
int uid,
int type,
byte[] msg)
Occur when receive rdt message from uid
|
void |
onRdtState(int connId,
int uid,
int state)
Occur when user rdt state changed
|
void |
onReconnecting(int connId)
Occurs when the connection of channel is interrupt or keepalive timeout(4s).
|
void |
onRejoinChannelSuccess(int connId,
int uid,
int elapsed_ms)
Occurs when local user rejoins channel successfully after disconnect
When channel loses connection with server due to network problems,
SDK will retry to connect automatically.
|
void |
onTargetBitrateChanged(int connId,
int target_bps)
Occurs when network bandwidth change is detected.
|
void |
onTokenPrivilegeWillExpire(int connId,
java.lang.String token)
Occurs when token will expired.
|
void |
onUserJoined(int connId,
int uid,
int elapsed_ms)
Occurs when a remote user joins channel successfully.
|
void |
onUserMuteAudio(int connId,
int uid,
boolean muted)
Occurs when a remote user sends notification before enable/disable sending audio.
|
void |
onUserMuteVideo(int connId,
int uid,
boolean muted)
Occurs when a remote user sends notification before enable/disable sending video.
|
void |
onUserOffline(int connId,
int uid,
int reason)
Occur when remote user leaves the channel.
|
void |
onVideoData(int connId,
int uid,
int sent_ts,
byte[] data,
AgoraRtcService.VideoFrameInfo info)
Occurs when receiving the video frame of a remote user in the channel.
|
void onJoinChannelSuccess(int connId, int uid, int elapsed_ms)
connId
- Connection identificationuid
- local uidelapsed_ms
- Time elapsed (ms) since channel is establishedvoid onReconnecting(int connId)
connId
- Connection identificationvoid onConnectionLost(int connId)
connId
- Connection identificationvoid onRejoinChannelSuccess(int connId, int uid, int elapsed_ms)
connId
- Connection identificationuid
- local uidelapsed_ms
- Time elapsed (ms) since rejoin due to networkvoid onLicenseValidationFailure(int connId, int error)
connId
- Connection identificationerror
- Error code, see #license_err_code_evoid onError(int connId, int code, java.lang.String msg)
connId
- Connection identificationcode
- Error code, see #agora_err_code_emsg
- Error messagevoid onUserJoined(int connId, int uid, int elapsed_ms)
connId
- Connection identificationuid
- Remote user IDelapsed_ms
- Time elapsed (ms) since channel is establishedvoid onUserOffline(int connId, int uid, int reason)
connId
- Connection identificationuid
- Remote user IDreason
- Reason:
- 0: USER_OFFLINE_QUIT remote user leaves channel actively
- 1: USER_OFFLINE_DROPPED remote user is dropped when timeoutvoid onUserMuteAudio(int connId, int uid, boolean muted)
connId
- Connection identificationuid
- Remote user IDmuted
- Mute status:
- false(0): unmuted
- true (1): mutedvoid onUserMuteVideo(int connId, int uid, boolean muted)
connId
- Connection identificationuid
- Remote user IDmuted
- Mute status:
- false(0): unmuted
- true (1): mutedvoid onKeyFrameGenReq(int connId, int requestedUid, int streamType)
connId
- Connection identificationrequestedUid
- Remote user IDstreamType
- Stream type for which a keyframe is requested, #VideoStreamTypevoid onAudioData(int connId, int uid, int sent_ts, byte[] data, AgoraRtcService.AudioFrameInfo info)
connId
- Connection identificationuid
- Remote user ID to which data is sentsent_ts
- Timestamp (ms) for sending datadata
- Audio frame bufferinfo
- Audio frame infovoid onMixedAudioData(int connId, byte[] data, AgoraRtcService.AudioFrameInfo info)
connId
- Connection identificationdata
- Audio frame bufferinfo
- Audio frame infovoid onVideoData(int connId, int uid, int sent_ts, byte[] data, AgoraRtcService.VideoFrameInfo info)
connId
- Connection identificationuid
- Remote user ID to which data is sentsent_ts
- Timestamp (ms) for sending datadata
- Video frame bufferinfo
- Video frame infovoid onTargetBitrateChanged(int connId, int target_bps)
connId
- Connection identificationtarget_bps
- Target value (bps) by which the bitrate should updatevoid onTokenPrivilegeWillExpire(int connId, java.lang.String token)
connId
- Connection identificationtoken
- The token will expirevoid onMediaCtrlMsg(int connId, int uid, byte[] payload)
connId
- Connection identificationuid
- Remote user IDpayload
- payload of messagevoid onRdtState(int connId, int uid, int state)
void onRdtMsg(int connId, int uid, int type, byte[] msg)