Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rte.scene.AgoraRteSceneEventHandler Class Referenceabstract

Public Member Functions

void onConnectionStateChanged (AgoraRteSceneConnState oldState, AgoraRteSceneConnState newState, AgoraRteConnectionChangedReason reason)
 
void onRemoteUserJoined (List< AgoraRteUserInfo > users)
 
void onRemoteUserLeft (List< AgoraRteUserInfo > users)
 
void onRemoteStreamAdded (List< AgoraRteMediaStreamInfo > streams)
 
void onRemoteStreamRemoved (List< AgoraRteMediaStreamInfo > streams)
 
void onLocalStreamStateChanged (AgoraRteMediaStreamInfo streamInfo, AgoraRteMediaType mediaType, AgoraRteStreamMediaState oldState, AgoraRteStreamMediaState newState, AgoraRteStreamStateChangedReason reason)
 
void onRemoteStreamStateChanged (AgoraRteMediaStreamInfo streamInfo, AgoraRteMediaType mediaType, AgoraRteStreamMediaState oldState, AgoraRteStreamMediaState newState, AgoraRteStreamStateChangedReason reason)
 
void onAudioVolumeIndication (List< AgoraRteAudioVolumeInfo > speakers, int totalVolume)
 
void onSceneTokenWillExpire (String speedId, String token)
 
void onSceneTokenExpired (String sceneId)
 
void onStreamTokenWillExpire (String streamId, String token)
 
void onStreamTokenExpired (String streamId)
 
void onCloudCdnStateChanged (String streamId, String targetCdnUrl, AgoraRteCloudCdnStreamPublishState state, AgoraRteCloudCdnStreamPublishError errCode)
 
void onCloudCdnPublished (String streamId, String targetCdnUrl, AgoraRteCloudCdnStreamPublishError errCode)
 
void onCloudCdnUnpublished (String streamId, String targetCdnUrl)
 
void onCloudTranscodingUpdated (String streamId)
 
void onSceneStats (AgoraRteSceneStats stats)
 
void onLocalStreamAudioStats (String streamId, AgoraRteLocalAudioStats stats)
 
void onLocalStreamVideoStats (String streamId, AgoraRteLocalVideoStats stats)
 
void onRemoteStreamAudioStats (String streamId, AgoraRteRemoteAudioStats stats)
 
void onRemoteStreamVideoStats (String streamId, AgoraRteRemoteVideoStats stats)
 
void onLocalStreamEvent (String streamId, AgoraRteLocalStreamEventType event)
 
void onRemoteStreamEvent (String streamId, AgoraRteRemoteStreamEventType event)
 

Member Function Documentation

◆ onConnectionStateChanged()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onConnectionStateChanged ( AgoraRteSceneConnState  oldState,
AgoraRteSceneConnState  newState,
AgoraRteConnectionChangedReason  reason 
)

Occurs when the connection state changes.

Parameters
oldStateThe old connection state.
newStateThe new connection state.
reasonThe reason of the connection state change.

◆ onRemoteUserJoined()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onRemoteUserJoined ( List< AgoraRteUserInfo users)

Occurs when remote users join.

Parameters
usersJoined remote users.

◆ onRemoteUserLeft()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onRemoteUserLeft ( List< AgoraRteUserInfo users)

Occurs when remote users left.

Parameters
usersLeft remote users.

◆ onRemoteStreamAdded()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onRemoteStreamAdded ( List< AgoraRteMediaStreamInfo streams)

Occurs when remote streams are added.

Parameters
streamsAdded remote streams.

◆ onRemoteStreamRemoved()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onRemoteStreamRemoved ( List< AgoraRteMediaStreamInfo streams)

Occurs when remote streams are removed.

Parameters
streamsRemoved remote streams.

◆ onLocalStreamStateChanged()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onLocalStreamStateChanged ( AgoraRteMediaStreamInfo  streamInfo,
AgoraRteMediaType  mediaType,
AgoraRteStreamMediaState  oldState,
AgoraRteStreamMediaState  newState,
AgoraRteStreamStateChangedReason  reason 
)

Occurs when the media state of the local stream changes.

Parameters
streamInfoInformation of the local stream.
mediaTypeMedia type of the local stream.
oldStateOld state of the local stream.
newStateNew state of the local stream.
reasonThe reason of the state change.

◆ onRemoteStreamStateChanged()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onRemoteStreamStateChanged ( AgoraRteMediaStreamInfo  streamInfo,
AgoraRteMediaType  mediaType,
AgoraRteStreamMediaState  oldState,
AgoraRteStreamMediaState  newState,
AgoraRteStreamStateChangedReason  reason 
)

Occurs when the media state of the remote stream changes.

Parameters
streamInfoInformation of the remote stream.
mediaTypeMedia type of the remote stream.
oldStateOld state of the remote stream.
newStateNew state of the remote stream.
reasonThe reason of the state change.

◆ onAudioVolumeIndication()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onAudioVolumeIndication ( List< AgoraRteAudioVolumeInfo speakers,
int  totalVolume 
)

Reports the volume information of users.

Parameters
speakersThe volume information of users.
totalVolumeTotal volume after audio mixing. The value ranges between 0 (lowest volume) and 255 (highest volume).

◆ onSceneTokenWillExpire()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onSceneTokenWillExpire ( String  speedId,
String  token 
)

Occurs when the token will expire in 30 seconds for the user.

Parameters
speedIdscene id
tokenThe token that will expire in 30 seconds.

◆ onSceneTokenExpired()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onSceneTokenExpired ( String  sceneId)

Occurs when the token has expired for a user.

Parameters
sceneIdThe ID of the scene.

◆ onStreamTokenWillExpire()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onStreamTokenWillExpire ( String  streamId,
String  token 
)

Occurs when the token of a stream expires in 30 seconds. If the token you specified when calling 'CreateOrUpdateRTCStream' expires, the user will drop offline. This callback is triggered 30 seconds before the token expires, to remind you to renew the token by calling 'createOrUpdateRTCStream' again with new token.

Parameters
streamIdthe stream id
tokenThe token that will expire in 30 seconds.

◆ onStreamTokenExpired()

void io.agora.rte.scene.AgoraRteSceneEventHandler.onStreamTokenExpired ( String  streamId)

Occurs when the token has expired for a stream. Upon receiving this callback, you must generate a new token on your server and call "createOrUpdateRTCStream" to pass the new token to the SDK.

Parameters
streamIdThe ID of the scene.