Server Gateway SDK v3.8.202.20 for Linux C++
|
#include <NGIAgoraLocalUser.h>
Public Types | |
enum | USER_MEDIA_INFO { USER_MEDIA_INFO_MUTE_AUDIO = 0 , USER_MEDIA_INFO_MUTE_VIDEO = 1 , USER_MEDIA_INFO_ENABLE_VIDEO = 4 } |
enum | REMOTE_USER_STATE { PEER_STATE_MUTE_AUDIO = (1 << 0) , PEER_STATE_MUTE_VIDEO = (1 << 1) , PEER_STATE_ENABLE_VIDEO = (1 << 4) , PEER_STATE_ENABLE_LOCAL_VIDEO = (1 << 8) } |
Public Member Functions | |
virtual | ~ILocalUserObserver () |
virtual void | onAudioTrackPublishSuccess (agora_refptr< ILocalAudioTrack > audioTrack)=0 |
virtual void | onLocalAudioTrackStateChanged (agora_refptr< rtc::ILocalAudioTrack > audioTrack, LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_ERROR errorCode)=0 |
virtual void | onLocalAudioTrackStatistics (const LocalAudioStats &stats)=0 |
virtual void | onRemoteAudioTrackStatistics (agora_refptr< rtc::IRemoteAudioTrack > audioTrack, const RemoteAudioTrackStats &stats)=0 |
virtual void | onUserAudioTrackSubscribed (user_id_t userId, agora_refptr< rtc::IRemoteAudioTrack > audioTrack)=0 |
virtual void | onUserAudioTrackStateChanged (user_id_t userId, agora_refptr< rtc::IRemoteAudioTrack > audioTrack, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_STATE_REASON reason, int elapsed)=0 |
virtual void | onVideoTrackPublishSuccess (agora_refptr< ILocalVideoTrack > videoTrack)=0 |
virtual void | onLocalVideoTrackStateChanged (agora_refptr< rtc::ILocalVideoTrack > videoTrack, LOCAL_VIDEO_STREAM_STATE state, LOCAL_VIDEO_STREAM_ERROR errorCode)=0 |
virtual void | onLocalVideoTrackStatistics (agora_refptr< rtc::ILocalVideoTrack > videoTrack, const LocalVideoTrackStats &stats)=0 |
virtual void | onUserVideoTrackSubscribed (user_id_t userId, VideoTrackInfo trackInfo, agora_refptr< rtc::IRemoteVideoTrack > videoTrack)=0 |
virtual void | onUserVideoTrackStateChanged (user_id_t userId, agora_refptr< rtc::IRemoteVideoTrack > videoTrack, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_STATE_REASON reason, int elapsed)=0 |
virtual void | onFirstRemoteVideoFrameRendered (user_id_t userId, int width, int height, int elapsed)=0 |
virtual void | onRemoteVideoTrackStatistics (agora_refptr< rtc::IRemoteVideoTrack > videoTrack, const RemoteVideoTrackStats &stats)=0 |
virtual void | onAudioSubscribeStateChanged (const char *channel, user_id_t userId, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState)=0 |
virtual void | onVideoSubscribeStateChanged (const char *channel, user_id_t userId, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState)=0 |
virtual void | onAudioPublishStateChanged (const char *channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState)=0 |
virtual void | onVideoPublishStateChanged (const char *channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState)=0 |
virtual void | onFirstRemoteAudioFrame (user_id_t userId, int elapsed)=0 |
virtual void | onFirstRemoteAudioDecoded (user_id_t userId, int elapsed)=0 |
virtual void | onFirstRemoteVideoDecoded (user_id_t userId, int width, int height, int elapsed)=0 |
virtual void | onUserInfoUpdated (user_id_t userId, USER_MEDIA_INFO msg, bool val) |
virtual void | onIntraRequestReceived () |
virtual void | onStreamMessage (user_id_t userId, int streamId, const char *data, size_t length) |
virtual void | onUserStateChanged (user_id_t userId, uint32_t state) |
The ILocalUserObserver
class.
The remote user state information.
|
inlinevirtual |
|
pure virtual |
Occurs when the audio publish state changed.
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. |
|
pure virtual |
Occurs when the audio subscribe state changed.
channel | The channel name of user joined. |
userId | The remote string 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. |
|
pure virtual |
Occurs when the first packet of the local audio track is sent, indicating that the local audio track is successfully published.
audioTrack | The pointer to ILocalAudioTrack. |
|
pure virtual |
Occurs when the SDK decodes the first remote audio frame for playback.
userId | User ID of the remote user sending the audio stream. |
elapsed | The time (ms) since the user connects to an Agora channel. |
|
pure virtual |
Occurs when the first remote audio frame is received.
userId | ID of the remote user. |
elapsed | The time (ms) since the user connects to an Agora channel. |
|
pure virtual |
Occurs when the SDK decodes the first remote video frame for playback.
userId | 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. |
|
pure virtual |
Occurs when the first remote video frame is rendered.
userId | the ID of the remote user. |
width | Width (px) of the video frame. |
height | Height (px) of the video stream. |
elapsed | The time (ms) since the user connects to an Agora channel. |
|
inlinevirtual |
Occurs when the intra request is received from a remote user.
The method notifies the local user to encode a key frame.
|
pure virtual |
Occurs when the state of a local audio track changes.
audioTrack | The pointer to ILocalAudioTrack . |
state | The state of the local audio track. |
errorCode | The error information for a state failure: LOCAL_AUDIO_STREAM_ERROR. |
|
pure virtual |
Reports the statistics of a local audio track.
stats | The reference to the statistics of the local audio track. |
|
pure virtual |
Occurs when the state of a local video track changes.
videoTrack | The pointer to ILocalVideoTrack . |
state | The state of the local video track. |
errorCode | The error information. |
|
pure virtual |
Reports the statistics of a local video track.
videoTrack | The pointer to ILocalVideoTrack . |
stats | The statistics of the local video track. |
|
pure virtual |
Reports the statistics of a remote audio track.
audioTrack | The pointer to IRemoteAudioTrack . |
stats | The statistics of the remote audio track. |
|
pure virtual |
Reports the statistics of a remote video track.
videoTrack | The pointer to IRemoteVideoTrack . |
stats | The statistics of the remote video track. |
|
inlinevirtual |
Occurs when the local user receives data stream.
userId | ID of the user who sends the data stream. |
streamId | ID of the stream. |
data | The data in the data stream. |
length | The length of the data. |
|
pure virtual |
Occurs when the state of a remote audio track changes.
userId | The ID of the remote user whose audio track state has changed. |
audioTrack | The pointer to IRemoteAudioTrack . |
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. |
|
pure virtual |
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.
userId | The ID of the remote user whose audio frame is received. |
audioTrack | The pointer to IRemoteAudioTrack . |
|
inlinevirtual |
Occurs when the user media information is updated.
userId | The ID of the user. |
msg | The media information of the user. See USER_MEDIA_INFO. |
val | Whether the user is muted. |
|
inlinevirtual |
Occurs when the remote user state is updated.
userId | The uid of the remote user. |
state | The remote user state. |
|
pure virtual |
Occurs when the state of a remote video track changes.
userId | The ID of the remote user whose video track state has changed. |
videoTrack | The pointer to IRemoteVideoTrack . |
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. |
|
pure virtual |
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.
userId | The ID of the remote user whose video frame is received. |
trackInfo | The information of the remote video track. |
videoTrack | The pointer to IRemoteVideoTrack . |
|
pure virtual |
Occurs when the video publish state changed.
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. |
|
pure virtual |
Occurs when the video subscribe state changed.
channel | The channel name of user joined. |
userId | The remote string 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. |
|
pure virtual |
Occurs when the first packet of a local video track is sent, indicating that the local video track is successfully published.
videoTrack | The pointer to ILocalVideoTrack . |