Occurs when the most active remote speaker is detected.
This callback reports the speaker with the highest accumulative volume during a certain period. If the user enables the audio volume indication by calling enableAudioVolumeIndication
, this callback returns the uid of the active speaker whose voice is detected by the audio volume detection module of the SDK.
Note
enableAudioVolumeIndication
.Occurs when the audio publishing state changes.
Occurs when the audio subscribing state changes.
Reports events during the media stream relay.
Occurs when the state of the media stream relay changes.
The SDK reports the state of the current media relay and possible error messages in this callback.
Occurs when the user role switch fails in the interactive live streaming.
Occurs when the user role switches successfully in the interactive live streaming.
In the LiveBroadcasting
channel profile, when the local user successfully calls setClientRole
to
switch their user role after joining the channel, for example, from a host to an audience member or vice versa, the SDK triggers
this callback to report the user role before and after the switch.
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
The SDK also triggers this callback when it cannot connect to the server 10 seconds after calling joinChannel
, regardless of whether it is in the channel or not.
If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
Occurs when the network connection state changes.
The Agora SDK triggers this callback to report on the current network connection state when it changes, and the reason to such change.
Reports the error code of the RtcChannel
instance.
Occurs when the first remote video frame is rendered.
Occurs when the local user joins a specified channel.
If the uid is not specified when calling joinChannel
, the
server automatically assigns a uid.
Occurs when a user leaves the channel.
When a user leaves the channel by using the leaveChannel
method, the SDK uses this callback to notify the app when the user leaves the channel.
With this callback, the app retrieves the channel information, such as the call duration and statistics.
Occurs when the published media stream falls back to an audio-only stream due to poor network conditions or switches back to video stream after the network conditions improve.
If you call setLocalPublishFallbackOption
and set option
as AudioOnly
, this callback is triggered when the locally published stream falls back to audio-only mode due to poor uplink conditions, or when the audio stream switches back to the video after the uplink network condition improves.
Occurs when the local user receives the metadata.
Reports the last mile network quality of each user in the channel once every two seconds.
Last mile refers to the connection between the local device and Agora's edge server. This callback reports once every two seconds the last mile network conditions of each user in the channel. If a channel includes multiple users, then this callback will be triggered as many times.
Note
txQuality
is Unknown
when the user is not sending a stream; rxQuality
is Unknown
when the user is not receiving a stream.
Reports the proxy connection state.
Occurs when a user rejoins the channel after being disconnected due to network problems.
When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
Occurs when the remote audio state changes.
This callback indicates the state change of the remote audio stream.
Reports the statistics of the audio stream from each remote user/host.
The SDK triggers this callback once every two seconds for each remote user/host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
Schemes such as FEC (Forward Error Correction) or retransmission counter the frame loss rate. Hence, users may find the overall audio quality acceptable even when the packet loss rate is high.
Occurs when the remote media stream falls back to audio-only stream due to poor network conditions or switches back to video stream after the network conditions improve.
If you call setRemoteSubscribeFallbackOption
and set option as AudioOnly
,
this callback is triggered when the remote media stream falls back to audio-only mode due to poor downlink
conditions, or when the remote media stream switches back to the video after the downlink network condition improves.
Note
Once the remote media stream is switched to the low stream due to poor network conditions,
you can monitor the stream switch between a high and low stream in the RemoteVideoStats
callback.
Occurs when the remote video state changes.
Reports the statistics of the video stream from each remote user/host. The SDK triggers this callback once every two seconds for each remote user/broadcaster. If a channel includes multiple remote users, the SDK triggers this callback as many times.
Occurs when the token has expired.
After a token is specified when joining the channel, the token expires after a certain period of time,
and a new token is required to reconnect to the server.
This callback notifies the app to generate a new token and call renewToken
to renew the token.
Reports the statistics of the RtcEngine
once every two seconds.
Reports events during the RTMP or RTMPS streaming.
Occurs when the state of the RTMP or RTMPS streaming changes.
When the CDN live streaming state changes, the SDK triggers this callback to report the current state and the reason why the state has changed.
This callback indicates the state of the RTMP or RTMPS streaming. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the errCode parameter.
Occurs when the local user receives a remote data stream.
The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the sendStreamMessage
method.
Occurs when the local user fails to receive a remote data stream.
The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the sendStreamMessage
method.
Occurs when the token expires in 30 seconds.
The user becomes offline if the token used when joining the channel expires. This callback is
triggered 30 seconds before the token expires, to remind the app to get a new token. Upon receiving this callback,
you need to generate a new token on the server and call renewToken
to pass the new token to the SDK.
Occurs when the publisher's transcoding settings are updated.
When the LiveTranscoding
class in the setLiveTranscoding
method updates, the SDK triggers this callback to report the update information.
Note
If you call setLiveTranscoding
to set the LiveTranscoding
class for the first time, the SDK does not trigger this callback.
Occurs when a remote user (Communication
) or a host (LiveBroadcasting
) joins the channel.
Communication
profile: This callback notifies the app when another user joins the channel. If other users are already in the channel, the SDK also reports to the app on the existing users.LiveBroadcasting
profile: This callback notifies the app when the host joins the channel. If other hosts are already in the channel, the SDK also reports to the app on the existing hosts. We recommend having at most 17 hosts in a channel.The SDK triggers this callback under one of the following circumstances:
joinChannel
.setClientRole
after joining the channel.Note
LiveBroadcasting
profile:Occurs when a remote user (Communication
) or a host (LiveBroadcasting
) leaves the channel.
There are two reasons for users to become offline:
Reports whether the super resolution feature is successfully enabled. (beta feature)
Occurs when the video publishing state changes.
Occurs when the video size or rotation information of a remote user changes.
Occurs when the video subscribing state changes.
Reports the warning code of the RtcChannel
instance.
Generated using TypeDoc
The
RtcChannelEvents
interface.