|
void | onJoinChannelSuccess (int connId, int uid, int elapsed_ms) |
|
void | onConnectionLost (int connId) |
|
void | onRejoinChannelSuccess (int connId, int uid, int elapsed_ms) |
|
void | onError (int connId, int code, String msg) |
|
void | onUserJoined (int connId, int uid, int elapsed_ms) |
|
void | onUserOffline (int connId, int uid, int reason) |
|
void | onUserMuteAudio (int connId, int uid, boolean muted) |
|
void | onUserMuteVideo (int connId, int uid, boolean muted) |
|
void | onKeyFrameGenReq (int connId, int requested_uid, int stream_type) |
|
void | onAudioData (int connId, int uid, int sent_ts, byte[] data, AudioFrameInfo info) |
|
void | onMixedAudioData (int connId, byte[] data, AudioFrameInfo info) |
|
void | onVideoData (int connId, int uid, int sent_ts, byte[] data, VideoFrameInfo info) |
|
void | onTargetBitrateChanged (int connId, int target_bps) |
|
void | onTokenPrivilegeWillExpire (int connId, String token) |
|
◆ onAudioData()
void io.agora.rtc.AgoraRtcEvents.onAudioData |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
sent_ts, |
|
|
byte[] |
data, |
|
|
AudioFrameInfo |
info |
|
) |
| |
Occurs when receiving the audio frame of a remote user in the channel.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
sent_ts | Unix timestamp (ms) of the time when the remote user calls sendAudioData to send data. |
data | Audio frame buffer. |
info | Audio frame information. |
◆ onConnectionLost()
void io.agora.rtc.AgoraRtcEvents.onConnectionLost |
( |
int |
connId | ) |
|
Occurs when the local user disconnects from an RTC channel.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
◆ onError()
void io.agora.rtc.AgoraRtcEvents.onError |
( |
int |
connId, |
|
|
int |
code, |
|
|
String |
msg |
|
) |
| |
Occurs when the SDK reports an error.
In most cases, it means the SDK cannot recover from the error and you must take actions accordingly.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
code | Error code. |
msg | Error message. |
◆ onJoinChannelSuccess()
void io.agora.rtc.AgoraRtcEvents.onJoinChannelSuccess |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
elapsed_ms |
|
) |
| |
Occurs when the local user joins an RTC channel successfully.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | User ID. |
elapsed_ms | Time elapsed (ms) since the local user joins an RTC channel. |
◆ onKeyFrameGenReq()
void io.agora.rtc.AgoraRtcEvents.onKeyFrameGenReq |
( |
int |
connId, |
|
|
int |
requested_uid, |
|
|
int |
stream_type |
|
) |
| |
Occurs when a remote user requests a keyframe.
This callback notifies the sender to generate a new keyframe.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
requested_uid | Remote user ID. |
stream_type | Stream type of the keyframe. |
◆ onMixedAudioData()
void io.agora.rtc.AgoraRtcEvents.onMixedAudioData |
( |
int |
connId, |
|
|
byte[] |
data, |
|
|
AudioFrameInfo |
info |
|
) |
| |
Occurs when receiving the mixed audio frame of local and remote users. This callback occurs every 20 ms.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
data | Audio frame buffer. |
info | Audio frame information. |
◆ onRejoinChannelSuccess()
void io.agora.rtc.AgoraRtcEvents.onRejoinChannelSuccess |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
elapsed_ms |
|
) |
| |
Occurs when the local user rejoins an RTC channel successfully.
When the client disconnects from the RTC channel due to network issues, the SDK reconnects to the RTC channel and triggers this callback if successful.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | User ID. |
elapsed_ms | Time elapsed (ms) since the local user rejoins an RTC channel. |
◆ onTargetBitrateChanged()
void io.agora.rtc.AgoraRtcEvents.onTargetBitrateChanged |
( |
int |
connId, |
|
|
int |
target_bps |
|
) |
| |
Occurs when network bandwidth change is detected. Use this callback to adjust your bitrate.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
target_bps | Target value (bps) that you are recommended to set the bitrate to. |
◆ onTokenPrivilegeWillExpire()
void io.agora.rtc.AgoraRtcEvents.onTokenPrivilegeWillExpire |
( |
int |
connId, |
|
|
String |
token |
|
) |
| |
Occurs when the RTC token expires in 30 seconds.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
token | The RTC token which is about to expire. |
If you specify the RTC token when calling joinChannel, the SDK triggers this callback if the RTC token expires in 30 seconds. You must request a new RTC token from your app server, and call renewToken to pass the new RTC token to the SDK.
◆ onUserJoined()
void io.agora.rtc.AgoraRtcEvents.onUserJoined |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
elapsed_ms |
|
) |
| |
Occurs when a remote user joins an RTC channel successfully.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
elapsed_ms | Time elapsed (ms) since the remote user joins the RTC channel. |
◆ onUserMuteAudio()
void io.agora.rtc.AgoraRtcEvents.onUserMuteAudio |
( |
int |
connId, |
|
|
int |
uid, |
|
|
boolean |
muted |
|
) |
| |
Occurs when a remote user enables/disables sending audio.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
muted | Enables/disables sending audio.
- false: Enables sending audio.
- true: Disables sending audio.
|
◆ onUserMuteVideo()
void io.agora.rtc.AgoraRtcEvents.onUserMuteVideo |
( |
int |
connId, |
|
|
int |
uid, |
|
|
boolean |
muted |
|
) |
| |
Occurs when a remote user enables/disables sending video.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
muted | Enables/disables sending video.
- false: Enables sending video.
- true: Disables sending video.
|
◆ onUserOffline()
void io.agora.rtc.AgoraRtcEvents.onUserOffline |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
reason |
|
) |
| |
Occurs when a remote user leaves an RTC channel.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
reason | Reason why the remote user leaves the RTC channel.
-
USER_OFFLINE_QUIT (0): The remote user leaves the RTC channel by calling
leave .
-
USER_OFFLINE_DROPPED (1): The remote user drops offline.
|
◆ onVideoData()
void io.agora.rtc.AgoraRtcEvents.onVideoData |
( |
int |
connId, |
|
|
int |
uid, |
|
|
int |
sent_ts, |
|
|
byte[] |
data, |
|
|
VideoFrameInfo |
info |
|
) |
| |
Occurs when receiving the video frame of a remote user in the channel.
- Parameters
-
connId | Connection ID. A connection can correspond to multiple RTC channels. |
uid | Remote user ID. |
sent_ts | Timestamp (ms) for sending data. |
data | Video frame buffer. |
info | Video frame info. |
The documentation for this interface was generated from the following file: