public interface IAgoraMediaRtcRecorderEventHandler
| Modifier and Type | Method and Description |
|---|---|
default void |
onActiveSpeaker(java.lang.String channelId,
java.lang.String userId)
Occurs when an active speaker is detected.
|
default void |
onAudioVolumeIndication(java.lang.String channelId,
SpeakVolumeInfo[] speakers,
int speakerNumber)
Reports which users are speaking, the speakers' volumes, and whether the
local user is speaking.
|
default void |
onConnected(java.lang.String channelId,
java.lang.String userId)
Occurs when the connection state between the SDK and the Agora channel
changes to `CONNECTION_STATE_CONNECTED(3)`.
|
default void |
onConnectionLost(java.lang.String channelId,
java.lang.String userId)
Occurs when the SDK loses connection with the Agora channel.
|
default void |
onDisconnected(java.lang.String channelId,
java.lang.String userId,
Constants.ConnectionChangedReasonType reason)
Occurs when the connection state between the SDK and the Agora channel
changes to `CONNECTION_STATE_DISCONNECTED(1)`.
|
default void |
onEncryptionError(java.lang.String channelId,
Constants.EncryptionErrorType errorType)
Occurs when the encryption error occurs.
|
default void |
onError(java.lang.String channelId,
Constants.ErrorCodeType error,
java.lang.String message)
Reports the error code and error message.
|
default void |
onFirstRemoteAudioDecoded(java.lang.String channelId,
java.lang.String userId,
int elapsed)
Occurs when the SDK decodes the first remote audio frame for recorder.
|
default void |
onFirstRemoteVideoDecoded(java.lang.String channelId,
java.lang.String userId,
int width,
int height,
int elapsed)
Occurs when the SDK decodes the first remote video frame for recorder.
|
default void |
onReconnected(java.lang.String channelId,
java.lang.String userId,
Constants.ConnectionChangedReasonType reason)
Occurs when the connection state between the SDK and the Agora channel
changes to `CONNECTION_STATE_CONNECTED(3) ` again.
|
default void |
onRecorderInfoUpdated(java.lang.String channelId,
java.lang.String userId,
RecorderInfo info)
Occurs when the recording information is updated.
|
default void |
onRecorderStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RecorderState state,
Constants.RecorderReasonCode reason,
java.lang.String fileName)
Occurs when the recording state changes.
|
default void |
onRemoteAudioStats(java.lang.String channelId,
java.lang.String userId,
RemoteAudioStatistics stats)
Reports the statistics of a remote audio.
|
default void |
onRemoteVideoStats(java.lang.String channelId,
java.lang.String userId,
RemoteVideoStatistics stats)
Reports the statistics of a remote video.
|
default void |
onTokenPrivilegeDidExpire(java.lang.String channelId)
Occurs when the token has expired.
|
default void |
onTokenPrivilegeWillExpire(java.lang.String channelId,
java.lang.String token)
Occurs when the token privilege is about to expire in 30 seconds.
|
default void |
onUserAudioStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RemoteAudioState state,
Constants.RemoteAudioStateReason reason,
int elapsed)
Occurs when the state of audio changes.
|
default void |
onUserJoined(java.lang.String channelId,
java.lang.String userId)
Occurs when a remote user joins the channel.
|
default void |
onUserLeft(java.lang.String channelId,
java.lang.String userId,
Constants.UserOfflineReasonType reason)
Occurs when a remote user leaves the channel.
|
default void |
onUserVideoStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RemoteVideoState state,
Constants.RemoteVideoStateReason reason,
int elapsed)
Occurs when the state of video changes.
|
default void onConnected(java.lang.String channelId,
java.lang.String userId)
channelId - The channel ID.userId - The user ID.default void onDisconnected(java.lang.String channelId,
java.lang.String userId,
Constants.ConnectionChangedReasonType reason)
channelId - The channel ID.userId - The user ID.reason - The reason of the connection state change. See
Constants.ConnectionChangedReasonType.default void onReconnected(java.lang.String channelId,
java.lang.String userId,
Constants.ConnectionChangedReasonType reason)
channelId - The channel ID.userId - The user ID.reason - The reason of the connection state change. See
Constants.ConnectionChangedReasonType.default void onConnectionLost(java.lang.String channelId,
java.lang.String userId)
channelId - The channel ID.userId - The user ID.default void onUserJoined(java.lang.String channelId,
java.lang.String userId)
channelId - The channel ID.userId - The user ID.default void onUserLeft(java.lang.String channelId,
java.lang.String userId,
Constants.UserOfflineReasonType reason)
channelId - The channel ID.userId - The user ID.reason - The reason why the remote user leaves the channel:
Constants.UserOfflineReasonType.default void onFirstRemoteVideoDecoded(java.lang.String channelId,
java.lang.String userId,
int width,
int height,
int elapsed)
channelId - The channel ID.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.default void onFirstRemoteAudioDecoded(java.lang.String channelId,
java.lang.String userId,
int elapsed)
channelId - The channel ID.userId - User ID of the remote user sending the audio stream.elapsed - The time (ms) since the user connects to an Agora channel.default void onAudioVolumeIndication(java.lang.String channelId,
SpeakVolumeInfo[] speakers,
int speakerNumber)
channelId - The channel ID.speakers - An array of each speakers UID and volume information.speakerNumber - The total number of the speakers.default void onActiveSpeaker(java.lang.String channelId,
java.lang.String userId)
channelId - The channel ID.userId - The ID of the active speaker. A `userId` of `0` means the
local user.default void onUserVideoStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RemoteVideoState state,
Constants.RemoteVideoStateReason reason,
int elapsed)
channelId - The channel ID.userId - the ID of the remote user whose video state has changedstate - The current state of the video.see
Constants.RemoteVideoStatereason - The reason for the state change. see
Constants.RemoteVideoStateReasonelapsed - The time (ms) since the user connects to an Agora channel.default void onUserAudioStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RemoteAudioState state,
Constants.RemoteAudioStateReason reason,
int elapsed)
channelId - The channel ID.userId - the ID of the remote user whose audio state has changedstate - The current state of the audio. see
Constants.RemoteAudioStatereason - The reason for the state change. see
Constants.RemoteAudioStateReasonelapsed - The time (ms) since the user connects to an Agora channel.default void onRemoteVideoStats(java.lang.String channelId,
java.lang.String userId,
RemoteVideoStatistics stats)
channelId - The channel ID.userId - the ID of the remote user.stats - The current stats of the video.default void onRemoteAudioStats(java.lang.String channelId,
java.lang.String userId,
RemoteAudioStatistics stats)
channelId - The channel ID.userId - the ID of the remote user.stats - The current state of the audio.default void onRecorderStateChanged(java.lang.String channelId,
java.lang.String userId,
Constants.RecorderState state,
Constants.RecorderReasonCode reason,
java.lang.String fileName)
channelId - The channel name.userId - ID of the user.state - The current recording state.
SeeConstants.RecorderState.reason - The reason for the state change.
SeeConstants.RecorderReasonCode.fileName - The fileName for recorde stream
"RecorderReasonCode".default void onRecorderInfoUpdated(java.lang.String channelId,
java.lang.String userId,
RecorderInfo info)
channelId - The channel name.userId - ID of the user.info - Information about the recording file. See \ref
agora::media::RecorderInfo
"RecorderInfo".default void onEncryptionError(java.lang.String channelId,
Constants.EncryptionErrorType errorType)
channelId - The channel ID.errorType - The encryption error type. See
Constants.EncryptionErrorType.default void onError(java.lang.String channelId,
Constants.ErrorCodeType error,
java.lang.String message)
channelId - The channel ID.error - The error code. See
ErrorCode
for
details.message - error message.default void onTokenPrivilegeWillExpire(java.lang.String channelId,
java.lang.String token)
The SDK triggers this callback to remind the app to get a new token before the token privilege expires.
Upon receiving this callback, you must generate a new token on your server
and call
AgoraMediaRtcRecorder.renewToken(String) to renew it.
channelId - The channel ID.token - The token that is about to expire in 30 seconds.default void onTokenPrivilegeDidExpire(java.lang.String channelId)
Upon receiving this callback, you must generate a new token on your server
and call
AgoraMediaRtcRecorder.renewToken(String) to renew it.
channelId - The channel ID.