jiuyiUniapp/jiuyi2/lib/commonjs/components/Agora-RTC-JS/common/RtcEvents.js.map

1 line
90 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"names":[],"sources":["RtcEvents.ts"],"sourcesContent":["import type {\r\n AudioFileInfo,\r\n AudioVolumeInfo,\r\n FacePositionInfo,\r\n LastmileProbeResult,\r\n LocalAudioStats,\r\n LocalVideoStats,\r\n RecorderInfo,\r\n Rect,\r\n RemoteAudioStats,\r\n RemoteVideoStats,\r\n RtcStats,\r\n UserInfo,\r\n WlAccStats,\r\n} from './Classes';\r\nimport type {\r\n AudioFileInfoError,\r\n AudioLocalError,\r\n AudioLocalState,\r\n AudioMixingReason,\r\n AudioMixingStateCode,\r\n AudioOutputRouting,\r\n AudioRemoteState,\r\n AudioRemoteStateReason,\r\n ChannelMediaRelayError,\r\n ChannelMediaRelayEvent,\r\n ChannelMediaRelayState,\r\n ClientRole,\r\n ConnectionChangedReason,\r\n ConnectionStateType,\r\n ErrorCode,\r\n InjectStreamStatus,\r\n LocalVideoStreamError,\r\n LocalVideoStreamState,\r\n NetworkQuality,\r\n NetworkType,\r\n RtmpStreamingErrorCode,\r\n RtmpStreamingEvent,\r\n RtmpStreamingState,\r\n StreamPublishState,\r\n StreamSubscribeState,\r\n SuperResolutionStateReason,\r\n UploadErrorReason,\r\n UserOfflineReason,\r\n VideoRemoteState,\r\n VideoRemoteStateReason,\r\n VirtualBackgroundSourceStateReason,\r\n WarningCode,\r\n ContentInspectResult,\r\n ProxyType,\r\n WlAccAction,\r\n WlAccReason,\r\n ClientRoleChangeFailedReason,\r\n} from './Enums';\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nexport type Listener = (...args: any[]) => any;\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nexport interface Subscription {\r\n remove(): void;\r\n}\r\n\r\nexport type EmptyCallback = () => void;\r\nexport type WarningCallback =\r\n /**\r\n * @param warn Warning code.\r\n */\r\n (warn: WarningCode) => void;\r\nexport type ErrorCallback =\r\n /**\r\n * @param err Error code.\r\n */\r\n (err: ErrorCode) => void;\r\nexport type ApiCallCallback =\r\n /**\r\n * @param error [Error Code]{@link ErrorCode} that the SDK returns when the method call fails.\r\n * @param api The method executed by the SDK.\r\n * @param result The result of the method call.\r\n */\r\n (error: ErrorCode, api: string, result: string) => void;\r\nexport type UidWithElapsedAndChannelCallback =\r\n /**\r\n * @param channel Channel name.\r\n * @param uid User ID.\r\n * @param elapsed Time elapsed (ms) from the user calling [`joinChannel`]{@link RtcEngine.joinChannel} until\r\n * this callback is triggered.\r\n */\r\n (channel: string, uid: number, elapsed: number) => void;\r\nexport type RtcStatsCallback =\r\n /**\r\n * @param stats Statistics of the call.\r\n */\r\n (stats: RtcStats) => void;\r\nexport type UserAccountCallback =\r\n /**\r\n * @param uid The ID of the local user.\r\n * @param userAccount The user account of the local user.\r\n */\r\n (uid: number, userAccount: string) => void;\r\nexport type UserInfoCallback =\r\n /**\r\n * @param uid The ID of the remote user.\r\n * @param userInfo The `UserInfo` object that contains the user ID and user account of the remote user.\r\n */\r\n (uid: number, userInfo: UserInfo) => void;\r\nexport type ClientRoleCallback =\r\n /**\r\n * @param oldRole Role that the user switches from.\r\n * @param newRole Role that the user switches to.\r\n */\r\n (oldRole: ClientRole, newRole: ClientRole) => void;\r\nexport type UidWithElapsedCallback =\r\n /**\r\n * @param uid This parameter has the following definitions in different events:\r\n * - [`UserJoined`]{@link RtcEngineEvents.UserJoined}: ID of the user or host who joins the channel.\r\n * - [`FirstRemoteAudioFrame`]{@link RtcEngineEvents.FirstRemoteAudioFrame}: User ID of the remote user.\r\n * - [`FirstRemoteAudioDecoded`]{@link RtcEngineEvents.FirstRemoteAudioDecoded}: User ID of the remote user sending the audio stream.\r\n * - [`JoinChannelSuccess`]{@link RtcChannelEvents.JoinChannelSuccess}: User ID.\r\n * - [`RejoinChannelSuccess`]{@link RtcChannelEvents.RejoinChannelSuccess}: User ID.\r\n * @param elapsed This parameter has the following definitions in different events:\r\n * - [`UserJoined`]{@link RtcEngineEvents.UserJoined}: Time delay (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} or [`setClientRole`]{@link RtcEngine.setClientRole}\r\n * until this callback is triggered.\r\n * - [`FirstRemoteAudioFrame`]{@link RtcEngineEvents.FirstRemoteAudioFrame}: Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} until this callback is triggered.\r\n * - [`FirstRemoteAudioDecoded`]{@link RtcEngineEvents.FirstRemoteAudioDecoded}: Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} until the SDK triggers this callback.\r\n * - [`JoinChannelSuccess`]{@link RtcChannelEvents.JoinChannelSuccess}: Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcChannel.joinChannel} until this callback is triggered.\r\n * - [`RejoinChannelSuccess`]{@link RtcChannelEvents.RejoinChannelSuccess}: Time elapsed (ms) from the local user starting to reconnect until this callback is triggered.\r\n *\r\n */\r\n (uid: number, elapsed: number) => void;\r\nexport type UserOfflineCallback =\r\n /**\r\n * @param uid ID of the user or host who leaves the channel or goes offline.\r\n * @param reason Reason why the user goes offline.\r\n */\r\n (uid: number, reason: UserOfflineReason) => void;\r\nexport type ConnectionStateCallback =\r\n /**\r\n * @param state The current network connection state.\r\n * @param reason The reason causing the change of the connection state.\r\n */\r\n (state: ConnectionStateType, reason: ConnectionChangedReason) => void;\r\nexport type NetworkTypeCallback =\r\n /**\r\n * @param type The network type.\r\n */\r\n (type: NetworkType) => void;\r\nexport type TokenCallback =\r\n /**\r\n * @param token The token that will expire in 30 seconds.\r\n */\r\n (token: string) => void;\r\nexport type AudioVolumeCallback =\r\n /**\r\n * @param speakers An array containing the user ID and volume information for each speaker.\r\n *\r\n * In the local users callback, this array contains the following members:\r\n * - `uid` = 0,\r\n * - `volume` = `totalVolume`, which reports the sum of the voice volume and audio-mixing volume of the local user, and\r\n * - `vad`, which reports the voice activity status of the local user.\r\n *\r\n * In the remote speakers' callback, this array contains the following members:\r\n * - `uid` of each remote speaker,\r\n * - `volume`, which reports the sum of the voice volume and audio-mixing volume of each remote speaker, and\r\n * - `vad` = 0.\r\n *\r\n * An empty `speakers` array in the callback indicates that no remote user is speaking at the moment.\r\n *\r\n * @param totalVolume Total volume after audio mixing. The value ranges between 0 (lowest volume) and 255 (highest volume).\r\n * - In the local users callback, `totalVolume` is the sum of the voice volume and audio-mixing volume of the local user.\r\n * - In the remote speakers' callback, `totalVolume` is the sum of the voice volume and audio-mixing\r\n * volume of all remote speakers.\r\n */\r\n (speakers: AudioVolumeInfo[], totalVolume: number) => void;\r\nexport type UidCallback =\r\n /**\r\n * @param uid The user ID of the most active remote speaker. A `uid` of 0 represents the local user.\r\n */\r\n (uid: number) => void;\r\nexport type ElapsedCallback =\r\n /**\r\n * @param elapsed Time elapsed (ms) from the local user calling the [`joinChannel`]{@link RtcEngine.joinChannel} until\r\n * this callback is triggered.\r\n */\r\n (elapsed: number) => void;\r\nexport type VideoFrameCallback =\r\n /**\r\n * @param width Width (pixels) of the first local video frame.\r\n * @param height Height (pixels) of the first local video frame.\r\n * @param elapsed Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} until this\r\n * callback is triggered.\r\n * If [`startPreview`]{@link RtcEngine.startPreview} is called before [`joinChannel`]{@link RtcEngine.joinChannel}, elapsed is the\r\n * time elapsed (ms) from the local user calling [`startPreview`]{@link RtcEngine.startPreview} until this callback is triggered.\r\n */\r\n (width: number, height: number, elapsed: number) => void;\r\nexport type UidWithMutedCallback =\r\n /**\r\n * @param uid ID of the remote user.\r\n * @param muted Whether the remote user's video stream playback pauses/resumes:\r\n *\r\n * - `true`: Pause.\r\n * - `false`: Resume.\r\n */\r\n (uid: number, muted: boolean) => void;\r\nexport type VideoSizeCallback =\r\n /**\r\n * @param uid User ID of the remote user or local user (0) whose video size or rotation changes.\r\n * @param width New width (pixels) of the video.\r\n * @param height New height (pixels) of the video.\r\n * @param rotation New rotation of the video [0 to 360).\r\n */\r\n (uid: number, width: number, height: number, rotation: number) => void;\r\nexport type RemoteVideoStateCallback =\r\n /**\r\n * @param uid ID of the remote user whose video state changes.\r\n * @param state State of the remote video.\r\n * @param reason The reason of the remote video state change.\r\n * @param elapsed Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} until the SDK\r\n * triggers this callback.\r\n */\r\n (\r\n uid: number,\r\n state: VideoRemoteState,\r\n reason: VideoRemoteStateReason,\r\n elapsed: number\r\n ) => void;\r\nexport type LocalVideoStateCallback =\r\n /**\r\n * @param localVideoState The local video state.\r\n * @param error The detailed error information of the local video.\r\n */\r\n (\r\n localVideoState: LocalVideoStreamState,\r\n error: LocalVideoStreamError\r\n ) => void;\r\nexport type RemoteAudioStateCallback =\r\n /**\r\n * @param uid ID of the user whose audio state changes.\r\n * @param state State of the remote audio.\r\n * @param reason The reason of the remote audio state change.\r\n * @param elapsed Time elapsed (ms) from the local user calling [`joinChannel`]{@link RtcEngine.joinChannel} until the\r\n * SDK triggers this callback.\r\n */\r\n (\r\n uid: number,\r\n state: AudioRemoteState,\r\n reason: AudioRemoteStateReason,\r\n elapsed: number\r\n ) => void;\r\nexport type LocalAudioStateCallback =\r\n /**\r\n * @param state State of the local audio.\r\n * @param error The error information of the local audio.\r\n */\r\n (state: AudioLocalState, error: AudioLocalError) => void;\r\nexport type FallbackCallback =\r\n /**\r\n * @param isFallbackOrRecover Whether the published stream fell back to audio-only or switched back to the video:\r\n *\r\n * - `true`: The published stream fell back to audio-only due to poor network conditions.\r\n * - `false`: The published stream switched back to the video after the network conditions improved.\r\n */\r\n (isFallbackOrRecover: boolean) => void;\r\nexport type FallbackWithUidCallback =\r\n /**\r\n * @param uid ID of the remote user sending the stream.\r\n * @param isFallbackOrRecover Whether the remote media stream fell back to audio-only or\r\n * switched back to the video:\r\n *\r\n * - `true`: The remote media stream fell back to audio-only due to poor network conditions.\r\n * - `false`: The remote media stream switched back to the video stream after the network conditions improved.\r\n */\r\n (uid: number, isFallbackOrRecover: boolean) => void;\r\nexport type AudioRouteCallback =\r\n /**\r\n * @param routing Audio output routing.\r\n */\r\n (routing: AudioOutputRouting) => void;\r\nexport type RectCallback =\r\n /**\r\n * @param rect Rectangular area in the camera zoom specifying the focus area.\r\n */\r\n\r\n (rect: Rect) => void;\r\nexport type NetworkQualityCallback =\r\n /**\r\n * @param quality The last mile network quality based on the uplink and downlink packet loss rate and jitter.\r\n */\r\n (quality: NetworkQuality) => void;\r\nexport type NetworkQualityWithUidCallback =\r\n /**\r\n * @param uid User ID. The network quality of the user with this uid is reported.\r\n * @param txQuality Uplink transmission quality of the user in terms of the transmission bitrate, packet loss rate, average RTT (Round-Trip Time)\r\n * and jitter of the uplink network. `txQuality` is a quality rating helping you understand how well the current uplink\r\n * network conditions can support the selected VideoEncoderConfiguration.\r\n * For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution\r\n * of 680 × 480 and a frame rate of 30 fps, but may be inadequate for resolutions higher than 1280 × 720.\r\n * @param rxQuality Downlink network quality rating of the user in terms of packet loss rate, average RTT, and\r\n * jitter of the downlink network.\r\n */\r\n (uid: number, txQuality: NetworkQuality, rxQuality: NetworkQuality) => void;\r\nexport type LastmileProbeCallback =\r\n /**\r\n * @param result The uplink and downlink last-mile network probe test result.\r\n */\r\n (result: LastmileProbeResult) => void;\r\nexport type LocalVideoStatsCallback =\r\n /**\r\n * @param stats The statistics of the local video stream.\r\n */\r\n (stats: LocalVideoStats) => void;\r\nexport type LocalAudioStatsCallback =\r\n /**\r\n * @param stats The statistics of the local audio stream.\r\n */\r\n (stats: LocalAudioStats) => void;\r\nexport type RemoteVideoStatsCallback =\r\n /**\r\n * @param stats Statistics of the received remote video streams.\r\n */\r\n (stats: RemoteVideoStats) => void;\r\nexport type RemoteAudioStatsCallback =\r\n /**\r\n * @param stats Statistics of the received remote audio streams.\r\n */\r\n (stats: RemoteAudioStats) => void;\r\nexport type AudioMixingStateCallback =\r\n /**\r\n * @param state The current music file playback state. See [`AudioMixingStateCode`]{@link AudioMixingStateCode}.\r\n * @param reason The reason for the change of the music file playback state. See [`AudioMixingReason`]{@link AudioMixingReason}.\r\n */\r\n (state: AudioMixingStateCode, reason: AudioMixingReason) => void;\r\nexport type SoundIdCallback =\r\n /**\r\n * @param soundId ID of the local audio effect. Each local audio effect has a unique ID.\r\n */\r\n (soundId: number) => void;\r\nexport type RtmpStreamingStateCallback =\r\n /**\r\n * @param url The CDN streaming URL.\r\n * @param state The RTMP or RTMPS streaming state.\r\n * @param errCode The detailed error information for streaming.\r\n */\r\n (\r\n url: string,\r\n state: RtmpStreamingState,\r\n errCode: RtmpStreamingErrorCode\r\n ) => void;\r\nexport type StreamInjectedStatusCallback =\r\n /**\r\n * @param url The URL address of the externally injected stream.\r\n * @param uid User ID.\r\n * @param status State of the externally injected stream.\r\n */\r\n (url: string, uid: number, status: InjectStreamStatus) => void;\r\nexport type StreamMessageCallback =\r\n /**\r\n * @param uid User ID of the remote user sending the data stream.\r\n * @param streamId Stream ID.\r\n * @param data Data received by the local user.\r\n */\r\n (uid: number, streamId: number, data: string) => void;\r\nexport type StreamMessageErrorCallback =\r\n /**\r\n * @param uid User ID of the remote user sending the data stream.\r\n * @param streamId Stream ID.\r\n * @param error Error code.\r\n * @param missed The number of lost messages.\r\n * @param cached The number of incoming cached messages when the data stream is interrupted.\r\n */\r\n (\r\n uid: number,\r\n streamId: number,\r\n error: ErrorCode,\r\n missed: number,\r\n cached: number\r\n ) => void;\r\nexport type MediaRelayStateCallback =\r\n /**\r\n * @param state The state code.\r\n * @param code The error code.\r\n */\r\n (state: ChannelMediaRelayState, code: ChannelMediaRelayError) => void;\r\nexport type MediaRelayEventCallback =\r\n /**\r\n * @param code The event code for media stream relay.\r\n */\r\n (code: ChannelMediaRelayEvent) => void;\r\nexport type VideoFrameWithUidCallback =\r\n /**\r\n * @param uid User ID of the remote user sending the video streams.\r\n * @param width Width (pixels) of the video stream.\r\n * @param height Height (pixels) of the video stream.\r\n * @param elapsed Time elapsed (ms) from the local user calling `joinChannel` until this\r\n * callback is triggered.\r\n */\r\n (uid: number, width: number, height: number, elapsed: number) => void;\r\nexport type UrlWithErrorCallback =\r\n /**\r\n * @param url The RTMP or RTMPS streaming URL.\r\n * @param error The detailed error information.\r\n */\r\n (url: string, error: ErrorCode) => void;\r\nexport type UrlCallback =\r\n /**\r\n * @param url The CDN streaming URL.\r\n */\r\n (url: string) => void;\r\nexport type TransportStatsCallback =\r\n /**\r\n * @param uid User ID of the remote user sending the audio packet/video packet.\r\n * @param delay Network time delay (ms) from the remote user sending the audio packet/video packet to the local user.\r\n * @param lost Packet loss rate (%) of the audio packet/video packet sent from the remote user.\r\n * @param rxKBitRate Received bitrate (Kbps) of the audio packet/video packet sent from the remote user.\r\n */\r\n (uid: number, delay: number, lost: number, rxKBitRate: number) => void;\r\nexport type UidWithEnabledCallback =\r\n /**\r\n * @param uid User ID of the remote user.\r\n * @param enabled Whether the specific remote user enables/disables the video module:\r\n *\r\n * - `true`: Enabled. The remote user can enter a video session.\r\n * - `false`: Disabled. The remote user can only enter a voice session, and cannot send or receive\r\n * any video stream.\r\n */\r\n (uid: number, enabled: boolean) => void;\r\nexport type EnabledCallback =\r\n /**\r\n * @param enabled Whether the microphone is enabled/disabled:\r\n * - `true`: Enabled.\r\n * - `false`: Disabled.\r\n */\r\n (enabled: boolean) => void;\r\nexport type AudioQualityCallback =\r\n /**\r\n * @param uid User ID of the speaker.\r\n * @param quality Audio quality of the user.\r\n * @param delay Time delay (ms) of the audio packet from the sender to the receiver, including the time delay\r\n * from audio sampling pre-processing, transmission, and the jitter buffer.\r\n * @param lost Packet loss rate (%) of the audio packet sent from the sender to the receiver.\r\n */\r\n (uid: number, quality: number, delay: number, lost: number) => void;\r\nexport type MetadataCallback =\r\n /**\r\n * @param buffer The received metadata.\r\n * @param uid The ID of the user who sent the metadata.\r\n * @param timeStampMs The timestamp (ms) of the received metadata.\r\n */\r\n (buffer: string, uid: number, timeStampMs: number) => void;\r\nexport type FacePositionCallback =\r\n /**\r\n * @param imageWidth The width (px) of the local video.\r\n * @param imageHeight The height (px) of the local video.\r\n * @param faces The information of the detected human face. For details, see [`FacePositionInfo`]{@link FacePositionInfo}.\r\n * The number of the `FacePositionInfo` array depends on the number of human faces detected.\r\n * If the array length is 0, it means that no human face is detected.\r\n */\r\n (imageWidth: number, imageHeight: number, faces: FacePositionInfo[]) => void;\r\nexport type StreamPublishStateCallback =\r\n /**\r\n * @param channel The channel name.\r\n * @param oldState The previous publishing state. See [`StreamPublishState`]{@link StreamPublishState}.\r\n * @param newState The current publishing state. See [`StreamPublishState`]{@link StreamPublishState}.\r\n * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.\r\n */\r\n (\r\n channel: string,\r\n oldState: StreamPublishState,\r\n newState: StreamPublishState,\r\n elapseSinceLastState: number\r\n ) => void;\r\nexport type StreamSubscribeStateCallback =\r\n /**\r\n * @param channel The channel name.\r\n * @param uid The ID of the remote user whose subscribe state changes.\r\n * @param oldState The previous publishing state. See [`StreamPublishState`]{@link StreamPublishState}.\r\n * @param newState The current publishing state. See [`StreamPublishState`]{@link StreamPublishState}.\r\n * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.\r\n */\r\n (\r\n channel: string,\r\n uid: number,\r\n oldState: StreamSubscribeState,\r\n newState: StreamSubscribeState,\r\n elapseSinceLastState: number\r\n ) => void;\r\nexport type RtmpStreamingEventCallback =\r\n /**\r\n * @param url The RTMP or RTMPS streaming URL.\r\n * @param eventCode The event code. See [`RtmpStreamingEvent`]{@link RtmpStreamingEvent}.\r\n */\r\n (url: string, eventCode: RtmpStreamingEvent) => void;\r\nexport type UserSuperResolutionEnabledCallback =\r\n /**\r\n * @param uid The user ID of the remote user.\r\n * @param enabled Whether super resolution is successfully enabled:\r\n * - `true`: Super resolution is successfully enabled.\r\n * - `false`: Super resolution is not successfully enabled.\r\n * @param reason The reason why super resolution is not successfully enabled or the message that confirms success. See [`SuperResolutionStateReason`]{@link enum.SuperResolutionStateReason}.\r\n */\r\n (uid: number, enabled: boolean, reason: SuperResolutionStateReason) => void;\r\nexport type UploadLogResultCallback =\r\n /**\r\n * @ignore\r\n *\r\n * @param requestId The request ID. This request ID is the same as requestId returned by `uploadLogFile`, and you can use `requestId` to match a specific upload with a callback.\r\n * @param success Whether the log files are successfully uploaded:\r\n * - `true`: Successfully upload the log files.\r\n * - `false`: Fails to upload the log files. For details, see the reason parameter.\r\n * @param reason The reason for the upload failure. See [`UploadErrorReason`]{@link UploadErrorReason}.\r\n */\r\n (requestId: string, success: boolean, reason: UploadErrorReason) => void;\r\nexport type VirtualBackgroundSourceEnabledCallback =\r\n /**\r\n * @param enabled Whether the virtual background is successfully enabled:\r\n * - `true`: The virtual background is successfully enabled.\r\n * - `false`: The virtual background is not successfully enabled.\r\n * @param reason The reason why the virtual background is not successfully enabled or the message that confirms success. See [`VirtualBackgroundSourceStateReason`]{@link VirtualBackgroundSourceStateReason}.\r\n */\r\n (enabled: boolean, reason: VirtualBackgroundSourceStateReason) => void;\r\nexport type RequestAudioFileInfoCallback =\r\n /**\r\n * @param info The information of an audio file. See [`AudioFileInfo`]{@link AudioFileInfo}.\r\n * @param error The information acquisition state. See [`AudioFileInfoError`]{@link AudioFileInfoError}.\r\n */\r\n (info: AudioFileInfo, error: AudioFileInfoError) => void;\r\nexport type SnapshotTakenCallback =\r\n /**\r\n * @param channel The channel name.\r\n * @param uid The user ID of the user. A `uid` of 0 indicates the local user.\r\n * @param filePath The local path of the snapshot.\r\n * @param width The width (px) of the snapshot.\r\n * @param height The height (px) of the snapshot.\r\n * @param errCode The message that confirms success or the reason why the snapshot is not successfully taken:\r\n * - `0`: Success.\r\n * - < 0: Failure:\r\n * - `-1`: The SDK fails to write data to a file or encode a JPEG image.\r\n * - `-2`: The SDK does not find the video stream of the specified user within one second after\r\n * the [`takeSnapshot`]{@link takeSnapshot} method call succeeds.\r\n */\r\n (\r\n channel: string,\r\n uid: number,\r\n filePath: string,\r\n width: number,\r\n height: number,\r\n errCode: number\r\n ) => void;\r\nexport type ProxyConnectedCallback =\r\n /**\r\n * @param channel The channel name.\r\n * @param uid The user ID.\r\n * @param proxyType The proxy type connected. See [`ProxyType`]{@link ProxyType}.\r\n * @param localProxyIp Reserved for future use.\r\n * @param elapsed The time elapsed (ms) from the user calling `joinChannel` until this callback is triggered.\r\n */\r\n (\r\n channel: string,\r\n uid: number,\r\n proxyType: ProxyType,\r\n localProxyIp: string,\r\n elapsed: number\r\n ) => void;\r\nexport type ClientRoleChangeCallback =\r\n /**\r\n * @param reason The reason for the user role switch failure. See [`ClientRoleChangeFailedReason`]{@link ClientRoleChangeFailedReason}.\r\n * @param currentRole The current user role. See [`ClientRole`]{@link ClientRole}.\r\n */\r\n (reason: ClientRoleChangeFailedReason, currentRole: ClientRole) => void;\r\nexport type RecorderStateChangedCallback =\r\n /**\r\n * @param reason The current recording state:\r\n * - `-1`: An error occurs during the recording. See `error` message for the reason.\r\n * - `2`: The audio and video recording is started.\r\n * - `3`: The audio and video recording is stopped.\r\n * @param state The reason for the state change:\r\n * - `0`: No error occurs.\r\n * - `1`: The SDK fails to write the recorded data to a file.\r\n * - `2`: The SDK does not detect audio and video streams to be recorded, or audio and video streams are interrupted for more than five seconds during recording.\r\n * - `3`: The recording duration exceeds the upper limit.\r\n * - `4`: The recording configuration changes.\r\n * - `5`: The SDK detects audio and video streams from users using versions of the SDK earlier than v3.0.0 in the `Communication` channel profile.\r\n */\r\n (reason: number, state: number) => void;\r\nexport type RecorderInfoCallback =\r\n /**\r\n * @param info Information for the recording file. See [`RecorderInfo`]{@link RecorderInfo}.\r\n */\r\n (info: RecorderInfo) => void;\r\nexport type ContentInspectResultCallback =\r\n /**\r\n * @ignore For future use\r\n */\r\n (result: ContentInspectResult) => void;\r\nexport type WlAccMessageCallback =\r\n /**\r\n * @ignore For future use\r\n */\r\n (reason: WlAccReason, action: WlAccAction, wlAccMsg: string) => void;\r\nexport type WlAccStatsCallback =\r\n /**\r\n * @ignore For future use\r\n */\r\n (currentStats: WlAccStats, averageStats: WlAccStats) => void;\r\nexport type LocalVoicePitchInHzCallback =\r\n /**\r\n * @param pitchInHz The voice pitch (Hz) of the local user.\r\n */\r\n (pitchInHz: number) => void;\r\n\r\n/**\r\n * Callbacks.\r\n *\r\n * The SDK uses the [`RtcEngineEvents`]{@link RtcEngineEvents} interface class to send callbacks to the application, and the application inherits the methods of this interface class to retrieve these callbacks.\r\n * All methods in this interface class have their (empty) default implementations, and the application can inherit only some of the required events instead of all of them.\r\n * In the callbacks, the application should avoid time-consuming tasks or call blocking APIs (such as SendMessage), otherwise, the SDK may not work properly.\r\n */\r\nexport interface RtcEngineEvents {\r\n /**\r\n * Reports a warning during SDK runtime.\r\n *\r\n * In most cases, the app can ignore the warning reported by the SDK because the SDK can usually fix the issue and resume running.\r\n *\r\n * For instance, the SDK may report a [`LookupChannelTimeout`]{@link WarningCode.LookupChannelTimeout} warning upon disconnection with the server and tries to reconnect. For detailed warning codes, see [`WarningCode`]{@link WarningCode}.\r\n *\r\n * @event Warning\r\n */\r\n Warning: WarningCallback;\r\n\r\n /**\r\n * Reports an error during SDK runtime.\r\n *\r\n * In most cases, the SDK cannot fix the issue and resume running. The SDK requires the app to take action or informs the user about the issue.\r\n *\r\n * For example, the SDK reports a [`StartCall`]{@link ErrorCode.StartCall} error when failing to initialize a call. The app informs the user that the call initialization failed and invokes the [`leaveChannel`]{@link RtcEngine.leaveChannel} method to leave the channel. For detailed error codes, see {@link ErrorCode}.\r\n *\r\n * @event Error\r\n */\r\n Error: ErrorCallback;\r\n\r\n /**\r\n * Occurs when an API method is executed.\r\n *\r\n * @event ApiCallExecuted\r\n */\r\n ApiCallExecuted: ApiCallCallback;\r\n\r\n /**\r\n * Occurs when the local user joins a specified channel.\r\n *\r\n * The channel name assignment is based on channelName specified in the joinChannel method.\r\n *\r\n * If the uid is not specified when [`joinChannel`]{@link RtcEngine.joinChannel} is called, the server automatically assigns a uid.\r\n *\r\n * @event JoinChannelSuccess\r\n */\r\n JoinChannelSuccess: UidWithElapsedAndChannelCallback;\r\n\r\n /**\r\n * Occurs when a user rejoins the channel after being disconnected due to network problems.\r\n *\r\n * When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.\r\n *\r\n * @event RejoinChannelSuccess\r\n */\r\n RejoinChannelSuccess: UidWithElapsedAndChannelCallback;\r\n\r\n /**\r\n * Occurs when a user leaves the channel.\r\n *\r\n * When the app calls the [`leaveChannel`]{@link RtcEngine.leaveChannel} method, the SDK uses this callback to notify the app when the user leaves the channel.\r\n *\r\n * With this callback, the application retrieves the channel information, such as the call duration and statistics.\r\n *\r\n * @event LeaveChannel\r\n */\r\n LeaveChannel: RtcStatsCallback;\r\n\r\n /**\r\n * Occurs when the local user registers a user account.\r\n *\r\n * This callback is triggered when the local user successfully registers a user account by calling [`registerLocalUserAccount`]{@link RtcEngine.registerLocalUserAccount}, or joins a channel by calling [`joinChannelWithUserAccount`]{@link RtcEngine.joinChannelWithUserAccount}.\r\n * This callback reports the user ID and user account of the local user.\r\n *\r\n * @event LocalUserRegistered\r\n */\r\n LocalUserRegistered: UserAccountCallback;\r\n\r\n /**\r\n * Occurs when the SDK gets the user ID and user account of the remote user.\r\n *\r\n * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object ([`UserInfo`]{@link UserInfo}), and triggers this callback on the local client.\r\n *\r\n * @event UserInfoUpdated\r\n */\r\n UserInfoUpdated: UserInfoCallback;\r\n\r\n /**\r\n * Occurs when the user role switches successfully in the interactive live streaming.\r\n *\r\n * In the `LiveBroadcasting` channel profile, when the local user successfully calls [`setClientRole`]{@link RtcEngine.setClientRole} to\r\n * switch their user role after joining the channel, for example, from a host to an audience member or vice versa, the SDK triggers\r\n * this callback to report the user role before and after the switch.\r\n *\r\n * @event ClientRoleChanged\r\n */\r\n ClientRoleChanged: ClientRoleCallback;\r\n\r\n /**\r\n * Occurs when a remote user ([`Communication`]{@link ChannelProfile.Communication})/host ([`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting}) joins the channel.\r\n * - [`Communication`]{@link ChannelProfile.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.\r\n * - [`LiveBroadcasting`]{@link ChannelProfile.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.\r\n *\r\n * The SDK triggers this callback under one of the following circumstances:\r\n * - A remote user/host joins the channel by calling [`joinChannel`]{@link RtcEngine.joinChannel}.\r\n * - A remote user switches the user role to the host by calling [`setClientRole`]{@link RtcEngine.setClientRole} after joining the channel.\r\n * - A remote user/host rejoins the channel after a network interruption.\r\n * - The host injects an online media stream into the channel by calling [`addInjectStreamUrl`]{@link RtcEngine.addInjectStreamUrl}.\r\n *\r\n * **Note**\r\n * In the [`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} profile:\r\n * - The host receives the [`UserJoined`]{@link UserJoined} callback when another host joins the channel.\r\n * - The audience in the channel receives the [`UserJoined`]{@link UserJoined} callback when a new host joins the channel.\r\n * - When a web application joins the channel, the [`UserJoined`]{@link UserJoined} callback is triggered as long as the web application publishes streams.\r\n *\r\n * @event UserJoined\r\n */\r\n UserJoined: UidWithElapsedCallback;\r\n\r\n /**\r\n * Occurs when a remote user ([`Communication`]{@link ChannelProfile.Communication})/host ([`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting}) leaves the channel.\r\n *\r\n * There are two reasons for users to become offline:\r\n * - Leave the channel: When the user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.\r\n * - Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the [`Communication`]{@link ChannelProfile.Communication} profile, and more for the [`LiveBroadcasting`]{@link ChannelProfile.LiveBroadcasting} profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections, so we recommend using the Agora RTM SDK for reliable offline detection.\r\n *\r\n * @event UserOffline\r\n */\r\n UserOffline: UserOfflineCallback;\r\n\r\n /**\r\n * Occurs when the network connection state changes.\r\n *\r\n * The Agora SDK returns this callback to report on the current network connection state when it changes, and the reason to such change.\r\n *\r\n * @event ConnectionStateChanged\r\n */\r\n ConnectionStateChanged: ConnectionStateCallback;\r\n\r\n /**\r\n * Occurs when the network type changes.\r\n *\r\n * The SDK returns the current network type in this callback. When the network connection is interrupted, this callback indicates whether the interruption is caused by a network type change or poor network conditions.\r\n *\r\n * @event NetworkTypeChanged\r\n */\r\n NetworkTypeChanged: NetworkTypeCallback;\r\n\r\n /**\r\n * Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.\r\n *\r\n * The SDK triggers this callback when it cannot connect to the server 10 seconds after calling [`joinChannel`]{@link RtcEngine.joinChannel}, regardless of whether it is in the channel or not.\r\n *\r\n * If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.\r\n *\r\n * @event ConnectionLost\r\n */\r\n ConnectionLost: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the token expires in 30 seconds.\r\n *\r\n * 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`]{@link RtcEngine.renewToken} to pass the new token to the SDK.\r\n *\r\n * @event TokenPrivilegeWillExpire\r\n */\r\n TokenPrivilegeWillExpire: TokenCallback;\r\n\r\n /**\r\n * Occurs when the token has expired.\r\n *\r\n * After a token is specified when joining the channel, the token expires after a certain period of time,\r\n * and a new token is required to reconnect to the server. This callback notifies the app to generate a\r\n * new token and call [`joinChannel`]{@link RtcEngine.joinChannel} to rejoin the channel with the new token.\r\n *\r\n * @event RequestToken\r\n */\r\n RequestToken: EmptyCallback;\r\n\r\n /**\r\n * Reports which users are speaking and the speakers' volume, and whether the local user is speaking.\r\n *\r\n * This callback reports the IDs and volumes of the loudest speakers (at most 3) at the moment in the channel, and whether the local user is speaking.\r\n *\r\n * By default, this callback is disabled. You can enable it by calling [`enableAudioVolumeIndication`]{@link RtcEngine.enableAudioVolumeIndication}. Once enabled, this callback is triggered at the set interval, regardless of whether a user speaks or not.\r\n *\r\n * The SDK triggers two independent `AudioVolumeIndication` callbacks at one time, which separately report the volume information of the local user and all the remote speakers. For more information, see the detailed parameter descriptions.\r\n *\r\n * **Note**\r\n * - To enable the voice activity detection of the local user, ensure that you set `report_vad(true)` in the [`enableAudioVolumeIndication`]{@link RtcEngine.enableAudioVolumeIndication} method.\r\n * - Calling [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream} affects the SDK's behavior.\r\n * - If the local user calls [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream}, the SDK stops triggering the local user's callback.\r\n * - 20 seconds after a remote speaker calls [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream}, the remote speakers' callback does not include information of this remote user; 20 seconds after all remote users call the the [`muteLocalAudioStream`]{@link muteLocalAudioStream} method, the SDK stops triggering the remote speakers' callback.\r\n *\r\n * @event AudioVolumeIndication\r\n */\r\n AudioVolumeIndication: AudioVolumeCallback;\r\n\r\n /**\r\n * Occurs when the most active remote speaker is detected.\r\n *\r\n * This callback reports the speaker with the highest accumulative volume during a certain period. If the user enables the audio volume indication by\r\n * calling [`enableAudioVolumeIndication`]{@link RtcEngine.enableAudioVolumeIndication}, this callback returns the uid of the active speaker whose voice is detected by the audio volume detection module of the SDK.\r\n *\r\n * **Note**\r\n * - To receive this callback, you need to call [`enableAudioVolumeIndication`]{@link RtcEngine.enableAudioVolumeIndication}.\r\n * - This callback returns the user ID of the user with the highest voice volume during a period of time, instead of at the moment.\r\n *\r\n * @event ActiveSpeaker\r\n */\r\n ActiveSpeaker: UidCallback;\r\n\r\n /**\r\n * Occurs when the first local audio frame is sent.\r\n *\r\n * @deprecated Deprecated as of v3.1.2. Use [`FirstLocalAudioFramePublished`]{@link RtcEngineEvents.FirstLocalAudioFramePublished} instead.\r\n *\r\n * @event FirstLocalAudioFrame\r\n */\r\n FirstLocalAudioFrame: ElapsedCallback;\r\n\r\n /**\r\n * Occurs when the first local video frame is rendered.\r\n *\r\n * This callback is triggered after the first local video frame is rendered on the local video window.\r\n *\r\n * @event FirstLocalVideoFrame\r\n */\r\n FirstLocalVideoFrame: VideoFrameCallback;\r\n\r\n /**\r\n * Occurs when a remote user stops/resumes sending the video stream.\r\n *\r\n * The SDK triggers this callback when the remote user stops or resumes sending the video stream by calling the [`muteLocalVideoStream`]{@link RtcEngine.muteLocalVideoStream} method.\r\n *\r\n * **Note**\r\n *\r\n * This callback is invalid when the number of users or hosts in the channel exceeds 17.\r\n *\r\n * @event UserMuteVideo\r\n */\r\n UserMuteVideo: UidWithMutedCallback;\r\n\r\n /**\r\n * Occurs when the video size or rotation information of a remote user changes.\r\n *\r\n * @event VideoSizeChanged\r\n */\r\n VideoSizeChanged: VideoSizeCallback;\r\n\r\n /**\r\n * Occurs when the remote video state changes.\r\n *\r\n * @event RemoteVideoStateChanged\r\n */\r\n RemoteVideoStateChanged: RemoteVideoStateCallback;\r\n\r\n /**\r\n * Occurs when the local video state changes.\r\n *\r\n * The SDK returns the current video state in this callback.\r\n *\r\n * The SDK triggers the `LocalVideoStateChanged(Failed, CaptureFailure)` callback in the following situations:\r\n * - On Android:\r\n * - (Android 9 or later) The application exits to the background, and the system recycles the camera.\r\n * - (Android 6 or later) The camera is occupied by a third-party application. When the third-party application releases the camera, the SDK triggers the `LocalVideoStateChanged(Capturing, OK)` callback.\r\n * - The camera starts normally, but the captured video is not output for four seconds.\r\n * - On iOS:\r\n * - The application exits to the background, and the system recycles the camera.\r\n * - The camera starts normally, but the captured video is not output for four seconds.\r\n *\r\n * When the camera outputs the captured video frames, if all the video frames are the same for 15 consecutive frames, the SDK triggers the `LocalVideoStateChanged(Capturing, CaptureFailure)` callback. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps.\r\n *\r\n * @event LocalVideoStateChanged\r\n */\r\n LocalVideoStateChanged: LocalVideoStateCallback;\r\n\r\n /**\r\n * Occurs when the remote audio state changes.\r\n *\r\n * This callback indicates the state change of the remote audio stream.\r\n *\r\n * **Note**\r\n *\r\n * This callback does not work properly when the number of users (in the [`Communication`] profile) or hosts (in the [`LiveBroadcasting`] profile) in the channel exceeds 17.\r\n *\r\n * @event RemoteAudioStateChanged\r\n */\r\n RemoteAudioStateChanged: RemoteAudioStateCallback;\r\n\r\n /**\r\n * Occurs when the local audio stream state changes.\r\n *\r\n * This callback indicates the state change of the local audio stream, including the state of the audio recording and encoding, and allows you to troubleshoot issues when exceptions occur.\r\n *\r\n * **Note**\r\n *\r\n * When the state is [`Failed`]{@link AudioLocalState.Failed}, see the `error` parameter for details.\r\n *\r\n * @event LocalAudioStateChanged\r\n */\r\n LocalAudioStateChanged: LocalAudioStateCallback;\r\n\r\n /**\r\n * Occurs when the published media stream falls back to an audio-only stream due to poor network conditions\r\n * or switches back to video stream after the network conditions improve.\r\n *\r\n * If you call [`setLocalPublishFallbackOption`]{@link RtcEngine.setLocalPublishFallbackOption} and set option as [`AudioOnly`]{@link StreamFallbackOptions.AudioOnly},\r\n * this callback is triggered when the locally published stream falls back to audio-only mode due to poor uplink conditions,\r\n * or when the audio stream switches back to the video after the uplink network condition improves. Once the published stream falls back to audio only,\r\n * the remote app receives the [`RemoteVideoStateChanged`]{@link RemoteVideoStateChanged} callback.\r\n *\r\n * @event LocalPublishFallbackToAudioOnly\r\n */\r\n LocalPublishFallbackToAudioOnly: FallbackCallback;\r\n\r\n /**\r\n * 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.\r\n *\r\n * If you call [`setRemoteSubscribeFallbackOption`]{@link RtcEngine.setRemoteSubscribeFallbackOption} and set\r\n * option as [`AudioOnly`]{@link StreamFallbackOptions.AudioOnly},\r\n * this callback is triggered when the remotely subscribed media stream falls back to audio-only mode due\r\n * to poor downlink conditions, or when the remotely subscribed media stream switches back to the video after\r\n * the downlink network condition improves.\r\n *\r\n * @event RemoteSubscribeFallbackToAudioOnly\r\n */\r\n RemoteSubscribeFallbackToAudioOnly: FallbackWithUidCallback;\r\n\r\n /**\r\n * Occurs when the local audio playback route changes.\r\n *\r\n * This callback returns that the audio route switched to an earpiece, speakerphone, headset, or Bluetooth device.\r\n *\r\n * The definition of the routing is listed in [`AudioOutputRouting`]{@link AudioOutputRouting}.\r\n *\r\n * @event AudioRouteChanged\r\n */\r\n AudioRouteChanged: AudioRouteCallback;\r\n\r\n /**\r\n * Occurs when the camera focus area is changed.\r\n *\r\n * The SDK triggers this callback when the local user changes the camera focus position by\r\n * calling [`setCameraFocusPositionInPreview`]{@link RtcEngine.setCameraFocusPositionInPreview}.\r\n *\r\n * @event CameraFocusAreaChanged\r\n */\r\n CameraFocusAreaChanged: RectCallback;\r\n\r\n /**\r\n * The camera exposure area has changed.\r\n *\r\n * The SDK triggers this callback when the local user changes the camera exposure position by calling [`setCameraExposurePosition`]{@link RtcEngine.setCameraExposurePosition}.\r\n *\r\n * @event CameraExposureAreaChanged\r\n */\r\n CameraExposureAreaChanged: RectCallback;\r\n\r\n /**\r\n * Reports the face detection result of the local user.\r\n *\r\n * Once you enable face detection by calling [`enableFaceDetection`]{@link RtcEngine.enableFaceDetection}, you can get the following information on the local user in real-time:\r\n * - The width and height of the local video.\r\n * - The position of the human face in the local video.\r\n * - The distance between the human face and the device screen. This value is based on the fitting calculation of the local video size and the position of the human face.\r\n *\r\n * **Note**\r\n * - If the SDK does not detect a face, it reduces the frequency of this callback to reduce power consumption on the local device.\r\n * - The SDK stops triggering this callback when a human face is in close proximity to the screen.\r\n * - On Android, the distance value reported in this callback may be slightly different from the actual distance. Therefore, Agora does not recommend using it for accurate calculation.\r\n *\r\n * @event FacePositionChanged\r\n */\r\n FacePositionChanged: FacePositionCallback;\r\n\r\n /**\r\n * Reports the statistics of the [`RtcEngine`]{@link RtcEngine} once every two seconds.\r\n *\r\n * @event RtcStats\r\n */\r\n RtcStats: RtcStatsCallback;\r\n\r\n /**\r\n * Reports the last mile network quality of the local user once every two seconds before the user joins the channel.\r\n * Last mile refers to the connection between the local device and Agora's edge server. After the application calls the [`enableLastmileTest`]{@link RtcEngine.enableLastmileTest} method,\r\n * this callback reports once every two seconds the uplink and downlink last mile network conditions of the local user before the user joins the channel.\r\n *\r\n * @event LastmileQuality\r\n */\r\n LastmileQuality: NetworkQualityCallback;\r\n\r\n /**\r\n * Reports the last mile network quality of each user in the channel once every two seconds.\r\n *\r\n * 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.\r\n *\r\n * **Note**\r\n * `txQuality` is `Unknown` when the user is not sending a stream; `rxQuality` is `Unknown` when the user is not receiving a stream.\r\n *\r\n * @event NetworkQuality\r\n */\r\n NetworkQuality: NetworkQualityWithUidCallback;\r\n\r\n /**\r\n * Reports the last-mile network probe result.\r\n *\r\n * The SDK triggers this callback within 30 seconds after the app calls [`startLastmileProbeTest`]{@link RtcEngine.startLastmileProbeTest}.\r\n *\r\n * @event LastmileProbeResult\r\n */\r\n LastmileProbeResult: LastmileProbeCallback;\r\n\r\n /**\r\n * Reports the statistics of the local video streams.\r\n *\r\n * The SDK triggers this callback once every two seconds for each user/host. If there are multiple users/hosts in the channel, the SDK triggers this callback as many times.\r\n *\r\n * @event LocalVideoStats\r\n */\r\n LocalVideoStats: LocalVideoStatsCallback;\r\n\r\n /**\r\n * Reports the statistics of the local audio stream.\r\n *\r\n * @event LocalAudioStats\r\n */\r\n LocalAudioStats: LocalAudioStatsCallback;\r\n\r\n /**\r\n * 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/host. If a channel includes multiple remote users, the SDK triggers this callback as many times.\r\n *\r\n * @event RemoteVideoStats\r\n */\r\n RemoteVideoStats: RemoteVideoStatsCallback;\r\n\r\n /**\r\n * Reports the statistics of the audio stream from each remote user/host.\r\n *\r\n * 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.\r\n *\r\n * 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.\r\n *\r\n * @event RemoteAudioStats\r\n */\r\n RemoteAudioStats: RemoteAudioStatsCallback;\r\n\r\n /**\r\n * Occurs when the audio mixing file playback finishes.\r\n *\r\n * You can start an audio mixing file playback by calling [`startAudioMixing`]{@link RtcEngine.startAudioMixing}. This callback is triggered when the audio mixing file playback finishes.\r\n *\r\n * If the [`startAudioMixing`]{@link RtcEngine.startAudioMixing} method call fails, an [`AudioMixingOpenError`]{@link WarningCode.AudioMixingOpenError} warning returns in the [`Warning`]{@link Warning} callback.\r\n *\r\n * @event AudioMixingFinished\r\n */\r\n AudioMixingFinished: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the playback state of the local user's music file changes.\r\n *\r\n * @since 3.4.2\r\n *\r\n * When the playback state of the local user's music file changes, the SDK triggers this callback and reports\r\n * the current playback state and the reason for the change.\r\n *\r\n * @event AudioMixingStateChanged\r\n */\r\n AudioMixingStateChanged: AudioMixingStateCallback;\r\n\r\n /**\r\n * Occurs when the audio effect file playback finishes.\r\n *\r\n * You can start a local audio effect playback by calling [`playEffect`]{@link RtcEngine.playEffect}. This callback is triggered when the local audio effect file playback finishes.\r\n *\r\n * @event AudioEffectFinished\r\n */\r\n AudioEffectFinished: SoundIdCallback;\r\n\r\n /**\r\n * Occurs when the state of the RTMP or RTMPS streaming changes.\r\n *\r\n * 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.\r\n *\r\n * This callback indicates the state of the RTMP or RTMPS streaming. When exceptions occur,\r\n * you can troubleshoot issues by referring to the detailed error descriptions in the `errCode` parameter.\r\n *\r\n * @event RtmpStreamingStateChanged\r\n */\r\n RtmpStreamingStateChanged: RtmpStreamingStateCallback;\r\n\r\n /**\r\n * Occurs when the publisher's transcoding settings are updated.\r\n *\r\n * When the `LiveTranscoding` class in the [`setLiveTranscoding`]{@link RtcEngine.setLiveTranscoding} method updates, the SDK triggers this callback to report the update information.\r\n *\r\n * **Note**\r\n * - If you call [`setLiveTranscoding`]{@link RtcEngine.setLiveTranscoding} to set the `LiveTranscoding` class for the first time, the SDK does not trigger this callback.\r\n *\r\n * @event TranscodingUpdated\r\n */\r\n TranscodingUpdated: EmptyCallback;\r\n\r\n /**\r\n * Reports the status of injecting the online media stream.\r\n *\r\n * **Warning**\r\n *\r\n * Agora will soon stop the service for injecting online media streams on the client. If you have not implemented this service, Agora recommends that you do not use it.\r\n *\r\n *\r\n * @event StreamInjectedStatus\r\n */\r\n StreamInjectedStatus: StreamInjectedStatusCallback;\r\n\r\n /**\r\n * Occurs when the local user receives a remote data stream.\r\n *\r\n * The SDK triggers this callback when the local user receives the stream message that the remote user sends\r\n * by calling the [`sendStreamMessage`]{@link RtcEngine.sendStreamMessage} method.\r\n *\r\n * @event StreamMessage\r\n */\r\n StreamMessage: StreamMessageCallback;\r\n\r\n /**\r\n * Occurs when the local user fails to receive a remote data stream.\r\n *\r\n * The SDK triggers this callback when the local user fails to receive the stream message that the remote\r\n * user sends by calling the [`sendStreamMessage`]{@link RtcEngine.sendStreamMessage} method.\r\n *\r\n * @event StreamMessageError\r\n */\r\n StreamMessageError: StreamMessageErrorCallback;\r\n\r\n /**\r\n * Occurs when the media engine is loaded.\r\n *\r\n * @event MediaEngineLoadSuccess\r\n */\r\n MediaEngineLoadSuccess: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the media engine starts.\r\n *\r\n * @event MediaEngineStartCallSuccess\r\n */\r\n MediaEngineStartCallSuccess: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the state of the media stream relay changes.\r\n *\r\n * The SDK reports the state of the current media relay and possible error messages in this callback.\r\n *\r\n * @event ChannelMediaRelayStateChanged\r\n */\r\n ChannelMediaRelayStateChanged: MediaRelayStateCallback;\r\n\r\n /**\r\n * Reports events during the media stream relay.\r\n *\r\n * @event ChannelMediaRelayEvent\r\n */\r\n ChannelMediaRelayEvent: MediaRelayEventCallback;\r\n\r\n /**\r\n * Occurs when the first remote video frame is rendered.\r\n *\r\n * This callback is triggered after the first frame of the remote video is rendered on the video window.\r\n * The application can retrieve the data of the time elapsed from the user joining the channel until the first video frame is displayed.\r\n *\r\n * @event FirstRemoteVideoFrame\r\n */\r\n FirstRemoteVideoFrame: VideoFrameWithUidCallback;\r\n\r\n /**\r\n * Occurs when the first remote audio frame is received.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`Starting`]{@link AudioRemoteState.Starting} in [`RemoteAudioStateChanged`]{@link RemoteAudioStateChanged} instead.\r\n *\r\n * @event FirstRemoteAudioFrame\r\n */\r\n FirstRemoteAudioFrame: UidWithElapsedCallback;\r\n\r\n /**\r\n * Occurs when the engine receives the first audio frame from a specified remote user.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`Decoding`]{@link VideoRemoteState.Decoding} in [`RemoteAudioStateChanged`]{@link RemoteAudioStateChanged} instead.\r\n *\r\n * This callback is triggered in either of the following scenarios:\r\n * - The remote user joins the channel and sends the audio stream.\r\n * - The remote user stops sending the audio stream and re-sends it after 15 seconds. Possible reasons include:\r\n * - The remote user leaves channel.\r\n * - The remote user drops offline.\r\n * - The remote user calls [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream}.\r\n * - The remote user calls [`disableAudio`]{@link RtcEngine.disableAudio}.\r\n *\r\n * @event FirstRemoteAudioDecoded\r\n */\r\n FirstRemoteAudioDecoded: UidWithElapsedCallback;\r\n\r\n /**\r\n * Occurs when a remote user stops/resumes sending the audio stream.\r\n *\r\n * The SDK triggers this callback when the remote user stops or resumes sending the audio stream by calling the [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream} method.\r\n *\r\n * **Note**\r\n *\r\n * This callback is invalid when the number of users or hosts in the channel exceeds 17.\r\n *\r\n * @event UserMuteAudio\r\n */\r\n UserMuteAudio: UidWithMutedCallback;\r\n\r\n /**\r\n * Reports the result of calling [`addPublishStreamUrl`]{@link RtcEngine.addPublishStreamUrl}.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`RtmpStreamingStateChanged`]{@link RtmpStreamingStateChanged} instead.\r\n *\r\n * This callback indicates whether you have successfully added an RTMP or RTMPS stream to the CDN.\r\n *\r\n * @event StreamPublished\r\n */\r\n StreamPublished: UrlWithErrorCallback;\r\n\r\n /**\r\n * Reports the result of calling [`removePublishStreamUrl`]{@link RtcEngine.removePublishStreamUrl}.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`RtmpStreamingStateChanged`]{@link RtmpStreamingStateChanged} instead.\r\n *\r\n * This callback indicates whether you have successfully removed an RTMP or RTMPS stream from the CDN.\r\n *\r\n * @event StreamUnpublished\r\n */\r\n StreamUnpublished: UrlCallback;\r\n\r\n /**\r\n * Reports the transport-layer statistics of each remote audio stream.\r\n *\r\n * @deprecated\r\n *\r\n * This callback is deprecated. Use [`RemoteAudioStats`]{@link RemoteAudioStats} instead.\r\n *\r\n * This callback reports the transport-layer statistics, such as the packet loss rate and time delay,\r\n * once every two seconds after the local user receives an audio packet from a remote user.\r\n *\r\n * @event RemoteAudioTransportStats\r\n */\r\n RemoteAudioTransportStats: TransportStatsCallback;\r\n\r\n /**\r\n * Reports the transport-layer statistics of each remote video stream.\r\n *\r\n * @deprecated\r\n *\r\n * This callback is deprecated. Use [`RemoteVideoStats`]{@link RemoteVideoStats} instead.\r\n *\r\n * This callback reports the transport-layer statistics, such as the packet loss rate and time delay,\r\n * once every two seconds after the local user receives the video packet from a remote user.\r\n *\r\n * @event RemoteVideoTransportStats\r\n */\r\n RemoteVideoTransportStats: TransportStatsCallback;\r\n\r\n /**\r\n * Occurs when a remote user enables/disables the video module.\r\n *\r\n * Once the video module is disabled, the remote user can only use a voice call. The remote user cannot send or receive any video from other users.\r\n *\r\n * The SDK triggers this callback when the remote user enables or disables the video module by calling the [`enableVideo`]{@link RtcEngine.enableVideo} or [`disableVideo`]{@link RtcEngine.disableVideo} method.\r\n *\r\n * **Note**\r\n *\r\n * This callback is invalid when the number of users or hosts in the channel exceeds 17.\r\n *\r\n * @event UserEnableVideo\r\n */\r\n UserEnableVideo: UidWithEnabledCallback;\r\n\r\n /**\r\n * Occurs when a remote user enables/disables the local video capture function.\r\n *\r\n * The SDK triggers this callback when the remote user resumes or stops capturing the video stream by\r\n * calling [`enableLocalVideo`]{@link RtcEngine.enableLocalVideo}.\r\n *\r\n * This callback is only applicable to the scenario when the remote user only wants to watch the remote video without sending any video stream to the other user.\r\n *\r\n * @event UserEnableLocalVideo\r\n */\r\n UserEnableLocalVideo: UidWithEnabledCallback;\r\n\r\n /**\r\n * Occurs when the first remote video frame is received and decoded.\r\n *\r\n * @deprecated\r\n *\r\n * This callback is deprecated. Use [`Starting`]{@link VideoRemoteState.Starting} or [`Decoding`]{@link VideoRemoteState.Decoding} in the [`RemoteVideoStateChanged`]{@link RemoteVideoStateChanged} callback instead.\r\n *\r\n * This callback is triggered in either of the following scenarios:\r\n * - The remote user joins the channel and sends the video stream.\r\n * - The remote user stops sending the video stream and re-sends it after 15 seconds. Possible reasons include:\r\n * - The remote user leaves channel.\r\n * - The remote user drops offline.\r\n * - The remote user calls [`muteLocalVideoStream`]{@link RtcEngine.muteLocalVideoStream}.\r\n * - The remote user calls [`disableVideo`]{@link RtcEngine.disableVideo}.\r\n *\r\n * @event FirstRemoteVideoDecoded\r\n */\r\n FirstRemoteVideoDecoded: VideoFrameWithUidCallback;\r\n\r\n /**\r\n * Occurs when the microphone is enabled/disabled.\r\n *\r\n * @deprecated\r\n *\r\n * This callback is deprecated. Use [`Stopped`]{@link AudioLocalState.Stopped} or [`Recording`]{@link AudioLocalState.Recording} in the [`LocalAudioStateChanged`]{@link LocalAudioStateChanged} callback instead.\r\n *\r\n * The SDK triggers this callback when the local user resumes or stops capturing the local audio stream by calling [`enableLocalAudio`]{@link RtcEngine.enableLocalAudio}.\r\n *\r\n * @event MicrophoneEnabled\r\n */\r\n MicrophoneEnabled: EnabledCallback;\r\n\r\n /**\r\n * Occurs when the connection between the SDK and the server is interrupted.\r\n *\r\n * @deprecated\r\n *\r\n * Use {@link ConnectionStateChanged} instead.\r\n *\r\n * The SDK triggers this callback when it loses connection to the server for more than four seconds after\r\n * the connection is established. After triggering this callback, the SDK tries to reconnect to the server.\r\n * You can use this callback to implement pop-up reminders. This callback is different from [`ConnectionLost`]{@link ConnectionLost}:\r\n * - The SDK triggers the [`ConnectionInterrupted`]{@link ConnectionInterrupted} callback when the SDK loses\r\n * connection with the server for more than four seconds after it joins the channel.\r\n * - The SDK triggers the [`ConnectionLost`]{@link ConnectionLost} callback when it loses connection with\r\n * the server for more than 10 seconds, regardless of whether it joins the channel or not.\r\n *\r\n * If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.\r\n *\r\n * @event ConnectionInterrupted\r\n */\r\n ConnectionInterrupted: EmptyCallback;\r\n\r\n /**\r\n * Occurs when your connection is banned by the Agora Server.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`ConnectionStateChanged`]{@link ConnectionStateChanged} instead.\r\n *\r\n * @event ConnectionBanned\r\n */\r\n ConnectionBanned: EmptyCallback;\r\n\r\n /**\r\n * Reports the statistics of the audio stream from each remote user/host.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`RemoteAudioStats`]{@link RemoteAudioStats} instead.\r\n *\r\n * The SDK triggers this callback once every two seconds to report the audio quality of each remote user/host sending an audio stream. If a channel has multiple remote users/hosts sending audio streams, the SDK trggers this callback as many times.\r\n *\r\n * @event AudioQuality\r\n */\r\n AudioQuality: AudioQualityCallback;\r\n\r\n /**\r\n * Occurs when the camera is turned on and ready to capture video.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`Capturing`]{@link LocalVideoStreamState.Capturing} in the [`LocalVideoStateChanged`]{@link LocalVideoStateChanged} callback instead.\r\n * If the camera fails to turn on, fix the error reported in the [`Error`]{@link Error} callback.\r\n *\r\n * @event CameraReady\r\n */\r\n CameraReady: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the video stops playing.\r\n *\r\n * @deprecated\r\n *\r\n * Use [`Stopped`]{@link LocalVideoStreamState.Stopped} in the [`LocalVideoStateChanged`]{@link LocalVideoStateChanged} callback instead.\r\n * The application can use this callback to change the configuration of the view (for example, displaying other pictures in the view)\r\n * after the video stops playing.\r\n *\r\n * @event VideoStopped\r\n */\r\n VideoStopped: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the local user receives the metadata.\r\n *\r\n * @event MetadataReceived\r\n */\r\n MetadataReceived: MetadataCallback;\r\n\r\n /**\r\n * Occurs when the first audio frame is published.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * The SDK triggers this callback under one of the following circumstances:\r\n * - The local client enables the audio module and calls [`joinChannel`]{@link joinChannel} successfully.\r\n * - The local client calls [`muteLocalAudioStream(true)`]{@link RtcEngine.muteLocalAudioStream} and [`muteLocalAudioStream(false)`]{@link RtcEngine.muteLocalAudioStream} in sequence.\r\n * - The local client calls [`disableAudio`]{@link RtcEngine.disableAudio} and [`enableAudio`]{@link RtcEngine.enableAudio} in sequence.\r\n *\r\n * @event FirstLocalAudioFramePublished\r\n */\r\n FirstLocalAudioFramePublished: ElapsedCallback;\r\n\r\n /**\r\n * Occurs when the first video frame is published.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * The SDK triggers this callback under one of the following circumstances:\r\n * - The local client enables the video module and calls [`joinChannel`]{@link joinChannel} successfully.\r\n * - The local client calls [`muteLocalVideoStream(true)`]{@link RtcEngine.muteLocalVideoStream} and [`muteLocalVideoStream(false)`]{@link RtcEngine.muteLocalVideoStream} in sequence.\r\n * - The local client calls [`disableVideo`]{@link RtcEngine.disableVideo} and [`enableVideo`]{@link RtcEngine.enableVideo} in sequence.\r\n *\r\n * @event FirstLocalVideoFramePublished\r\n */\r\n FirstLocalVideoFramePublished: ElapsedCallback;\r\n\r\n /**\r\n * Occurs when the audio publishing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the publishing state change of the local audio stream.\r\n *\r\n * @event AudioPublishStateChanged\r\n */\r\n AudioPublishStateChanged: StreamPublishStateCallback;\r\n\r\n /**\r\n * Occurs when the video publishing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the publishing state change of the local video stream.\r\n *\r\n * @event VideoPublishStateChanged\r\n */\r\n VideoPublishStateChanged: StreamPublishStateCallback;\r\n\r\n /**\r\n * Occurs when the audio subscribing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the subscribing state change of a remote audio stream.\r\n *\r\n * @event AudioSubscribeStateChanged\r\n */\r\n AudioSubscribeStateChanged: StreamSubscribeStateCallback;\r\n\r\n /**\r\n * Occurs when the video subscribing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the subscribing state change of a remote video stream.\r\n *\r\n * @event VideoSubscribeStateChanged\r\n */\r\n VideoSubscribeStateChanged: StreamSubscribeStateCallback;\r\n\r\n /**\r\n * Reports events during the RTMP or RTMPS streaming.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * @event RtmpStreamingEvent\r\n */\r\n RtmpStreamingEvent: RtmpStreamingEventCallback;\r\n\r\n /**\r\n * Reports whether the super resolution feature is successfully enabled. (beta feature)\r\n *\r\n * @since v3.5.2\r\n *\r\n * After calling [`enableRemoteSuperResolution`]{@link enableRemoteSuperResolution}, the SDK triggers this callback to report whether\r\n * super resolution is successfully enabled. If it is not successfully enabled, use `reason` for troubleshooting.\r\n *\r\n * @event UserSuperResolutionEnabled\r\n */\r\n UserSuperResolutionEnabled: UserSuperResolutionEnabledCallback;\r\n\r\n /**\r\n * @ignore\r\n *\r\n * Reports the result of uploading the SDK log files.\r\n *\r\n * @since v3.3.1 (later)\r\n *\r\n * After the method call of `uploadLogFile`, the SDK triggers this callback to report the result of uploading the log files. If the upload fails, refer to the `reason` parameter to troubleshoot.\r\n *\r\n * @event UploadLogResultCallback\r\n */\r\n UploadLogResult: UploadLogResultCallback;\r\n\r\n /**\r\n * @ignore\r\n */\r\n AirPlayIsConnected: EmptyCallback;\r\n\r\n /**\r\n * Reports whether the virtual background is successfully enabled.\r\n *\r\n * **since** v3.5.0.3\r\n *\r\n * After you call [`enableVirtualBackground`]{@link enableVirtualBackground}, the SDK triggers this callback to report whether the virtual background is successfully enabled.\r\n *\r\n * **Note**\r\n *\r\n * If the background image customized in the virtual background is in PNG or JPG format, the triggering of this callback is delayed until the image is read.\r\n *\r\n */\r\n VirtualBackgroundSourceEnabled: VirtualBackgroundSourceEnabledCallback;\r\n\r\n /**\r\n * Reports the information of an audio file.\r\n *\r\n * @since v3.5.2\r\n *\r\n * After successfully calling [`getAudioFileInfo`]{@link getAudioFileInfo},\r\n * the SDK triggers this callback to report the information of the audio file, such as the file path and\r\n * duration.\r\n *\r\n * @event RequestAudioFileInfo\r\n */\r\n RequestAudioFileInfo: RequestAudioFileInfoCallback;\r\n\r\n /**\r\n * Reports the result of taking a video snapshot.\r\n *\r\n * @since v3.5.2\r\n *\r\n * After a successful [`takeSnapshot`]{@link RtcEngine.takeSnapshot} method call, the SDK triggers this callback to report whether the snapshot is successfully taken as well as the details for the snapshot taken.\r\n *\r\n * @event SnapshotTaken\r\n */\r\n SnapshotTaken: SnapshotTakenCallback;\r\n\r\n /**\r\n * Occurs when the recording state changes.\r\n *\r\n * @since v3.6.2\r\n *\r\n * When the local audio and video recording state changes, the SDK triggers this callback to report the current recording state and the reason for the change.\r\n *\r\n */\r\n RecorderStateChanged: RecorderStateChangedCallback;\r\n\r\n /**\r\n * Occurs when the recording information is updated.\r\n *\r\n * @since v3.6.2\r\n *\r\n * After you successfully register this callback and enable the local audio and video recording,\r\n * the SDK periodically triggers the `RecorderInfoUpdated` callback based on the set value of\r\n * `recorderInfoUpdateInterval`.\r\n *\r\n * This callback reports the filename, duration, and size of the current recording file.\r\n *\r\n */\r\n RecorderInfoUpdated: RecorderInfoCallback;\r\n\r\n /**\r\n * Reports the proxy connection state.\r\n *\r\n * @since v3.6.2\r\n *\r\n * You can use this callback to listen for the state of the SDK connecting to a proxy.\r\n * For example, when a user calls [`setCloudProxy`]{@link RtcEngine.setCloudProxy} and joins a channel successfully,\r\n * the SDK triggers this callback to report the user ID, the proxy type connected,\r\n * and the time elapsed from the user calling `joinChannel` until this callback is triggered.\r\n *\r\n * @event ProxyConnectedCallback\r\n */\r\n ProxyConnected: ProxyConnectedCallback;\r\n\r\n /**\r\n * @ignore For future use\r\n */\r\n ContentInspectResult: ContentInspectResultCallback;\r\n\r\n /**\r\n * @ignore For future use\r\n */\r\n WlAccMessage: WlAccMessageCallback;\r\n\r\n /**\r\n * @ignore For future use\r\n */\r\n WlAccStats: WlAccStatsCallback;\r\n\r\n /**\r\n * Occurs when the user role switch fails in the interactive live streaming.\r\n *\r\n * @since v3.7.0\r\n *\r\n * In the `LiveBroadcasting` channel profile, when the local user calls [`setClientRole`]{@link RtcEngine.setClientRole} to\r\n * switch their user role after joining the channel but the switch fails, the SDK triggers this callback to\r\n * report the reason for the failure and the current user role.\r\n *\r\n * @event ClientRoleChangeCallback\r\n */\r\n ClientRoleChangeFailed: ClientRoleChangeCallback;\r\n\r\n /**\r\n * Reports the voice pitch of the local user.\r\n *\r\n * @since v3.7.0\r\n *\r\n * After the local audio capture is enabled and you call [`enableLocalVoicePitchCallback`]{@link enableLocalVoicePitchCallback},\r\n * the SDK triggers the `LocalVoicePitchInHz` callback at the time interval set in `enableLocalVoicePitchCallback`.\r\n *\r\n * **Note**\r\n * After this callback is enabled, if the user disables the local audio capture, for example,\r\n * by calling [`enableLocalAudio(false)`]{@link RtcEngine.enableLocalAudio}, the SDK immediately stops sending\r\n * the `LocalVoicePitchInHz` callback.\r\n */\r\n LocalVoicePitchInHz: LocalVoicePitchInHzCallback;\r\n}\r\n\r\n/**\r\n * The [`RtcChannelEvents`]{@link RtcChannelEvents} interface.\r\n */\r\nexport interface RtcChannelEvents {\r\n /**\r\n * Reports the warning code of the [`RtcChannel`]{@link RtcChannel} instance.\r\n *\r\n * @event Warning\r\n */\r\n Warning: WarningCallback;\r\n\r\n /**\r\n * Reports the error code of the [`RtcChannel`]{@link RtcChannel} instance.\r\n *\r\n * @event Error\r\n */\r\n Error: ErrorCallback;\r\n\r\n /**\r\n * Occurs when the local user joins a specified channel.\r\n *\r\n * If the uid is not specified when calling [`joinChannel`]{@link RtcChannel.joinChannel}, the\r\n * server automatically assigns a uid.\r\n *\r\n * @event JoinChannelSuccess\r\n */\r\n JoinChannelSuccess: UidWithElapsedAndChannelCallback;\r\n\r\n /**\r\n * Occurs when a user rejoins the channel after being disconnected due to network problems.\r\n *\r\n * When a user loses connection with the server because of network problems, the SDK automatically tries\r\n * to reconnect and triggers this callback upon reconnection.\r\n *\r\n * @event RejoinChannelSuccess\r\n */\r\n RejoinChannelSuccess: UidWithElapsedAndChannelCallback;\r\n\r\n /**\r\n * Occurs when a user leaves the channel.\r\n *\r\n * When a user leaves the channel by using the [`leaveChannel`]{@link RtcChannel.leaveChannel} method, the SDK uses this callback to notify the app when the user leaves the channel.\r\n *\r\n * With this callback, the app retrieves the channel information, such as the call duration and statistics.\r\n *\r\n * @event LeaveChannel\r\n */\r\n LeaveChannel: RtcStatsCallback;\r\n\r\n /**\r\n * Occurs when the user role switches successfully in the interactive live streaming.\r\n *\r\n * In the `LiveBroadcasting` channel profile, when the local user successfully calls [`setClientRole`]{@link RtcChannel.setClientRole} to\r\n * switch their user role after joining the channel, for example, from a host to an audience member or vice versa, the SDK triggers\r\n * this callback to report the user role before and after the switch.\r\n *\r\n * @event ClientRoleChanged\r\n */\r\n ClientRoleChanged: ClientRoleCallback;\r\n\r\n /**\r\n * Occurs when a remote user (`Communication`) or a host (`LiveBroadcasting`) joins the channel.\r\n * - `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.\r\n * - `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.\r\n *\r\n * The SDK triggers this callback under one of the following circumstances:\r\n * - A remote user/host joins the channel by calling [`joinChannel`]{@link RtcChannel.joinChannel}.\r\n * - A remote user switches the user role to the host by calling [`setClientRole`]{@link RtcChannel.setClientRole} after joining the channel.\r\n * - A remote user/host rejoins the channel after a network interruption.\r\n * - The host injects an online media stream into the channel by calling [`addInjectStreamUrl`]{@link RtcChannel.addInjectStreamUrl}.\r\n *\r\n * **Note**\r\n * - In the `LiveBroadcasting` profile:\r\n * - The host receives this callback when another host joins the channel.\r\n * - The audience in the channel receives this callback when a new host joins the channel.\r\n * - When a web app joins the channel, this callback is triggered as long as the web app publishes streams.\r\n *\r\n * @event UserJoined\r\n */\r\n UserJoined: UidWithElapsedCallback;\r\n\r\n /**\r\n * Occurs when a remote user (`Communication`) or a host (`LiveBroadcasting`) leaves the channel.\r\n *\r\n * There are two reasons for users to become offline:\r\n * - Leave the channel: When the user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.\r\n * - Go offline: When no data packet of the user or host is received for a certain period of time (around 20 seconds), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections, so we recommend using the Agora RTM SDK for reliable offline detection.\r\n *\r\n * @event UserOffline\r\n */\r\n UserOffline: UserOfflineCallback;\r\n\r\n /**\r\n * Occurs when the network connection state changes.\r\n *\r\n * The Agora SDK triggers this callback to report on the current network connection state when it changes,\r\n * and the reason to such change.\r\n *\r\n * @event ConnectionStateChanged\r\n */\r\n ConnectionStateChanged: ConnectionStateCallback;\r\n\r\n /**\r\n * Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.\r\n *\r\n * The SDK also triggers this callback when it cannot connect to the server 10 seconds after calling [`joinChannel`]{@link RtcChannel.joinChannel}, regardless of whether it is in the channel or not.\r\n *\r\n * If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.\r\n *\r\n * @event ConnectionLost\r\n */\r\n ConnectionLost: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the token expires in 30 seconds.\r\n *\r\n * The user becomes offline if the token used when joining the channel expires. This callback is\r\n * triggered 30 seconds before the token expires, to remind the app to get a new token. Upon receiving this callback,\r\n * you need to generate a new token on the server and call [`renewToken`]{@link RtcChannel.renewToken} to pass the new token to the SDK.\r\n *\r\n * @event TokenPrivilegeWillExpire\r\n */\r\n TokenPrivilegeWillExpire: TokenCallback;\r\n\r\n /**\r\n * Occurs when the token has expired.\r\n *\r\n * After a token is specified when joining the channel, the token expires after a certain period of time,\r\n * and a new token is required to reconnect to the server.\r\n * This callback notifies the app to generate a new token and call [`renewToken`]{@link RtcChannel.renewToken} to renew the token.\r\n *\r\n * @event RequestToken\r\n */\r\n RequestToken: EmptyCallback;\r\n\r\n /**\r\n * Occurs when the most active remote speaker is detected.\r\n *\r\n * 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`]{@link RtcEngine.enableAudioVolumeIndication}, this callback returns the uid of the active speaker whose voice is detected by the audio volume detection module of the SDK.\r\n *\r\n * **Note**\r\n * - To receive this callback, you need to call [`enableAudioVolumeIndication`]{@link RtcEngine.enableAudioVolumeIndication}.\r\n * - This callback reports the ID of the user with the highest voice volume during a period of time, instead of at the moment.\r\n *\r\n * @event ActiveSpeaker\r\n */\r\n ActiveSpeaker: UidCallback;\r\n\r\n /**\r\n * Occurs when the video size or rotation information of a remote user changes.\r\n *\r\n * @event VideoSizeChanged\r\n */\r\n VideoSizeChanged: VideoSizeCallback;\r\n\r\n /**\r\n * Occurs when the remote video state changes.\r\n *\r\n * @event RemoteVideoStateChanged\r\n */\r\n RemoteVideoStateChanged: RemoteVideoStateCallback;\r\n\r\n /**\r\n * Occurs when the remote audio state changes.\r\n *\r\n * This callback indicates the state change of the remote audio stream.\r\n *\r\n * @event RemoteAudioStateChanged\r\n */\r\n RemoteAudioStateChanged: RemoteAudioStateCallback;\r\n\r\n /**\r\n * 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.\r\n *\r\n * If you call [`setLocalPublishFallbackOption`]{@link RtcEngine.setLocalPublishFallbackOption} and set `option` as [`AudioOnly`]{@link StreamFallbackOptions.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.\r\n *\r\n * @event LocalPublishFallbackToAudioOnly\r\n */\r\n LocalPublishFallbackToAudioOnly: FallbackCallback;\r\n\r\n /**\r\n * 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.\r\n *\r\n * If you call [`setRemoteSubscribeFallbackOption`]{@link RtcEngine.setRemoteSubscribeFallbackOption} and set option as [`AudioOnly`]{@link StreamFallbackOptions.AudioOnly},\r\n * this callback is triggered when the remote media stream falls back to audio-only mode due to poor downlink\r\n * conditions, or when the remote media stream switches back to the video after the downlink network condition improves.\r\n *\r\n * **Note**\r\n *\r\n * Once the remote media stream is switched to the low stream due to poor network conditions,\r\n * you can monitor the stream switch between a high and low stream in the [`RemoteVideoStats`]{@link RemoteVideoStats} callback.\r\n *\r\n * @event RemoteSubscribeFallbackToAudioOnly\r\n */\r\n RemoteSubscribeFallbackToAudioOnly: FallbackWithUidCallback;\r\n\r\n /**\r\n * Reports the statistics of the [`RtcEngine`]{@link RtcEngine} once every two seconds.\r\n *\r\n * @event RtcStats\r\n */\r\n RtcStats: RtcStatsCallback;\r\n\r\n /**\r\n * Reports the last mile network quality of each user in the channel once every two seconds.\r\n *\r\n * 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.\r\n *\r\n * **Note**\r\n * `txQuality` is `Unknown` when the user is not sending a stream; `rxQuality` is `Unknown` when the user is not receiving a stream.\r\n *\r\n * @event NetworkQuality\r\n */\r\n NetworkQuality: NetworkQualityWithUidCallback;\r\n\r\n /**\r\n * 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.\r\n *\r\n * @event RemoteVideoStats\r\n */\r\n RemoteVideoStats: RemoteVideoStatsCallback;\r\n\r\n /**\r\n * Reports the statistics of the audio stream from each remote user/host.\r\n *\r\n * 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.\r\n *\r\n * 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.\r\n *\r\n * @event RemoteAudioStats\r\n */\r\n RemoteAudioStats: RemoteAudioStatsCallback;\r\n\r\n /**\r\n * Occurs when the state of the RTMP or RTMPS streaming changes.\r\n *\r\n * 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.\r\n *\r\n * 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.\r\n *\r\n * @event RtmpStreamingStateChanged\r\n */\r\n RtmpStreamingStateChanged: RtmpStreamingStateCallback;\r\n\r\n /**\r\n * Occurs when the publisher's transcoding settings are updated.\r\n *\r\n * When the `LiveTranscoding` class in the [`setLiveTranscoding`]{@link RtcChannel.setLiveTranscoding} method updates, the SDK triggers this callback to report the update information.\r\n *\r\n * **Note**\r\n *\r\n * If you call [`setLiveTranscoding`]{@link RtcChannel.setLiveTranscoding} to set the `LiveTranscoding` class for the first time, the SDK does not trigger this callback.\r\n *\r\n * @event TranscodingUpdated\r\n */\r\n TranscodingUpdated: EmptyCallback;\r\n\r\n /**\r\n * Reports the status of injecting the online media stream.\r\n *\r\n * **Warning**\r\n *\r\n * Agora will soon stop the service for injecting online media streams on the client. If you have not implemented this service, Agora recommends that you do not use it.\r\n *\r\n *\r\n * @event StreamInjectedStatus\r\n */\r\n StreamInjectedStatus: StreamInjectedStatusCallback;\r\n\r\n /**\r\n * Occurs when the local user receives a remote data stream.\r\n *\r\n * The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the [`sendStreamMessage`]{@link RtcChannel.sendStreamMessage} method.\r\n *\r\n * @event StreamMessage\r\n */\r\n StreamMessage: StreamMessageCallback;\r\n\r\n /**\r\n * Occurs when the local user fails to receive a remote data stream.\r\n *\r\n * The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the [`sendStreamMessage`]{@link RtcChannel.sendStreamMessage} method.\r\n *\r\n * @event StreamMessageError\r\n */\r\n StreamMessageError: StreamMessageErrorCallback;\r\n\r\n /**\r\n * Occurs when the state of the media stream relay changes.\r\n *\r\n * The SDK reports the state of the current media relay and possible error messages in this callback.\r\n *\r\n * @event ChannelMediaRelayStateChanged\r\n */\r\n ChannelMediaRelayStateChanged: MediaRelayStateCallback;\r\n\r\n /**\r\n * Reports events during the media stream relay.\r\n *\r\n * @event ChannelMediaRelayEvent\r\n */\r\n ChannelMediaRelayEvent: MediaRelayEventCallback;\r\n\r\n /**\r\n * Occurs when the local user receives the metadata.\r\n *\r\n * @event MetadataReceived\r\n */\r\n MetadataReceived: MetadataCallback;\r\n\r\n /**\r\n * Occurs when the audio publishing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the publishing state change of the local audio stream.\r\n *\r\n * @event AudioPublishStateChanged\r\n */\r\n AudioPublishStateChanged: StreamPublishStateCallback;\r\n\r\n /**\r\n * Occurs when the video publishing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the publishing state change of the local video stream.\r\n *\r\n * @event VideoPublishStateChanged\r\n */\r\n VideoPublishStateChanged: StreamPublishStateCallback;\r\n\r\n /**\r\n * Occurs when the audio subscribing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the subscribing state change of a remote audio stream.\r\n *\r\n * @event AudioSubscribeStateChanged\r\n */\r\n AudioSubscribeStateChanged: StreamSubscribeStateCallback;\r\n\r\n /**\r\n * Occurs when the video subscribing state changes.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * This callback indicates the subscribing state change of a remote video stream.\r\n *\r\n * @event VideoSubscribeStateChanged\r\n */\r\n VideoSubscribeStateChanged: StreamSubscribeStateCallback;\r\n\r\n /**\r\n * Reports events during the RTMP or RTMPS streaming.\r\n *\r\n * @since v3.1.2.\r\n *\r\n * @event RtmpStreamingEvent\r\n */\r\n RtmpStreamingEvent: RtmpStreamingEventCallback;\r\n\r\n /**\r\n * Reports whether the super resolution feature is successfully enabled. (beta feature)\r\n *\r\n * @since v3.5.2\r\n *\r\n * After calling [`enableRemoteSuperResolution`]{@link enableRemoteSuperResolution}, the SDK triggers this callback to report whether\r\n * super resolution is successfully enabled. If it is not successfully enabled, use `reason` for troubleshooting.\r\n *\r\n * @event UserSuperResolutionEnabled\r\n */\r\n UserSuperResolutionEnabled: UserSuperResolutionEnabledCallback;\r\n\r\n /**\r\n * Reports the proxy connection state.\r\n *\r\n * @since v3.6.2\r\n *\r\n * You can use this callback to listen for the state of the SDK connecting to a proxy.\r\n * For example, when a user calls [`setCloudProxy`]{@link RtcEngine.setCloudProxy} and joins a channel successfully,\r\n * the SDK triggers this callback to report the user ID, the proxy type connected,\r\n * and the time elapsed from the user calling `joinChannel` until this callback is triggered.\r\n *\r\n * @event ProxyConnectedCallback\r\n */\r\n ProxyConnected: ProxyConnectedCallback;\r\n\r\n /**\r\n * Occurs when the user role switch fails in the interactive live streaming.\r\n *\r\n * @since v3.7.0\r\n *\r\n * In the `LiveBroadcasting` channel profile, when the local user calls [`setClientRole`]{@link RtcChannel.setClientRole} to\r\n * switch their user role after joining the channel but the switch fails, the SDK triggers this callback to\r\n * report the reason for the failure and the current user role.\r\n *\r\n * @event ClientRoleChangeCallback\r\n */\r\n ClientRoleChangeFailed: ClientRoleChangeCallback;\r\n\r\n /**\r\n * Occurs when the first remote video frame is rendered.\r\n *\r\n * @since v3.7.0\r\n *\r\n * This callback is triggered after the first frame of the remote video is rendered on the video window.\r\n * The application can retrieve the data of the time elapsed from the user joining the channel until the first video frame is displayed.\r\n *\r\n * @event FirstRemoteVideoFrame\r\n */\r\n FirstRemoteVideoFrame: VideoFrameWithUidCallback;\r\n}\r\n"],"mappings":"","ignoreList":[]}