|
virtual void | onAudioTrackPublishSuccess (agora_refptr< ILocalAudioTrack > audioTrack)=0 |
|
virtual void | onAudioTrackPublicationFailure (agora_refptr< ILocalAudioTrack > audioTrack, ERROR_CODE_TYPE error)=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 | onVideoTrackPublicationFailure (agora_refptr< ILocalVideoTrack > videoTrack, ERROR_CODE_TYPE error)=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 | onAudioVolumeIndication (const AudioVolumeInfo *speakers, unsigned int speakerNumber, int totalVolume)=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 | 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 agora::rtc::ILocalUserObserver::onAudioVolumeIndication |
( |
const AudioVolumeInfo * |
speakers, |
|
|
unsigned int |
speakerNumber, |
|
|
int |
totalVolume |
|
) |
| |
|
pure virtual |
Reports which users are speaking, the speakers' volumes, and whether the local user is speaking.
This callback reports the IDs and volumes of the loudest speakers at the moment in the channel, and whether the local user is speaking.
You can set the time interval of this callback using setAudioVolumeIndicationParameters.
The SDK triggers two onAudioVolumeIndication
callbacks at one time, one reporting the volume information of the local user and the other reporting the volume information of all remote users.
- Note
- To detect whether the local user is speaking, set
report_vad
in enableAudioVolumeIndication
to true
.
- Parameters
-
speakers | The pointer to AudioVolumeInfo, which is an array containing the user ID and volume information for each speaker.
- In the local user's callback, this array contains the following members:
uid , which is always 0
volume , which reports the sum of the voice volume and the audio-mixing volume of the local user
vad , which reports whether the local user is speaking
- In the remote users' callback, this array contains the following members:
uid , which is the UID of each remote speaker
volume , which reports the sum of the voice volume and the audio-mixing volume of each remote speaker.
vad , which is always 0 An empty speakers array in the callback indicates that no remote user is speaking at the moment.
|
speakerNumber | The total number of the speakers. |
totalVolume | The total volume after audio mixing. The value ranges between 0 (lowest volume) and 255 (highest volume).
- In the local user's callback,
totalVolume is the sum of the voice volume and the audio-mixing volume of the local user.
- In the remote speakers' callback,
totalVolume is the sum of the voice volume and the audio-mixing volume of all remote speakers.
|