Agora Server Gateway SDK Java API Reference
|
Public Member Functions | |
void | onAudioTrackPublishSuccess (AgoraLocalUser agora_local_user, AgoraLocalAudioTrack agora_local_audio_track) |
void | onLocalAudioTrackStateChanged (AgoraLocalUser agora_local_user, AgoraLocalAudioTrack agora_local_audio_track, int state, int error) |
void | onLocalAudioTrackStatistics (AgoraLocalUser agora_local_user, LocalAudioStats stats) |
void | onRemoteAudioTrackStatistics (AgoraLocalUser agora_local_user, AgoraRemoteAudioTrack agora_remote_audio_track, RemoteAudioTrackStats stats) |
void | onUserAudioTrackSubscribed (AgoraLocalUser agora_local_user, String user_id, AgoraRemoteAudioTrack agora_remote_audio_track) |
void | onUserAudioTrackStateChanged (AgoraLocalUser agora_local_user, String user_id, AgoraRemoteAudioTrack agora_remote_audio_track, int state, int reason, int elapsed) |
void | onAudioSubscribeStateChanged (AgoraLocalUser agora_local_user, String channel, String user_id, int old_state, int new_state, int elapse_since_last_state) |
void | onAudioPublishStateChanged (AgoraLocalUser agora_local_user, String channel, int old_state, int new_state, int elapse_since_last_state) |
void | onFirstRemoteAudioFrame (AgoraLocalUser agora_local_user, String user_id, int elapsed) |
void | onFirstRemoteAudioDecoded (AgoraLocalUser agora_local_user, String user_id, int elapsed) |
void | onVideoTrackPublishSuccess (AgoraLocalUser agora_local_user, AgoraLocalVideoTrack agora_local_video_track) |
void | onLocalVideoTrackStateChanged (AgoraLocalUser agora_local_user, AgoraLocalVideoTrack agora_local_video_track, int state, int error) |
void | onLocalVideoTrackStatistics (AgoraLocalUser agora_local_user, AgoraLocalVideoTrack agora_local_video_track, LocalVideoTrackStats stats) |
void | onUserVideoTrackSubscribed (AgoraLocalUser agora_local_user, String user_id, VideoTrackInfo info, AgoraRemoteVideoTrack agora_remote_video_track) |
void | onUserVideoTrackStateChanged (AgoraLocalUser agora_local_user, String user_id, AgoraRemoteVideoTrack agora_remote_video_track, int state, int reason, int elapsed) |
void | onRemoteVideoTrackStatistics (AgoraLocalUser agora_local_user, AgoraRemoteVideoTrack agora_remote_video_track, RemoteVideoTrackStats stats) |
void | onVideoSubscribeStateChanged (AgoraLocalUser agora_local_user, String channel, String user_id, int old_state, int new_state, int elapse_since_last_state) |
void | onVideoPublishStateChanged (AgoraLocalUser agora_local_user, String channel, int old_state, int new_state, int elapse_since_last_state) |
void | onFirstRemoteVideoFrame (AgoraLocalUser agora_local_user, String user_id, int width, int height, int elapsed) |
void | onFirstRemoteVideoDecoded (AgoraLocalUser agora_local_user, String user_id, int width, int height, int elapsed) |
void | onUserInfoUpdated (AgoraLocalUser agora_local_user, String user_id, int msg, int val) |
void | onIntraRequestReceived (AgoraLocalUser agora_local_user) |
void | onRemoteSubscribeFallbackToAudioOnly (AgoraLocalUser agora_local_user, String user_id, int is_fallback_or_recover) |
void | onStreamMessage (AgoraLocalUser agora_local_user, String user_id, int stream_id, String data, long length) |
void | onUserStateChanged (AgoraLocalUser agora_local_user, String user_id, int state) |
The ILocalUserObserver
interface.
void io.agora.rtc.ILocalUserObserver.onAudioPublishStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | channel, | ||
int | old_state, | ||
int | new_state, | ||
int | elapse_since_last_state | ||
) |
Occurs when the audio publish state changed.
agora_local_user | An AgoraLocalUser object. |
channel | The channel name of user joined. |
old_state | The old state of the audio stream publishing.
|
new_state | The new state of the audio stream publishing.
|
elapse_since_last_state | The time elapsed (ms) from the old state to the new state. |
void io.agora.rtc.ILocalUserObserver.onAudioSubscribeStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | channel, | ||
String | user_id, | ||
int | old_state, | ||
int | new_state, | ||
int | elapse_since_last_state | ||
) |
Occurs when the audio subscribe state changed.
agora_local_user | An AgoraLocalUser object. |
channel | The channel name of user joined. |
user_id | The remote string user ID that is subscribed to. |
old_state | The old state of the audio stream subscription.
|
new_state | The new state of the audio stream subscription.
|
elapse_since_last_state | The time elapsed (ms) from the old state to the new state. |
void io.agora.rtc.ILocalUserObserver.onAudioTrackPublishSuccess | ( | AgoraLocalUser | agora_local_user, |
AgoraLocalAudioTrack | agora_local_audio_track | ||
) |
Occurs when the first packet of the local audio track is sent, indicating that the local audio track is successfully published.
agora_local_user | An AgoraLocalUser object. |
agora_local_audio_track | An AgoraLocalAudioTrack object. |
void io.agora.rtc.ILocalUserObserver.onFirstRemoteAudioDecoded | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | elapsed | ||
) |
Occurs when the SDK decodes the first remote audio frame for playback.
agora_local_user | An AgoraLocalUser object. |
user_id | ID of the remote user. |
elapsed | The time (ms) since the user connects to an Agora channel. |
void io.agora.rtc.ILocalUserObserver.onFirstRemoteAudioFrame | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | elapsed | ||
) |
Occurs when the first remote audio frame is received.
agora_local_user | An AgoraLocalUser object. |
user_id | ID of the remote user. |
elapsed | The time (ms) since the user connects to an Agora channel. |
void io.agora.rtc.ILocalUserObserver.onFirstRemoteVideoDecoded | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | width, | ||
int | height, | ||
int | elapsed | ||
) |
Occurs when the SDK decodes the first remote video frame for playback.
agora_local_user | An AgoraLocalUser object. |
user_id | ID of the remote user. |
width | Width (px) of the video stream. |
height | Height (px) of the video stream. |
elapsed | The time (ms) since the user connects to an Agora channel. |
void io.agora.rtc.ILocalUserObserver.onFirstRemoteVideoFrame | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | width, | ||
int | height, | ||
int | elapsed | ||
) |
Occurs when the first remote video frame is rendered. The SDK triggers this callback when the first frame of the remote video is displayed in the user's video window. The application can get the time elapsed from a user joining the channel until the first video frame is displayed.
agora_local_user | An AgoraLocalUser object. |
user_id | ID of the remote user. |
width | Width (px) of the video frame. |
height | Height (px) of the video stream. |
elapsed | Time elapsed (ms) from the time when the user connects to the channel to the time when the SDK triggers this callback. |
void io.agora.rtc.ILocalUserObserver.onIntraRequestReceived | ( | AgoraLocalUser | agora_local_user | ) |
Occurs when the intra request is received from a remote user. The method notifies the local user to encode a key frame.
agora_local_user | An AgoraLocalUser object. |
void io.agora.rtc.ILocalUserObserver.onLocalAudioTrackStateChanged | ( | AgoraLocalUser | agora_local_user, |
AgoraLocalAudioTrack | agora_local_audio_track, | ||
int | state, | ||
int | error | ||
) |
Occurs when the state of a local audio track changes.
agora_local_user | An AgoraLocalUser object. |
agora_local_audio_track | The pointer to ILocalAudioTrack . |
state | The state of the local audio track.
|
error | The error information for a state failure.
|
void io.agora.rtc.ILocalUserObserver.onLocalAudioTrackStatistics | ( | AgoraLocalUser | agora_local_user, |
LocalAudioStats | stats | ||
) |
Reports the statistics of a local audio track.
agora_local_user | An AgoraLocalUser object. |
stats | The statistics of the local audio track. |
void io.agora.rtc.ILocalUserObserver.onLocalVideoTrackStateChanged | ( | AgoraLocalUser | agora_local_user, |
AgoraLocalVideoTrack | agora_local_video_track, | ||
int | state, | ||
int | error | ||
) |
void io.agora.rtc.ILocalUserObserver.onLocalVideoTrackStatistics | ( | AgoraLocalUser | agora_local_user, |
AgoraLocalVideoTrack | agora_local_video_track, | ||
LocalVideoTrackStats | stats | ||
) |
Reports the statistics of a local video track.
agora_local_user | An AgoraLocalUser object. |
agora_local_video_track | An AgoraLocalVideoTrack object. |
stats | The statistics of the local video track. |
void io.agora.rtc.ILocalUserObserver.onRemoteAudioTrackStatistics | ( | AgoraLocalUser | agora_local_user, |
AgoraRemoteAudioTrack | agora_remote_audio_track, | ||
RemoteAudioTrackStats | stats | ||
) |
Reports the statistics of a remote audio track.
agora_local_user | An AgoraLocalUser object. |
agora_remote_audio_track | An IRemoteAudioTrack object. |
stats | The statistics of the remote audio track. |
void io.agora.rtc.ILocalUserObserver.onRemoteSubscribeFallbackToAudioOnly | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | is_fallback_or_recover | ||
) |
void io.agora.rtc.ILocalUserObserver.onRemoteVideoTrackStatistics | ( | AgoraLocalUser | agora_local_user, |
AgoraRemoteVideoTrack | agora_remote_video_track, | ||
RemoteVideoTrackStats | stats | ||
) |
Reports the statistics of a remote video track.
agora_local_user | An AgoraLocalUser object. |
agora_remote_video_track | An AgoraRemoteVideoTrack object. |
stats | The statistics of the remote video track. |
void io.agora.rtc.ILocalUserObserver.onStreamMessage | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | stream_id, | ||
String | data, | ||
long | length | ||
) |
Occurs when the local user receives the data stream from the remote user.
The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the sendStreamMessage method.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the remote user sending the message. |
stream_id | The stream ID of the received message. |
data | The data received. |
length | The data length (byte). |
void io.agora.rtc.ILocalUserObserver.onUserAudioTrackStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
AgoraRemoteAudioTrack | agora_remote_audio_track, | ||
int | state, | ||
int | reason, | ||
int | elapsed | ||
) |
Occurs when the state of a remote audio track changes.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the remote user whose audio track state has changed. |
agora_remote_audio_track | An IRemoteAudioTrack object. |
state | The current state of the audio track.
|
reason | The reason for the state change.
|
elapsed | The time (ms) since the user connects to an Agora channel. |
void io.agora.rtc.ILocalUserObserver.onUserAudioTrackSubscribed | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
AgoraRemoteAudioTrack | agora_remote_audio_track | ||
) |
Occurs when the first remote audio frame is received.
This callback indicates that the local user has subscribed to a specified remote audio track, and the first frame of this audio track has been received.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the remote user whose audio frame is received. |
agora_remote_audio_track | An IRemoteAudioTrack object. |
void io.agora.rtc.ILocalUserObserver.onUserInfoUpdated | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | msg, | ||
int | val | ||
) |
Occurs when the user media information is updated.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the user. |
msg | The media information of the user. |
val | Whether the user is muted. |
void io.agora.rtc.ILocalUserObserver.onUserStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
int | state | ||
) |
Occurs when the remote user state is updated.
agora_local_user | An AgoraLocalUser object. |
user_id | The uid of the remote user. |
state | The remote user state. |
void io.agora.rtc.ILocalUserObserver.onUserVideoTrackStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
AgoraRemoteVideoTrack | agora_remote_video_track, | ||
int | state, | ||
int | reason, | ||
int | elapsed | ||
) |
Occurs when the state of a remote video track changes.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the remote user whose video track state has changed. |
agora_remote_video_track | An AgoraRemoteVideoTrack object. |
state | The current state of the video track.
|
reason | The reason for the state change.
|
elapsed | The time (ms) since the user connects to an Agora channel. |
void io.agora.rtc.ILocalUserObserver.onUserVideoTrackSubscribed | ( | AgoraLocalUser | agora_local_user, |
String | user_id, | ||
VideoTrackInfo | info, | ||
AgoraRemoteVideoTrack | agora_remote_video_track | ||
) |
Occurs when the first remote video frame is received.
This callback indicates that the local user has subscribed to a specified remote video track, and the first frame of this video track has been received.
agora_local_user | An AgoraLocalUser object. |
user_id | The ID of the remote user whose video frame is received. |
info | The information of the remote video track. |
agora_remote_video_track | An AgoraRemoteVideoTrack object. |
void io.agora.rtc.ILocalUserObserver.onVideoPublishStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | channel, | ||
int | old_state, | ||
int | new_state, | ||
int | elapse_since_last_state | ||
) |
Occurs when the video publish state changed.
agora_local_user | An AgoraLocalUser object. |
channel | The channel name of user joined. |
old_state | The old state of the video stream publishing.
|
new_state | The new state of the video stream publishing.
|
elapse_since_last_state | The time elapsed (ms) from the old state to the new state. |
void io.agora.rtc.ILocalUserObserver.onVideoSubscribeStateChanged | ( | AgoraLocalUser | agora_local_user, |
String | channel, | ||
String | user_id, | ||
int | old_state, | ||
int | new_state, | ||
int | elapse_since_last_state | ||
) |
Occurs when the video subscribe state changed.
agora_local_user | An AgoraLocalUser object. |
channel | The channel name of user joined. |
user_id | The remote string user ID that is subscribed to. |
old_state | The old state of the video stream subscription.
|
new_state | The new state of the video stream subscription.
|
elapse_since_last_state | The time elapsed (ms) from the old state to the new state. |
void io.agora.rtc.ILocalUserObserver.onVideoTrackPublishSuccess | ( | AgoraLocalUser | agora_local_user, |
AgoraLocalVideoTrack | agora_local_video_track | ||
) |
Occurs when the first packet of a local video track is sent, indicating that the local video track is successfully published.
agora_local_user | An AgoraLocalUser object. |
agora_local_video_track | An AgoraLocalVideoTrack object. |