// Copyright © 2022 BytePlusRTC All rights reserved.
// SPDX-License-Identifier: MIT
import * as $p_a from '../android/index';
import * as $p_i from '../ios/index';
import { WarningCode, ErrorCode, LoginErrorCode, UserMessageSendResult, AudioRecordingErrorCode, PublicStreamErrorCode, RoomMessageSendResult, SubtitleErrorCode } from './errorcode';
import { RTCNetworkType, LocalAudioStreamState, LocalAudioStreamError, RemoteAudioState, RemoteAudioStateChangeReason, StreamIndex, LocalVideoStreamState, LocalVideoStreamError, RemoteVideoState, RemoteVideoStateChangeReason, ConnectionState, AudioRoute, SEIStreamUpdateEventType, LogoutReason, UserOnlineStatus, NetworkDetectionLinkType, NetworkQuality, NetworkDetectionStopReason, PerformanceAlarmMode, PerformanceAlarmReason, FirstFrameSendState, FirstFramePlayState, AudioDeviceType, MediaDeviceState, MediaDeviceError, VideoDeviceType, MediaDeviceWarning, RecordingState, RecordingErrorCode, AudioRecordingState, SyncInfoStreamType, DataMessageSourceType, EchoTestResult, HardwareEchoDetectionResult, LocalProxyType, LocalProxyState, LocalProxyError, MuteState, AudioPlaybackDevice, MediaDeviceType, AudioMixingState, AudioMixingError, SysStats, RemoteStreamKey, VideoFrameInfo, RemoteStreamSwitchEvent, SourceWantedData, RTCUser, RecordingInfo, RecordingProgress, LocalAudioPropertiesInfo, RemoteAudioPropertiesInfo, AVSyncState, RTCUserOfflineReason, SubscribeState, SetRoomExtraInfoResult, UserVisibilityChangeError, SubtitleState, RTCRoomStats, UserInfo, LocalStreamStats, RemoteStreamStats, SubscribeConfig, ForwardStreamStateInfo, ForwardStreamEventInfo, NetworkQualityStats, SubtitleMessage, RTCStream, PlayerState, PlayerError, RTCStreamSinglePushEvent, RTCEncodedVideoFrame, FaceDetectionResult, ByteRTCStreamMixingEvent, RTCStreamMixingErrorCode, MixedStreamType, IAudioFrame, SubscribeStateChangeReason, PublishStateChangeReason, PublishState } from './keytype';
import { BOOL, ByteBuffer, NSString } from './types';
export interface RTCVideoEventHandler {
/** {en}
* @detail callback
* @region Warning code
* @author panjian.fishing
* @brief A warning occurred during the SDK runtime. The SDK usually recovers automatically and warnings can be ignored.
* @param warn Warning code. See {@link WarningCode WarningCode}
* @order 5
*
*/
onWarning?(warn: WarningCode): void;
/** {en}
* @detail callback
* @region Warning code
* @author panjian.fishing
* @brief Error callback occurred.
* @note Error callback occurred. This callback is triggered when a network or media-related error occurs during the
* SDK runtime and cannot be automatically recovered and you may need to intervene.and you may need to intervene.
* @param err BigInt, see: {@link ErrorCode ErrorCode} for detailed definitions
* @order 6
*
*/
onError?(err: ErrorCode): void;
/** {en}
* @valid since 3.52
* @detail callback
* @brief Failed to access the extension.
* RTC SDK provides some features with extensions. Without implementing the extension, you cannot use the corresponding feature.
* @param extensionName The name of extension.
* @param msg Error message.
*
*/
onExtensionAccessError?(extensionName: string, msg: string): void;
/** {en}
* @detail callback
* @region Data statistics
* @author wangzhanqiang
* @brief Callbacks occur every 2 seconds to inform the current CPU and memory usage information.
* @param stats Cpu, memory information. See {@link SysStats SysStats} data type for details.
* @order 2
*
*/
onSysStats?(stats: SysStats): void;
/** {en}
* @detail callback
* @region Engine management
* @author hanchenchen.c
* @brief SDK Current network connection type change callback. Callbacks the event when the current network connection type of the SDK changes.
* @param type
* Network type.
* - -1: Unknown.
* - 0: Disconnected.
* - 1: LAN.
* - 2: Wi-Fi (including hotspots).
* - 3: 2G mobile network.
* - 4: 3G mobile network.
* - 5: 4G mobile network.
* - 6: 5G mobile network.
*
*/
onNetworkTypeChanged?(type: RTCNetworkType): void;
/** {en}
* @detail callback
* @region Video management
* @author liuyangyang
* @brief The remote clients in the room will be informed of the state change via this callback after the visible user starts video capture by calling {@link startVideoCapture startVideoCapture}.
* @param roomId ID of the room where the remote user enables video capture
* @param uid The user who starts the internal video capture
*
*/
onUserStartVideoCapture?(roomId: string, uid: string): void;
/** {en}
* @detail callback
* @region Video management
* @author liuyangyang
* @brief The remote clients in the room will be informed of the state change via this callback after the visible user stops video capture by calling {@link stopVideoCapture stopVideoCapture}.
* If you don't start video capture before you publish video data, all visible user will receive this callback.
* @param roomId ID of the room where the remote user disables video capture
* @param uid The user who stops the internal video capture
*
*/
onUserStopVideoCapture?(roomId: string, uid: string): void;
/** {en}
* @detail callback
* @region Engine Management
* @author shenpengliang
* @brief Callback on create room failure.
* @param roomId Room ID.
* @param errorCode Create room error code. See {@link ErrorCode ErrorCode} for specific indications.
* @order 1
*
*/
onCreateRoomStateChanged?(roomId: string, errorCode: number): void;
/** {en}
* @detail callback
* @region Room
* @author dixing
* @brief Users in the room will receive this callback when they call {@link startAudioCapture startAudioCapture} to turn on audio capture.
* @param roomId ID of the room where the remote user enables audio capture
* @param uid Enable remote user ID for audio capture
*
*/
onUserStartAudioCapture?(roomId: string, uid: string): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author dixing
* @brief Users in the room call {@link stopAudioCapture stopAudioCapture} when audio capture is turned off, other users in the room will receive this callback.
* @param roomId ID of the room where the remote user disables audio capture
* @param uid Turn off the remote user ID of audio capture
*
*/
onUserStopAudioCapture?(roomId: string, uid: string): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author zhangyuanyuan.0101
* @brief When the state of the local audio stream changes, the callback notifies the current local audio stream state.
* @param state The status of the local audio device. See {@link LocalAudioStreamState LocalAudioStreamState}
* @param error The error code when the state of the local audio stream changes. See {@link LocalAudioStreamError LocalAudioStreamError}
*
*/
onLocalAudioStateChanged?(state: LocalAudioStreamState, error: LocalAudioStreamError): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author zhangyuanyuan.0101
* @brief When the state of the audio stream from the remote user subscribes to changes, this callback will be received to understand the current state of the remote audio stream.
* @param key Remote Stream Information. See {@link RemoteStreamKey RemoteStreamKey}
* @param state Remote Audio Stream Status. See {@link RemoteAudioState RemoteAudioState}
* @param reason Remote Audio Stream Status Change Reason. See {@link RemoteAudioStateChangeReason RemoteAudioStateChangeReason}
*
*/
onRemoteAudioStateChanged?(key: RemoteStreamKey, state: RemoteAudioState, reason: RemoteAudioStateChangeReason): void;
/** {en}
* @detail callback
* @region Video management
* @author shenpengliang
* @brief Receive this event when the state of the local video stream changes.
* @param streamIndex Stream property. See [StreamIndex](70083#streamindex-2)
* @param state Local video stream state. See {@link LocalVideoStreamState LocalVideoStreamState}
* @param error Error code when local video state changes. See {@link LocalVideoStreamError LocalVideoStreamError}
*
*/
onLocalVideoStateChanged?(streamIndex: StreamIndex, state: LocalVideoStreamState, error: LocalVideoStreamError): void;
/** {en}
* @detail callback
* @region Video Management
* @author shenpengliang
* @brief When the state of a remote video stream changes, users in the room who subscribe to this stream receive the event.
* @param streamKey Remote video stream information, room, user ID, stream attributes, etc.. See {@link RemoteStreamKey RemoteStreamKey}
* @param videoState Remote video stream status. See {@link RemoteVideoState RemoteVideoState}
* @param videoStateReason Remote video stream status change reason. See {@link RemoteVideoStateChangeReason RemoteVideoStateChangeReason}
* @note The callback works for video stream captured by the camera, not for screen stream.
*
*/
onRemoteVideoStateChanged?(streamKey: RemoteStreamKey, videoState: RemoteVideoState, videoStateReason: RemoteVideoStateChangeReason): void;
/** {en}
* @detail callback
* @region Video Management
* @author zhushufan.ref
* @brief Receive this callback after the first frame of remote video stream is locally rendered by SDK.
* @param remoteStreamKey Remote Stream Information. See {@link RemoteStreamKey RemoteStreamKey}
* @param frameInfo Video Frame Information. See {@link VideoFrameInfo VideoFrameInfo}
*
*/
onFirstRemoteVideoFrameRendered?(remoteStreamKey: RemoteStreamKey, frameInfo: VideoFrameInfo): void;
/** {en}
* @detail callback
* @region Video Management
* @author zhushufan.ref
* @brief Receive this callback after the first frame of remote video stream is received and decoded by SDK.
* @param remoteStreamKey Remote Stream Information, see RemoteStreamKey {@link RemoteStreamKey}
* @param frameInfo Video Frame Information, see VideoFrameInfo {@link VideoFrameInfo}
* @note
* - For main stream, after joining the room, the subscriber will receive this callback only when the publisher publishes video stream for the first time.
* - For screen-sharing stream, the subscriber will receive this callback every time the publisher publishes or republishes the screen video stream.
*
*/
onFirstRemoteVideoFrameDecoded?(remoteStreamKey: RemoteStreamKey, frameInfo: VideoFrameInfo): void;
/** {en}
* @detail callback
* @region Video Management
* @author zhangzhenyu.samuel
* @brief RTC SDK receives this callback when the first video frame or screen video frame capture is completed locally.
* @param streamIndex Stream type: video from a camera or the screen recorder. See [StreamIndex](70083#streamindex-2)
* @param frameInfo Video information. See {@link VideoFrameInfo VideoFrameInfo}
* @note For captured local video frames, you can call {@link setLocalVideoCanvas setLocalVideoCanvas} or {@link setLocalVideoSink setLocalVideoSink} to render locally.
*
*/
onFirstLocalVideoFrameCaptured?(streamIndex: StreamIndex, frameInfo: VideoFrameInfo): void;
/** {en}
* @detail callback
* @region video management
* @author zhushufan.ref
* @brief Callback triggered when the local preview video size or rotation information has changed.
* @param streamIndex Stream type: video from a camera or the screen recorder. See [StreamIndex](70083#streamindex-2)
* @param frameInfo Video frame information. See {@link VideoFrameInfo VideoFrameInfo}
*
*/
onLocalVideoSizeChanged?(streamIndex: StreamIndex, frameInfo: VideoFrameInfo): void;
/** {en}
* @detail callback
* @region Video Management
* @author zhushufan.ref
* @brief Users in the room who subscribe to this video stream receive this callback when the remote video size or rotation information changes.
* @param remoteStreamKey Remote Stream Information. See {@link RemoteStreamKey RemoteStreamKey}.
* @param frameInfo Video Frame Information. See {@link VideoFrameInfo VideoFrameInfo}
*
*/
onRemoteVideoSizeChanged?(remoteStreamKey: RemoteStreamKey, frameInfo: VideoFrameInfo): void;
/** {en}
* @detail callback
* @region engine management
* @author hanchenchen.c
* @brief Callback SDK and signaling server connection status related events. Callbacks the event when the network connection state of the SDK to the signaling server changes.
* @param state
* The current SDK and signaling server connection status. See {@link ConnectionState ConnectionState}
* @param reason
* For a detailed definition of the cause of the signaling server connection state change, currently not enabled fixed to -1.
* @note Refer to [Getting Connection Status](https://docs.byteplus.com/byteplus-rtc/docs/95376) for more details.
*
*/
onConnectionStateChanged?(state: ConnectionState): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author dixing
* @brief Receive the callback when the audio route changes.
* @param route Current audio playback device. Refer to {@link AudioRoute AudioRoute} for more information.
* @note
* - Either of the following actions will lead to audio route switching. See [Set the Audio Route](https://docs.byteplus.com/byteplus-rtc/docs/117836).
* - Connecting/Disconnecting an audio device.
* - Designating the other audio device by calling {@link setAudioRoute setAudioRoute}.
*
*/
onAudioRouteChanged?(route: AudioRoute): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author zhangyuanyuan.0101
* @brief Receive the callback when publishing local audio stream.
* @param streamIndex Audio stream properties. See [StreamIndex](70083#streamindex-2)
*
*/
onFirstLocalAudioFrame?(streamIndex: StreamIndex): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author zhangyuanyuan.0101
* @brief Receives the callback when the first frame from a remote audio stream is received.
* @param remoteStreamKey Remote audio stream information. See {@link RemoteStreamKey RemoteStreamKey}
* @note The callback will be received when the user has just received each audio stream subscribed to in the room.
*
*/
onFirstRemoteAudioFrame?(remoteStreamKey: RemoteStreamKey): void;
/** {en}
* @detail callback
* @region Video management
* @author wangzhanqiang
* @brief Receive this callback when you receive a video frame with a SEI message sent by calling {@link sendSEIMessage sendSEIMessage}
* @param remoteStreamKey Contains the user name, room name and media stream of the SEI sender, as detailed in {@link RemoteStreamKey RemoteStreamKey}
* @param message Received SEI message content
*
*/
onSEIMessageReceived?(remoteStreamKey: RemoteStreamKey, message: ByteBuffer): void;
/** {en}
* @detail callback
* @region Message
* @author wangzhanqiang
* @brief Callback about publishing status of the black frame video stream .
* In a voice call scenario, when the local user calls {@link sendSEIMessage sendSEIMessage} to send SEI data with a black frame, the sending status of the stream is notified to the remote user through this callback.
* You can tell from this callback that the video frame carrying SEI data is a black frame and thus not render that video frame.
* @param remoteStreamKey Information about stream from the remote user, see {@link RemoteStreamKey RemoteStreamKey}.
* @param event State of the black frame video stream, see {@link SEIStreamUpdateEvent SEIStreamUpdateEvent}.
*
*/
onSEIStreamUpdate?(remoteStreamKey: RemoteStreamKey, event: SEIStreamUpdateEventType): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Login result callback
* @param uid
* Login user ID
* @param errorCode
* Login result
* See {@link LoginErrorCode LoginErrorCode}.
* @param elapsed
* The length of time it takes from calling the {@link login login} interface to return the result.
* Is in ms.
* @note This callback is received after {@link login login} is called
*
*/
onLoginResult?(uid: string, errorCode: LoginErrorCode, elapsed: number): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Callback of logout result
* @param reason It describes the reason why users log out. See {@link LogoutReason LogoutReason}
* @note You will receive this callback when calling {@link logout logout} or when the local user is kicked out because another user logs in with the same UserId.
*
*/
onLogout?(reason: LogoutReason): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Set the return result of the application server parameter
* @param error
* - 200, set successfully
* - != 200: Failure. Refer to {@link UserMessageSendResult UserMessageSendResult} for details.
* @note Receive this callback after calling {@link setServerParams setServerParams}.
*
*/
onServerParamsSetResult?(error: number): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief The return result of querying the login status of the peer or local user
* @param peerUserId User ID
* @param status
* The login status of the user queried
* See {@link UserOnlineStatus UserOnlineStatus}.
* @note You must first call {@link getPeerOnlineStatus getPeerOnlineStatus} To receive this callback.
*
*/
onGetPeerOnlineStatus?(peerUserId: string, status: UserOnlineStatus): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Receive this callback when you receive a text message from an out-of-room user calling {@link sendUserMessageOutsideRoom sendUserMessageOutsideRoom}
* @param uid
* User ID of the message sender
* @param message
* Received text message content
*
*/
onUserMessageReceivedOutsideRoom?(uid: string, message: string): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Receive this callback when you receive a binary message from an out-of-room user calling {@link sendUserBinaryMessageOutsideRoom sendUserBinaryMessageOutsideRoom}
* @param uid
* User ID of the message sender
* @param message
* Received binary message content
*
*/
onUserBinaryMessageReceivedOutsideRoom?(uid: string, message: ByteBuffer): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief A callback that sends a message to a specified user outside the room
* @param msgid
* The ID of this message
* All P2P and P2Server messages share a single ID sequence.
* @param error
* Message Sending Results
* See {@link UserMessageSendResult UserMessageSendResult}.
* @note Receive this callback when a message is sent by calling {@link sendUserMessageOutsideRoom sendUserMessageOutsideRoom} or {@link sendUserBinaryMessageOutsideRoom sendUserBinaryMessageOutsideRoom}.
*
*/
onUserMessageSendResultOutsideRoom?(msgid: number, error: UserMessageSendResult): void;
/** {en}
* @detail callback
* @region Real-time messaging
* @author hanchenchen.c
* @brief Receives the callback after sending the message to the application server successfully.
* @param msgid The ID of this message
* All P2P and P2Server messages share a single ID sequence.
* @param error Message Sending Results. See {@link UserMessageSendResult UserMessageSendResult}.
* @param message The message returned in ACK when the application server receives HTTP request. The message should not exceed 64 KB.
* @note This callback is asynchronous. You will receive this callback when you call {@link sendServerMessage sendServerMessage} or {@link sendServerBinaryMessage sendServerBinaryMessage} to send a message to your application server.
*
*/
onServerMessageSendResult?(msgid: number, error: UserMessageSendResult, message: ByteBuffer): void;
/** {en}
* @detail callback
* @region Pre-call network detection
* @author hanchenchen.c
* @brief Pre-call network detection result.
* After successfully calling {@link startNetworkDetection startNetworkDetection}, you will receive this callback for the first time in 3s and every 2s thereafter.
* @param type Identifies the network type as uplink/downlink.
* @param quality Network quality, see {@link NetworkQuality NetworkQuality}.
* @param rtt Network RTT in ms.
* @param lostRate Packet loss rate.
* @param bitrate Network bandwidth in kbps.
* @param jitter Network jitter in ms
*
*/
onNetworkDetectionResult?(type: NetworkDetectionLinkType, quality: NetworkQuality, rtt: number, lostRate: number, bitrate: number, jitter: number): void;
/** {en}
* @detail callback
* @region Network detection before the call
* @author hanchenchen.c
* @brief Network detection before the call ends
* The following conditions will stop the detection and receive this callback:
* 1. The callback is received once after the {@link stopNetworkDetection stopNetworkDetection} interface is called to stop probing;
* 2. Upon receipt of the distal/local audio first frame, stop the probe; When the detection exceeds 3 minutes, stop detection;
* 4. When the detection link is disconnected for a certain time, stop detection.
* Reason
* @param reason
* The type of reason to stop probing, refer to {@link NetworkDetectionStopReason NetworkDetectionStopReason}
*
*/
onNetworkDetectionStopped?(reason: NetworkDetectionStopReason): void;
/** {en}
* @detail callback
* @region Audio & Video Fallback
* @author panjian.fishing
* @brief This callback is triggered when media streams start to fall back or restore from a fallback.
* @param event Information about the fallback. See {@link RemoteStreamSwitch RemoteStreamSwitch}.
*
*/
onSimulcastSubscribeFallback?(event: RemoteStreamSwitchEvent): void;
/** {en}
* @detail callback
* @region audio & video fallback
* @author panjian.fishing
* @brief When the publish performance fallback {@link setPublishFallbackOption setPublishFallbackOption} is not turned on locally, and when insufficient device performance is detected, this callback is received.
* When the {@link setPublishFallbackOption setPublishFallbackOption} is locally turned on, ans when the publish performance fallback/recovery is caused due to device performance/network reasons, this callback is received.
* @param mode Indicates whether the release fallback function is turned on locally. See {@link PerformanceAlarmMode PerformanceAlarmMode}
* - When the publisher does not turn on the release performance fallback, the mode value is NORMAL.
* - When the publisher turns on the release performance fallback, the mode value is SIMULCAST.
* @param roomId
* - When the release performance fallback is not turned on, the roomId is empty
* - When the release performance fallback is turned on, the roomId is the room ID affected by the alarm.
* @param reason For alarm reasons. See {@link PerformanceAlarmReason PerformanceAlarmReason}
* @param data Performance fallback related data. See {@link SourceWantedData SourceWantedData}.
*
*/
onPerformanceAlarms?(mode: PerformanceAlarmMode, roomId: string, reason: PerformanceAlarmReason, data: SourceWantedData): void;
/** {en}
* @detail callback
* @region Room Management
* @author zhangyuanyuan.0101
* @brief Receive this callback when the sending status of the first frame of the local audio changes
* @param roomId ID of the room from which the audio is published
* @param user Local user information. See {@link RtcUser RtcUser}
* @param state First frame sending status. See {@link FirstFrameSendState FirstFrameSendState}
*
*/
onAudioFrameSendStateChanged?(roomId: string, user: RTCUser, state: FirstFrameSendState): void;
/** {en}
* @detail callback
* @region Room Management
* @author shenpengliang
* @brief Receive this callback when the sending status of the first frame of the local video changes
* @param roomId ID of the room from which the video is published
* @param user Local user information. See {@link RtcUser RtcUser}
* @param state First frame sending status. See {@link FirstFrameSendState FirstFrameSendState}
*
*/
onVideoFrameSendStateChanged?(roomId: string, user: RTCUser, state: FirstFrameSendState): void;
/** {en}
* @detail callback
* @region Room Management
* @author shenpengliang
* @brief Receive this callback when the video first frame sending state of the screen sharing stream changes
* @param roomId ID of the room from which the screen video frame is published
* @param user Local user information. See {@link RtcUser RtcUser}
* @param state First frame sending status. See {@link FirstFrameSendState FirstFrameSendState}
*
*/
onScreenVideoFrameSendStateChanged?(roomId: string, user: RTCUser, state: FirstFrameSendState): void;
/** {en}
* @detail callback
* @region Room management
* @author zhangyuanyuan.0101
* @brief Receive this callback when the audio first frame playback state changes
* @param roomId ID of the room from which the audio is published
* @param user Remote user information. See {@link RtcUser RtcUser}
* @param state First frame playback status. See {@link FirstFramePlayState FirstFramePlayState}
*
*/
onAudioFramePlayStateChanged?(roomId: string, user: RTCUser, state: FirstFramePlayState): void;
/** {en}
* @detail callback
* @region Room Management
* @author shenpengliang
* @brief Receive this callback when the playback state of the first frame of the video changes
* @param roomId ID of the room from which the video is published
* @param user Remote user information. See {@link RtcUser RtcUser}
* @param state First frame playback status. See {@link FirstFramePlayState FirstFramePlayState}
*
*/
onVideoFramePlayStateChanged?(roomId: string, user: RTCUser, state: FirstFramePlayState): void;
/** {en}
* @detail callback
* @region Room Management
* @author shenpengliang
* @brief Screen Sharing Stream Video Receive this callback when the first frame playback state changes
* @param roomId ID of the room from which the screen video frame is published
* @param user Remote user information. See {@link RtcUser RtcUser}
* @param state First frame playback status. See {@link FirstFramePlayState FirstFramePlayState}
*
*/
onScreenVideoFramePlayStateChanged?(roomId: string, user: RTCUser, state: FirstFramePlayState): void;
/** {en}
* @detail callback
* @region Engine management
* @author dixing
* @brief Audio device state callback, returns the state of audio capture and audio playback devices.
* @param deviceID Device ID
* @param deviceType Device type. See {@link AudioDeviceType AudioDeviceType}.
* @param deviceState Device state. See {@link MediaDeviceState MediaDeviceState}.
* @param deviceError Device error. See {@link MediaDeviceError MediaDeviceError}.
*
*/
onAudioDeviceStateChanged?(deviceID: string, deviceType: AudioDeviceType, deviceState: MediaDeviceState, deviceError: MediaDeviceError): void;
/** {en}
* @detail callback
* @region Engine management
* @author liuyangyang
* @brief Video device state callback, returns the state of video capture and screen capture devices.
* @param deviceID Device ID
* @param deviceType Device type. See {@link VideoDeviceType VideoDeviceType}.
* @param deviceState Device state. See {@link MediaDeviceState MediaDeviceState}.
* @param deviceError Device error. See {@link MediaDeviceError MediaDeviceError}.
*
*/
onVideoDeviceStateChanged?(deviceID: string, deviceType: VideoDeviceType, deviceState: MediaDeviceState, deviceError: MediaDeviceError): void;
/** {en}
* @detail callback
* @region Engine Management
* @author dixing
* @brief Audio device warning callback. The audio devices includes audio capture devices and audio rendering devices.
* @param deviceID Device ID
* @param deviceType See {@link AudioDeviceType AudioDeviceType}
* @param deviceWarning See {@link MediaDeviceWarning MediaDeviceWarning}
*
*/
onAudioDeviceWarning?(deviceID: string, deviceType: AudioDeviceType, deviceWarning: MediaDeviceWarning): void;
/** {en}
* @detail callback
* @region Engine Management
* @author liuyangyang
* @brief Video device warning callback, including video capture devices.
* @param deviceID Device ID
* @param deviceType See {@link VideoDeviceType VideoDeviceType}
* @param deviceWarning See {@link MediaDeviceWarning MediaDeviceWarning}
*
*/
onVideoDeviceWarning?(deviceID: string, deviceType: VideoDeviceType, deviceWarning: MediaDeviceWarning): void;
/** {en}
* @detail callback
* @region Local recording
* @author wangzhanqiang
* @brief Get a callback of the local recording status.
* The callback is triggered by either {@link startFileRecording startFileRecording} or {@link stopFileRecording stopFileRecording}.
* @param type Stream properties of the recorded stream. See [StreamIndex](70083#streamindex-2)
* @param state Recording status. See {@link RecordingState RecordingState}
* @param errorCode Recording error code. See {@link RecordingErrorCode RecordingErrorCode}
* @param info Recording file details. See {@link RecordingInfo RecordingInfo}
*
*/
onRecordingStateUpdate?(type: StreamIndex, state: RecordingState, errorCode: RecordingErrorCode, info: RecordingInfo): void;
/** {en}
* @detail callback
* @region Local recording
* @author wangzhanqiang
* @brief Local recording progress callback.
* This callback is triggered by {@link startFileRecording startFileRecording}. When the recording state is normal, the system will prompt the recording progress through this callback every second.
* @param type Stream properties of the recorded stream. See [StreamIndex](70083#streamindex-2)
* @param progress Recording progress. See {@link RecordingProgress RecordingProgress}
* @param info Recorded file details. See {@link RecordingInfo RecordingInfo}
*
*/
onRecordingProgressUpdate?(type: StreamIndex, progress: RecordingProgress, info: RecordingInfo): void;
/** {en}
* @type callback
* @author huangshouqin
* @brief When calling {@link startAudioRecording startAudioRecording} or {@link stopAudioRecording stopAudioRecording} to change the recording status, receive the callback.
* @param state See {@link AudioRecordingState AudioRecordingState}.
* @param errorCode See {@link AudioRecordingErrorCode AudioRecordingErrorCode}.
*
*/
onAudioRecordingStateUpdate?(state: AudioRecordingState, errorCode: AudioRecordingErrorCode): void;
/** {en}
* @detail callback
* @region Audio Mixing
* @author songxiaomeng.19
* @brief Callback for playback progress of mixed audio files
* @param mixId ID of the mixing task
* @param progress The current playback progress (ms) of the mixed audio file
* @note After calling {@link setAudioMixingProgressInterval setAudioMixingProgressInterval} to set the time interval to a value greater than 0, or calling {@link startAudioMixing startAudioMixing} to set the time interval in {@link AudioMixingConfig AudioMixingConfig} to a value greater than 0, the SDK will trigger the callback according to the set time interval.
*
*/
onAudioMixingPlayingProgress?(mixId: number, progress: number): void;
/** {en}
* @detail callback
* @region Audio Management
* @author gongzhengduo
* @brief After calling {@link enableAudioPropertiesReport enableAudioPropertiesReport}, you will periodically receive this callback for the information about local audio.
* Local audio includes the microphone audio, the screen audio captured using RTC SDK internal mechanisms, and locally mixing audio.
* @param audioPropertiesInfos See {@link LocalAudioPropertiesInfo LocalAudioPropertiesInfo}.
*
*/
onLocalAudioPropertiesReport?(audioPropertiesInfos: Array): void;
/** {en}
* @detail callback
* @region Audio Management
* @author gongzhengduo
* @brief After calling {@link enableAudioPropertiesReport enableAudioPropertiesReport}, you will periodically receive this callback for the information about the subscribed remote audio streams.
* The remote audio streams includes the microphone audio and screen audio collected using the RTC SDK internal mechanism/custom mechanism.
* @param audioPropertiesInfos See {@link RemoteAudioPropertiesInfo RemoteAudioPropertiesInfo}.
* @param totalRemoteVolume The total volume of all the subscribed remote streams
*
*/
onRemoteAudioPropertiesReport?(audioPropertiesInfos: Array, totalRemoteVolume: number): void;
/** {en}
* @detail callback
* @region Audio Management
* @author gongzhengduo
* @brief After calling {@link enableAudioPropertiesReport enableAudioPropertiesReport}, you will periodically receive this callback for the active speaker information.
* @param roomId Room ID.
* @param uid The user ID of the active speaker.
*
*/
onActiveSpeaker?(roomId: string, uid: string): void;
/** {en}
* @detail callback
* @region audio management
* @author wangjunzheng
* @brief Audio stream synchronization information callback. You can use this callback to receive audio stream synchronization information sent remotely after the remote user calls {@link sendStreamSyncInfo sendStreamSyncInfo} to send an audio stream synchronization message.
* @param streamKey For remote stream information. See {@link RemoteStreamKey RemoteStreamKey}.
* @param streamType Media stream type. See {@link SyncInfoStreamType SyncInfoStreamType}.
* @param data Message content.
*
*/
onStreamSyncInfoReceived?(streamKey: RemoteStreamKey, streamType: SyncInfoStreamType, data: ByteBuffer): void;
/** {en}
* @hidden currently not available
* @detail callback
* @author qipengxiang
* @brief Callback of the result of publishing the public stream
* You will be informed of the result of publishing the public stream by this callback after calling {@link startPushPublicStream startPushPublicStream}.
* @param roomId Room ID from which the public stream is published
* @param publicStreamId ID of the public stream
* @param error Code for the result of publishing the public stream. Refer to {@link PublicStreamErrorCode PublicStreamErrorCode} for details.
*
*/
onPushPublicStreamResult?(roomId: string, publicStreamId: string, error: PublicStreamErrorCode): void;
/** {en}
* @hidden currently not available
* @detail callback
* @brief Callback of the result of playing the public stream
* You will be informed of the result of playing the public stream by this callback after calling {@link startPlayPublicStream startPlayPublicStream}.
* @param publicStreamId ID of the public stream
* @param error Code for the result of playing the public stream. Refer to {@link PublicStreamErrorCode PublicStreamErrorCode} for details.
*
*/
onPlayPublicStreamResult?(publicStreamId: string, error: PublicStreamErrorCode): void;
/** {en}
* @hidden currently not available
* @detail callback
* @author qipengxiang
* @brief Callback on receiving the SEI message carried by the public video stream.
* After calling {@link startPlayPublicStream startPlayPublicStream}, you will receive this callback if the public stream has an SEI message.
* @param publicStreamId The ID of the public stream.
* @param message The SEI(supplemental enhancement information) message carried by the public video stream.
* The SEI you can get via this callback is inserted by calling [sendSEIMessage](70080#RTCVideo-sendseimessage-2) in the SDK.
* You receive SEI from all the video streams if the SEI messages do not have conflicts. However, if the SEI messages from different video streams have conflicts, you will receive only one of them.
* @param sourceType SEI source type. Since V3.52.1, the value is always `0`, for custom messages. See {@link DataMessageSourceType DataMessageSourceType}.
* @note You also need to listen to {@link onPublicStreamDataMessageReceived onPublicStreamDataMessageReceived} to receive data messages inserted via Open API in the server.
*
*/
onPublicStreamSEIMessageReceived?(publicStreamId: string, message: ByteBuffer, sourceType: DataMessageSourceType): void;
/** {en}
* @hidden currently not available
* @detail callback
* @author qipengxiang
* @brief Callback on receiving the data message carried by the public video stream.
* After calling {@link startPlayPublicStream startPlayPublicStream}, you can listen to this callback and retrieve SEI messages inserted by Open API calls or audio volume.
* @param publicStreamId The ID of the public stream.
* @param message The data messages carried by the public video stream.
* - Data inserted by calling the OpenAPI.
* - Media volume in JSON, before you can receive which you need to enable it via calling the OpenAPI. Refer to the definition below to parse the JSON string.
* {
* "Type" : "VolumeIndication",
* "VolumeInfos":[
* {
* "RoomId":"1000001",
* "UserId":"1000001",
* "StreamType":0, // `0` for main stream and `1` for the screen sharing stream
* "LinearVolume":1
* }
* ]
* }
* @param sourceType Message source. See {@link DataMessageSourceType DataMessageSourceType}.
* @note You also need to listen to {@link onPublicStreamSEIMessageReceived onPublicStreamSEIMessageReceived} to receive SEI inserted via API in the client SDK.
*
*/
onPublicStreamDataMessageReceived?(publicStreamId: string, message: ByteBuffer, sourceType: DataMessageSourceType): void;
/** {en}
* @hidden currently not available
* @detail callback
* @brief Callback of successfully decoding of the first video frame of the public stream
* Refer to {@link startPlayPublicStream startPlayPublicStream} for details about subscribing to a public stream.
* @param publicStreamId ID of the public stream
* @param videoFrameInfo Information of the video stream. Refer to {@link VideoFrameInfo VideoFrameInfo} for more details.
*
*/
onFirstPublicStreamVideoFrameDecoded?(publicStreamId: string, videoFrameInfo: VideoFrameInfo): void;
/** {en}
* @hidden currently not available
* @detail callback
* @brief Callback of successfully decoding of the first audio frame of the public stream
* Refer to {@link startPlayPublicStream startPlayPublicStream} for details about subscribing to a public stream.
* @param publicStreamId ID of the public stream
*
*/
onFirstPublicStreamAudioFrame?(publicStreamId: string): void;
/** {en}
* @detail callback
* @region Network Management
* @author qipengxiang
* @brief Callback about the call test result.
* @param result Test result, see {@link EchoTestResult EchoTestResult}.
* @note The timing when this callback will be triggered is as follows:
* - A device-related error occurred during the test;
* - After a successful test;
* - After stopping the test, provided that the audio/video playback was not received during the test due to non-device reasons.
*
*/
onEchoTestResult?(result: EchoTestResult): void;
/** {en}
* @detail callback
* @brief Receives the callback when you call {@link startCloudProxy startCloudProxy} to start cloud proxy, and the SDK connects the proxy server successfully.
* @param interval The interval in ms between starting cloud proxy and connects the cloud proxy server successfully.
*
*/
onCloudProxyConnected?(interval: number): void;
/** {en}
* @detail callback
* @brief Callback that notifies you the result of the echo detection before a call
* @param hardwareEchoDetectionResult Refer to {@link HardwareEchoDetectionResult HardwareEchoDetectionResult} for more details.
* @note
* - This callback notifies you the result of the echo detection by calling startHardwareEchoDetection{@link startHardwareEchoDetection.
* - We recommend to call {@link stopHardwareEchoDetection stopHardwareEchoDetection} to stop the detection.
* - Listen to `MEDIA_DEVICE_WARNING_DETECT_LEAK_ECHO` in the callback of {@link onAudioDeviceWarning onAudioDeviceWarning} for the echo issue during a call.
*
*/
onHardwareEchoDetectionResult?(hardwareEchoDetectionResult: HardwareEchoDetectionResult): void;
/** {en}
* @detail callback
* @region proxy
* @author keshixing.rtc
* @brief Callback on local proxy connection. After calling {@link setLocalProxy setLocalProxy} to set local proxies, you will receive this callback that informs you of the states of local proxy connection.
* @param localProxyType The types of local proxies. Refer to {@link LocalProxyType LocalProxyType} for details.
* @param localProxyState The states of local proxy connection. Refer to {@link LocalProxyState LocalProxyState} for details.
* @param localProxyError The errors of local proxy connection. Refer to {@link LocalProxyError LocalProxyError} for details.
*
*/
onLocalProxyStateChanged?(localProxyType: LocalProxyType, localProxyState: LocalProxyState, localProxyError: LocalProxyError): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, use {@link onUserPublishStream onUserPublishStream}, {@link onUserPublishScreen onUserPublishScreen}, {@link onUserUnpublishStream onUserUnpublishStream} and {@link onUserUnpublishScreen onUserUnpublishScreen} instead.
* @detail callback
* @region Audio event callback
* @author shenpengliang
* @brief Transmission state change of an audio stream in the room triggers this callback.
* @param roomId Room ID
* @param uid The user who changes his/her transmission state of the audio streams
* @param muteState Transmission state of the audio streams. Refer to {@link MuteState MuteState} for more details.
*
*/
onUserMuteAudio?(roomId: string, uid: string, muteState: MuteState): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, use {@link onUserPublishStream onUserPublishStream}, {@link onUserPublishScreen onUserPublishScreen}, {@link onUserUnpublishStream onUserUnpublishStream} and {@link onUserUnpublishScreen onUserUnpublishScreen} instead.
* @detail callback
* @region Video Management
* @author zhushufan.ref
* @brief Transmission state change of an video stream in the room triggers this callback.
* @param roomId Room ID
* @param uid The user who changes his/her transmission state of the video streams
* @param muteState Transmission state of the video streams. Refer to {@link MuteState MuteState} for more details.
*
*/
onUserMuteVideo?(roomId: string, uid: string, muteState: MuteState): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, use {@link onAudioRouteChanged onAudioRouteChanged} instead.
* @detail callback
* @region Audio event callback
* @author dixing
* @brief You will receive this callback when the audio playback device changes.
* @param device New audio playback device. See {@link AudioPlaybackDevice AudioPlaybackDevice}
* @note For the settings of audio playback device and audio routing, see {@link setAudioPlaybackDevice setAudioPlaybackDevice}.
*
*/
onAudioPlaybackDeviceChanged?(device: AudioPlaybackDevice): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, using {@link onAudioDeviceStateChanged onAudioDeviceStateChanged} and {@link onVideoDeviceStateChanged onVideoDeviceStateChanged} instead.
* @detail callback
* @region Engine management
* @author zhangzhenyu.samuel
* @brief Media device state callback, returns the state of four media devices: audio capture, audio playback, video capture, and screen capture.
* @param deviceID Device ID
* @param deviceType Device type. See {@link MediaDeviceType MediaDeviceType}.
* @param deviceState Device state. See {@link MediaDeviceState MediaDeviceState}.
* @param deviceError Device error. See {@link MediaDeviceError MediaDeviceError}.
*
*/
onMediaDeviceStateChanged?(deviceID: string, deviceType: MediaDeviceType, deviceState: MediaDeviceState, deviceError: MediaDeviceError): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, using {@link onAudioDeviceWarning onAudioDeviceWarning} and {@link onVideoDeviceWarning onVideoDeviceWarning} instead.
* @detail callback
* @region Engine Management
* @author dixing
* @brief Media device warning callback. The media devices includes: audio capture devices, audio rendering devices, and video capture devices.
* @param deviceID Device ID
* @param deviceType See {@link MediaDeviceType MediaDeviceType}
* @param deviceWarning See {@link MediaDeviceWarning MediaDeviceWarning}
*
*/
onMediaDeviceWarning?(deviceID: string, deviceType: MediaDeviceType, deviceWarning: MediaDeviceWarning): void;
/** {en}
* @deprecated since 3.52, will be deleted at 3.57, use {@link onLocalProxyStateChanged onLocalProxyStateChanged} instead
* @detail callback
* @region Proxy callback
* @author keshixing
* @brief HTTP Receive the callback when the proxy connection state changes.
* @param state Current HTTP proxy connection status
*
*/
onHttpProxyState?(state: number): void;
/** {en}
* @deprecated since 3.52, will be deleted at 3.57, use {@link onLocalProxyStateChanged onLocalProxyStateChanged} instead
* @detail callback
* @author keshixing
* @region Engine management
* @brief HTTPS Receive the callback when the proxy connection state changes.
* @param state Current HTTPS proxy connection status
*
*/
onHttpsProxyState?(state: number): void;
/** {en}
* @deprecated since 3.52, will be deleted at 3.57, use {@link onLocalProxyStateChanged onLocalProxyStateChanged} instead
* @detail callback
* @region Proxy callback
* @author keshixing
* @brief SOCKS5 Receive the callback when the proxy state changes.
* @param state SOCKS5 proxy connection status
* @param cmd every step of the proxy connection operating command
* @param proxyAddress proxy address information
* @param localAddress the local address used by the current connection
* @param remoteAddress the remote connection address
*
*/
onSocks5ProxyState?(state: number, cmd: string, proxyAddress: string, localAddress: string, remoteAddress: string): void;
/** {en}
* @deprecated since 353. Use {@link IMediaPlayerEventHandler IMediaPlayerEventHandler} and {@link IAudioEffectPlayerEventHandler IAudioEffectPlayerEventHandler} instead.
* @detail callback
* @region Audio Mixing
* @author songxiaomeng.19
* @brief Callback when audio mix file playback state changes
* @param mixId
* Mix ID
* Unique ID passed in when using {@link IAudioMixingManager IAudioMixingManager} related interface.
* @param state
* Mix status
* The mix status can be referred to: {@link AudioMixingState AudioMixingState}.
* @param error
* Error code
* See {@link AudioMixingError AudioMixingError}.
* @note The timing when this callback will be triggered is summarized as follows:
* - When {@link startAudioMixing startAudioMixing} method is successfully called, the callback with a state value of AUDIO_MIXING_STATE_PLAYING will be triggered; otherwise, the callback with a state value of AUDIO_MIXING_STATE_FAILED will be triggered.
* - When {@link startAudioMixing startAudioMixing} is repeatedly called with the same ID, the latter overrides the previous one, and this callback notifies AUDIO_MIXING_STATE_STOPPED that the previous mix has stopped.
* - When the {@link pauseAudioMixing pauseAudioMixing} method is called to pause playback successfully, a callback with a state value of AUDIO_MIXING_STATE_PAUSED will be triggered; otherwise, a callback with a state value of AUDIO_MIXING_STATE_FAILED will be triggered.
* - When the {@link resumeAudioMixing resumeAudioMixing} method is called to resume playback successfully, a callback with a state value of AUDIO_MIXING_STATE_PLAYING will be triggered; otherwise, a callback with a state value of AUDIO_MIXING_STATE_FAILED will be triggered.
* - When the {@link stopAudioMixing stopAudioMixing} method is called to pause playback successfully, a callback with a state value of AUDIO_MIXING_STATE_STOPPED will be triggered; otherwise, a callback with a state value of AUDIO_MIXING_STATE_FAILED will be triggered.
* - The end of playback triggers a callback with a state value of AUDIO_MIXING_STATE_FINISHED.
*
*/
onAudioMixingStateChanged?(mixId: number, state: AudioMixingState, error: AudioMixingError): void;
}
export interface RTCRoomEventHandler {
/** {en}
* @detail callback
* @region Multiple rooms
* @author shenpengliang
* @brief Leave the room successfully callback.
* After the user calls the {@link leaveRoom leaveRoom} method, the SDK will stop all publishing subscription streams, and after releasing all call-related audio & video resources, this callback will notify the user to leave the room successfully.
* @param stats Reserved parameter.
* @note
* - After the user calls the {@link leaveRoom leaveRoom} method to leave the room, if {@link destroy destroy} is called to destroy the room instance or {@link destroyRTCVideo destroyRTCVideo} method is called to destroy the RTC engine immediately, this callback event will not be received.
* - If the app needs to use the system audio & video device after leaving the room, it is recommended to initialize the audio & video device after receiving this callback, otherwise the initialization may fail due to the SDK occupying the audio & video device.
*
*/
onLeaveRoom?(stats: RTCRoomStats): void;
/** {en}
* @detail callback
* @region Multi-room
* @author shenpengliang
* @brief Callback on room state changes. Via this callback you get notified of room relating warnings, errors and events. For example, the user joins the room, the user is removed from the room, and so on.
* @param roomId Room ID.
* @param uid User ID.
* @param state Room state code.
* - 0: Join room success.
* - !0: Failed to join a room, abnormal exit, room-related warnings or errors. See {@link ErrorCode ErrorCode} and {@link WarningCode WarningCode} for specific indications.
* @param extraInfo Extra information.
* `join_type` indicates the type of room the user joins. `0` means the user joins the room for the first time, and `1` means the user rejoins the room.
* `elapsed` indicates the time interval from calling {@link joinRoom joinRoom} to successfully joining room, in ms.
*
*/
onRoomStateChanged?(roomId: string, uid: string, state: number, extraInfo: string): void;
/** {en}
* @detail callback
* @region Multi-room
* @author shenpengliang
* @brief Callback on stream state changes. You will receive this callback when you receive stream relating warnings and errors.
* @param roomId Room ID.
* @param uid User ID.
* @param state Room state code. See {@link ErrorCode ErrorCode} and {@link WarningCode WarningCode} for specific indications.
* @param extraInfo Extra information. Currently unavailable.
*
*/
onStreamStateChanged?(roomId: string, uid: string, state: number, extraInfo: string): void;
/** {en}
* @detail callback
* @region Multi-Room
* @author wangzhanqiang
* @brief Stream publisher will receive this callback when the A/V synchronization state changes after {@link setMultiDeviceAVSync setMultiDeviceAVSync} is called.
* @param state A/V synchronization state, see {@link AVSyncState AVSyncState}.
*
*/
onAVSyncStateChange?(state: AVSyncState): void;
/** {en}
* @detail callback
* @region Multi-room
* @author yejing
* @brief Room call statistics callback.
* After the user enters the room and starts the call, he receives this callback every 2s.
* @param stats Summary statistics in the room. See {@link RTCRoomStats RTCRoomStats}.
*
*/
onRoomStats?(stats: RTCRoomStats): void;
/** {en}
* @detail callback
* @region Multiple rooms
* @author shenpengliang
* @brief You will receive this callback in following cases:
* - The remote user calls {@link setUserVisibility setUserVisibility} turns visible and joins your room.
* - The remote visible user is disconnected and then reconnected to your room.
* - The invisible remote user in your room calls {@link setUserVisibility setUserVisibility} and turns visible.
* - You join the room when there are visible users in the room.
* @param userInfo User information. See {@link UserInfo UserInfo}.
* @param elapsed Reserved parameter.
*
*/
onUserJoined?(userInfo: UserInfo, elapsed: number): void;
/** {en}
* @detail callback
* @author shenpengliang
* @brief This callback is triggered when a remote user is disconnected or turns invisible.
* @param uid ID of the user who leaves the room, or switches to invisible.
* @param reason Reason to leave the room:
* - 0: The remote client calls {@link leaveRoom leaveRoom} to leave the room.
* - 1: The remote client is disconnected because of poor network connection or expired Token.
* - 2: The remote client calls {@link setUserVisibility setUserVisibility} to turn invisible.
* - 3: The remote user has been removed from the room by the administrator via a OpenAPI call.
*
*/
onUserLeave?(uid: string, reason: RTCUserOfflineReason): void;
/** {en}
* @detail callback
* @author shenpengliang
* @brief Callback triggered 30s before the joining room privilege of the Token expires.
* After receiving this callback, you must call {@link updateToken updateToken} to update the joining room privilege Token.
* @note After a user's joining room privilege expires:
* - When attempting to join a room, the user will receive {@link onRoomStateChanged onRoomStateChanged} with the error code "-1000" indicating that the Token is invalid.
* - If the user is already in the room, he/she will be removed from the room and receive {@link onRoomStateChanged onRoomStateChanged} with the error code "-1009" indicating that the Token is expired. Remote users in the room will receive {@link onUserLeave onUserLeave} with the reason `1` indicating that the Token is invalid.
* @order 10
*
*/
onTokenWillExpire?(): void;
/** {en}
* @detail callback
* @author qipengxiang
* @brief Callback triggered 30s before the publishing privilege of the Token expires.
* After receiving this callback, you must call {@link updateToken updateToken} to update the publishing privilege Token.
* @note After a user's publishing privilege expires:
* - When attempting to publish a stream, the user will receive {@link onStreamStateChanged onStreamStateChanged} with the error code "-1002" indicating no permission to publish streams.
* - The published streams of the user will be removed, and he/she will receive {@link onStreamStateChanged onStreamStateChanged} with the error code "-1002" indicating no permission to publish streams. Remote users in the room will receive {@link onUserUnpublishStream onUserUnpublishStream}{@link onUserUnpublishScreen /onUserUnpublishScreen} with the reason "6" indicating that the publishing privilege of the remote user has expired.
* @order 15
*
*/
onPublishPrivilegeTokenWillExpire?(): void;
/** {en}
* @detail callback
* @author qipengxiang
* @brief Callback triggered 30s before the subscribing privilege of the Token expires.
* After receiving this callback, you must call {@link updateToken updateToken} to update the subscribing privilege Token.
* @note After a user's subscribing privilege expires, the user will fail to subscribe to new streams, or the subscribed streams will be removed, and he/she will receive {@link onStreamStateChanged onStreamStateChanged} with error code "-1003" indicating no permission to subscribe to streams.
* @order 16
*
*/
onSubscribePrivilegeTokenWillExpire?(): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Video publish state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Publish state code, see PublishState{@link #PublishState}.
* @param reason The specific reason why the local video stream publish state changed, see PublishStateChangeReason{@link #PublishStateChangeReason}.
* @order 0
*
*/
onVideoPublishStateChanged?(roomId: string, uid: string, state: PublishState, reason: PublishStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Audio publish state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Publish state code, see PublishState{@link #PublishState}.
* @param reason The specific reason why the local audio stream publish state changed, see PublishStateChangeReason{@link #PublishStateChangeReason}.
* @order 0
*
*/
onAudioPublishStateChanged?(roomId: string, uid: string, state: PublishState, reason: PublishStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Screen video publish state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Publish state code, see PublishState{@link #PublishState}.
* @param reason The specific reason why the local screen video stream publish state changed, see PublishStateChangeReason{@link #PublishStateChangeReason}.
* @order 0
*
*/
onScreenVideoPublishStateChanged?(roomId: string, uid: string, state: PublishState, reason: PublishStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Screen audio publish state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Publish state code, see PublishState{@link #PublishState}.
* @param reason The specific reason why the local screen audio stream publish state changed, see PublishStateChangeReason{@link #PublishStateChangeReason}.
* @order 0
*
*/
onScreenAudioPublishStateChanged?(roomId: string, uid: string, state: PublishState, reason: PublishStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Video subscribe state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Subscribe state code, see SubscribeState{@link #SubscribeState}.
* @param reason The specific reason why the local video stream subscribe state changed, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason}.
* @order 0
*
*/
onVideoSubscribeStateChanged?(roomId: string, uid: string, state: SubscribeState, reason: SubscribeStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Audio subscribe state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Subscribe state code, see SubscribeState{@link #SubscribeState}.
* @param reason The specific reason why the local audio stream subscribe state changed, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason}.
* @order 0
*
*/
onAudioSubscribeStateChanged?(roomId: string, uid: string, state: SubscribeState, reason: SubscribeStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Screen video subscribe state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Subscribe state code, see SubscribeState{@link #SubscribeState}.
* @param reason The specific reason why the local screen video stream subscribe state changed, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason}.
* @order 0
*
*/
onScreenVideoSubscribeStateChanged?(roomId: string, uid: string, state: SubscribeState, reason: SubscribeStateChangeReason): void;
/** {en}
* @detail callback
* @author xuyiling.x10
* @brief Screen audio subscribe state change callback.
* @param roomId Room ID.
* @param uid User ID.
* @param state Subscribe state code, see SubscribeState{@link #SubscribeState}.
* @param reason The specific reason why the local screen audio stream subscribe state changed, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason}.
* @order 0
*
*/
onScreenAudioSubscribeStateChanged?(roomId: string, uid: string, state: SubscribeState, reason: SubscribeStateChangeReason): void;
/** {en}
* @detail callback
* @region Multi-room
* @author yejing
* @brief Local stream data statistics and network quality callback.
* After the local user publishes the flow successfully, the SDK will periodically (2s) notify the user through this callback event of the quality statistics of the published flow during this reference period.
* Statistics are passed to the user through the callback parameters of the {@link LocalStreamStats LocalStreamStats} type, including the sent audio & video bit rate, sent frame rate, encoded frame rate, network quality, etc.
* @param stats Audio & video stream and network status statistics. See {@link LocalStreamStats LocalStreamStats}.
*
*/
onLocalStreamStats?(stats: LocalStreamStats): void;
/** {en}
* @detail callback
* @region Multi-room
* @author yejing
* @brief Remote audio/video stream statistics and network quality callbacks for local subscriptions.
* After the local user subscribes to the stream successfully, the SDK will periodically (2s) notify the user through this callback event of the quality statistics of the subscribed stream during this reference period, including: sending audio & video bit rate, sending frame rate, encoded frame rate, network quality, etc.
* @param stats Audio & video stream and network status statistics. See {@link RemoteStreamStats RemoteStreamStats}.
*
*/
onRemoteStreamStats?(stats: RemoteStreamStats): void;
/** {en}
* @detail callback
* @region Room management
* @author shenpengliang
* @brief Callback on subscription status of media streams
* @param stateCode Subscription status of media streams, see {@link SubscribeState SubscribeState}.
* @param userId The ID of the user who published the stream.
* @param info Configurations of stream subscription, see {@link SubscribeConfig SubscribeConfig}.
* @note Local users will receive this callback:
* - After calling {@link subscribeStream subscribeStream}{@link unsubscribeStream /unsubscribeStream} to change the subscription status of remote media streams captured by camera/microphone.
* - After calling {@link subscribeScreen subscribeScreen}{@link unsubscribeScreen /unsubscribeScreen} to change the subscription status of remote screen sharing streams.
*
*/
onStreamSubscribed?(stateCode: SubscribeState, userId: string, info: SubscribeConfig): void;
/** {en}
* @detail callback
* @region Room management
* @author xuyiling.x10
* @brief Callback on remote media streams captured by camera.
* @param roomId Room ID.
* @param uid The ID of the user who published the stream.
* @param isPublish True if the stream is published, false if the stream is removed.
* @note Local users will receive this callback when a remote user successfully publishes media streams captured by camera by calling publishStreamVideo{@link #IRTCRoom#publishStreamVideo}.
* @order 2
*
*/
onUserPublishStreamVideo?(roomId: string, uid: string, isPublish: boolean): void;
/** {en}
* @detail callback
* @region Room management
* @author xuyiling.x10
* @brief Callback on remote media streams captured by microphone.
* @param roomId Room ID.
* @param uid The ID of the user who published the stream.
* @param isPublish True if the stream is published, false if the stream is removed.
* @note Local users will receive this callback when a remote user successfully publishes media streams captured by microphone by calling publishStreamAudio{@link #IRTCRoom#publishStreamAudio}.
* @order 2
*
*/
onUserPublishStreamAudio?(roomId: string, uid: string, isPublish: boolean): void;
/** {en}
* @detail callback
* @region Room management
* @author xuyiling.x10
* @brief Callback on remote screen sharing video streams.
* @param roomId Room ID.
* @param uid The ID of the user who published the stream.
* @param isPublish True if the stream is published, false if the stream is removed.
* @note Local users will receive this callback when a remote user successfully publishes screen sharing video streams by calling publishScreenVideo{@link #IRTCRoom#publishScreenVideo}.
* @order 2
*
*/
onUserPublishScreenVideo?(roomId: string, uid: string, isPublish: boolean): void;
/** {en}
* @detail callback
* @region Room management
* @author xuyiling.x10
* @brief Callback on remote screen sharing audio streams.
* @param roomId Room ID.
* @param uid The ID of the user who published the stream.
* @param isPublish True if the stream is published, false if the stream is removed.
* @note Local users will receive this callback when a remote user successfully publishes screen sharing audio streams by calling publishScreenAudio{@link #IRTCRoom#publishScreenAudio}.
* @order 2
*
*/
onUserPublishScreenAudio?(roomId: string, uid: string, isPublish: boolean): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief Receive a callback for broadcast messages in the room.
* This callback is received when other users in the room call {@link sendRoomMessage sendRoomMessage} to send a broadcast message.
* @param uid User ID of the message sender
* @param message Message content received
*
*/
onRoomMessageReceived?(uid: string, message: string): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief Receives a callback for broadcast binary messages in the room.
* This callback is received when other users in the room call {@link sendRoomBinaryMessage sendRoomBinaryMessage} to send a broadcast binary message.
* @param uid User ID of the message sender
* @param message Binary message content received
*
*/
onRoomBinaryMessageReceived?(uid: string, message: ByteBuffer): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief Receive this callback when you receive a peer-to-peer text message from another user in the room via {@link sendUserMessage sendUserMessage}.
* @param uid The user ID of the sender of the message.
* @param message The content of the received text message.
*
*/
onUserMessageReceived?(uid: string, message: string): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief Receive this callback when you receive a peer-to-peer binary message from another user in the room via {@link sendUserBinaryMessage sendUserBinaryMessage}.
* @param uid The user ID of the sender of the message.
* @param message The binary message content received.
*
*/
onUserBinaryMessageReceived?(uid: string, message: ByteBuffer): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief After sending a point-to-point text or point-to-point binary message to a single user in the room, the message sender will receive a callback with the result of the message.
* @param msgid The ID of this message.
* @param error Text or binary message sending results. See {@link UserMessageSendResult UserMessageSendResult}
* @note Call {@link sendUserMessage sendUserMessage} or {@link sendUserBinaryMessage sendUserBinaryMessage} interface to receive this callback.
*
*/
onUserMessageSendResult?(msgid: number, error: UserMessageSendResult): void;
/** {en}
* @detail callback
* @region Multi-room
* @author hanchenchen.c
* @brief Receives this callback after sending a text message or a binary message to a room with {@link sendRoomMessage sendRoomMessage} or {@link sendRoomBinaryMessage sendRoomBinaryMessage}.
* @param msgid The ID of this message.
* @param error Message sending result. See {@link RoomMessageSendResult RoomMessageSendResult}
*
*/
onRoomMessageSendResult?(msgid: number, error: RoomMessageSendResult): void;
/** {en}
* @detail callback
* @region Video management
* @author qipengxiang
* @brief All the users in the room will get informed via this callback when a user is banned or the ban of the user has been lifted by calling BanUserStream/UnbanUserStream on the server side.
* @param uid Disabled/unbanned video stream user ID
* @param banned Video stream sending status
* - true: Video stream sending is disabled
* - false: Video stream sending is unbanned
* @note
* - When the specified user in the room is banned/unbanned video stream sending, all users in the room will receive the callback.
* - If the banned user leaves or disconnects and then rejoins the room, the user is still banned from publishing audio stream, and all users in the room will be informed via the callback.
* - After the specified user is banned, other users in the room will check out and enter the room again, and will receive the callback again.
* - After the same room is disbanded and created again, the status in the room is cleared.
*
*/
onVideoStreamBanned?(uid: string, banned: boolean): void;
/** {en}
* @detail callback
* @region Audio event callback
* @author qipengxiang
* @brief All the users in the room will get informed via this callback when a user is banned or the ban of the user has been lifted by calling BanUserStream/UnbanUserStream on the server side.
* @param uid Disabled/unbanned audio stream user ID
* @param banned Audio stream sending status
* - true: Audio stream sending is disabled
* - false: Audio stream sending is unbanned
* @note
* - When the specified user in the room is disabled/unbanned audio stream sending, all users in the room will receive the callback.
* - If the banned user leaves or disconnects and then rejoins the room, the user is still banned from publishing audio stream, and all users in the room will be informed via the callback.
* - After the specified user is banned, other users in the room will check out and enter the room again, and will receive the callback again.
* - After the same room is disbanded and created again, the status in the room is cleared.
* - If the Audio selection is enabled in the console, only the user whose stream is banned will receive this callback.
*
*/
onAudioStreamBanned?(uid: string, banned: boolean): void;
/** {en}
* @detail callback
* @region Multi-room
* @author shenpengliang
* @brief Callback returning the state and errors during relaying the media stream to each of the rooms
* @param stateInfos Array of the state and errors of each designated room. Refer to {@link ForwardStreamStateInfo ForwardStreamStateInfo} for more information.
*
*/
onForwardStreamStateChanged?(stateInfos: Array): void;
/** {en}
* @detail callback
* @region Multi-room
* @author shenpengliang
* @brief Callback returning the events during relaying the media stream to each room
* @param eventInfos Array of the event of each designated room. Refer to {@link ForwardStreamEventInfo ForwardStreamEventInfo} for more information.
*
*/
onForwardStreamEvent?(eventInfos: Array): void;
/** {en}
* @detail callback
* @author chengchao.cc951119
* @brief Report the network quality of the users every 2s after the local user joins the room and starts publishing or subscribing to a stream.
* @param localQuality Local network quality. Refer to {@link NetworkQualityStats NetworkQualityStats} for details.
* @param remoteQualities Network quality of the subscribed users. Refer to {@link NetworkQualityStats NetworkQualityStats} for details.
* @note See [In-call Stats](#106866) for more information.
*
*/
onNetworkQuality?(localQuality: NetworkQualityStats, remoteQualities: Array): void;
/** {en}
* @valid since 3.52
* @detail callback
* @region Room Management
* @author lichangfeng.rtc
* @brief Callback on the result of calling {@link setRoomExtraInfo setRoomExtraInfo} to set extra information about the room.
* @param taskId The task ID of the API call.
* @param error See {@link SetRoomExtraInfoResult SetRoomExtraInfoResult} for the setting results and reasons.
*
*/
onSetRoomExtraInfoResult?(taskId: number, error: SetRoomExtraInfoResult): void;
/** {en}
* @valid since 3.52
* @detail callback
* @region Room Management
* @author lichangfeng.rtc
* @brief Callback used to receive the extra information set by the other users in the same room with {@link setRoomExtraInfo setRoomExtraInfo}.
* @param key Key of the extra information.
* @param value Content of the extra information.
* @param lastUpdateUserId The ID of the last user who updated this information.
* @param lastUpdateTimeMs The Unix time in ms when this information was last updated.
*
*/
onRoomExtraInfoUpdate?(key: string, value: string, lastUpdateUserId: string, lastUpdateTimeMs: number): void;
/** {en}
* @valid since 3.54
* @detail callback
* @region Room Management
* @author caocun
* @brief Callback for user to set user visibility by calling {@link setUserVisibility setUserVisibility}.
* @param currentUserVisibility Visibility of the current user.
* - true: Visible. The user can publish media streams. The other users in the room get informed of the behaviors of the user, such as joining room, starting video capture, and leaving room.
* - false: Invisible. The user cannot publish media streams. The other users in the room do not get informed of the behaviors of the user, such as joining room, starting video capture, or leaving room.
* @param errorCode Error code for setting user visibility. See {@link UserVisibilityChangeError UserVisibilityChangeError}.
*
*/
onUserVisibilityChanged?(currentUserVisibility: boolean, errorCode: UserVisibilityChangeError): void;
/** {en}
* @hidden currently not available
* @detail callback
* @region Subtitle translation service
* @author qiaoxingwang
* @brief Callback on subtitle states.
* After you call {@link startSubtitle startSubtitle} and {@link stopSubtitle stopSubtitle}, you will receive this callback which informs you of the states and error codes of the subtitling task, as well as detailed information on the third party services' errors.
* @param state The states of subtitles. Refer to {@link SubtitleState SubtitleState} for details.
* @param errorCode Error codes of the subtitling task. Refer to {@link SubtitleErrorCode SubtitleErrorCode}.
* @param errorMessage Detailed information on the third party services' errors.
*
*/
onSubtitleStateChanged?(state: SubtitleState, errorCode: SubtitleErrorCode, errorMessage: string): void;
/** {en}
* @hidden currently not available
* @detail callback
* @region Subtitle translation service
* @author qiaoxingwang
* @brief Callback on subtitle messages.
* After calling {@link startSubtitle startSubtitle} successfully, you will receive this callback which informs you of the related information on subtitles.
* @param subtitles Subtitle messages. Refer to {@link SubtitleMessage SubtitleMessage} for details.
*
*/
onSubtitleMessageReceived?(subtitles: Array): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, user {@link onRoomStateChanged onRoomStateChanged} and {@link onStreamStateChanged onStreamStateChanged} instead.
* @detail callback
* @author shenpengliang
* @region Multiple rooms
* @brief Warning callback occurred.
* @note SDK A (network or media-related) warning occurred at the runtime. The SDK usually recovers automatically and warnings can be ignored.
* @param warn Warning code. See {@link WarningCode WarningCode}
*
*/
onRoomWarning?(warn: WarningCode): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, use {@link onRoomStateChanged onRoomStateChanged} and {@link onStreamStateChanged onStreamStateChanged} instead.
* @detail callback
* @region Multiple rooms
* @author shenpengliang
* @brief Error callback occurred.
* @note SDK An error (network or media related) occurred at runtime. The SDK usually does not recover automatically, and you may need to intervene.
* @param err BigInt, see: {@link ErrorCode ErrorCode} for detailed definitions
*
*/
onRoomError?(err: ErrorCode): void;
/** {en}
* @deprecated since 3.45 and will be deleted in 3.51, use {@link onUserUnpublishStream onUserUnpublishStream} and {@link onUserUnpublishScreen onUserUnpublishScreen} instead.
* @detail callback
* @region Multi-room
* @author shenpengliang
* @brief New stream release callback in the room.
* Local users receive this callback notification when a remote user in the room publishes a new audio & video stream. The properties of the
* @param stream Stream. See {@link RTCStream RTCStream} data type for details.
*
*/
onStreamAdd?(stream: RTCStream): void;
}
export interface IAudioEffectPlayerEventHandler {
/** {en}
* @detail callback
* @brief Callback for audio mixing status change.
* @param effectId The ID of {@link IAudioEffectPlayer IAudioEffectPlayer}. Set by {@link getAudioEffectPlayer getAudioEffectPlayer}.
* @param state See {@link PlayerState PlayerState}.
* @param error See {@link PlayerError PlayerError}.
*
*/
onAudioEffectPlayerStateChanged?(effectId: number, state: PlayerState, error: PlayerError): void;
}
export interface IPushSingleStreamToCDNObserver {
/** {en}
* @detail callback
* @region Push to CDN
* @author liujingchao
* @brief Used for reporting events during pushing a single stream to CDN.
* @param eventType Stream mixing and pushing status, see {@link ByteRTCStreamMixingEvent ByteRTCStreamMixingEvent}.
* @param taskId Task ID
* @param error Errors occurring during the pushing process. See {@link ByteRTCTranscoderErrorCode ByteRTCTranscoderErrorCode}.
*/
onStreamPushEvent?(eventType: RTCStreamSinglePushEvent, taskId: string, error: number): void;
}
export interface IRemoteEncodedVideoFrameObserver {
/** {en}
* @detail callback
* @region video data callback
* @author wangzhanqiang
* @brief Call {@link registerRemoteEncodedVideoFrameObserver registerRemoteEncodedVideoFrameObserver}, the callback is triggered when the SDK detects the remote encoded video data
* @param streamKey Received remote stream information. See {@link RemoteStreamKey RemoteStreamKey}
* @param encodedVideoFrame Received remote video frame information. See {@link RTCEncodedVideoFrame RTCEncodedVideoFrame}
* @note encodedVideoFrame is only valid within the scope of the callback function. Do not store this parameter and access the memory data of this parameter in other functions
*
*/
onRemoteEncodedVideoFrame?(streamKey: RemoteStreamKey, encodedVideoFrame: RTCEncodedVideoFrame): void;
}
export interface IFaceDetectionObserver {
/** {en}
* @detail callback
* @region Video Effect
* @author wangjunlin.3182
* @brief Callback of the result of face detection with Effect SDK.
* After calling {@link enableFaceDetection enableFaceDetection} and using the Effect SDK integrated in the RTC SDK, you will receive this callback.
* @param result Face detection result. See {@link FaceDetectionResult FaceDetectionResult}.
*
*/
onFaceDetectResult?(result: FaceDetectionResult): void;
}
export interface IMixedStreamObserver {
/** {en}
* @detail callback
* @region Push to CDN
* @author liujingchao
* @brief Used for reporting events during pushing streams to CDNs.
* @param eventType Stream mixing and pushing status, see {@link ByteRTCStreamMixingEvent ByteRTCStreamMixingEvent}.
* @param taskId Task ID
* @param error Errors occurring during the pushing process. See {@link ByteRTCTranscoderErrorCode ByteRTCTranscoderErrorCode}.
* @param mixType Stream mixing and pushing type. See {@link MixedStreamType MixedStreamType}.
*
*/
onMixingEvent?(eventType: ByteRTCStreamMixingEvent, taskId: string, error: RTCStreamMixingErrorCode, mixType: MixedStreamType): void;
}
export interface IMediaPlayerAudioFrameObserver {
/** {en}
* @detail callback
* @brief The callback for the audio frames during local audio file mixing.
* @param playerId
* @param frame See {@link IAudioFrame IAudioFrame}.
*
*/
onFrame?(playerId: number, frame: IAudioFrame): void;
}
export interface IAudioFileFrameObserver {
/** {en}
* @detail callback
* @author majun.lvhiei
* @brief The callback for the audio frames during local audio file mixing.
* @param mixID Mixing ID.
* @param audioFrame See {@link IAudioFrame IAudioFrame}.
*
*
*/
onAudioFileFrame?(mixID: number, audioFrame: IAudioFrame): void;
}
export interface ILocalEncodedVideoFrameObserver {
/** {en}
* @detail callback
* @region Video Data Callback
* @brief After calling {@link registerLocalEncodedVideoFrameObserver registerLocalEncodedVideoFrameObserver}, SDK will trigger this callback when it receives local video frames.
* @param streamIndex Type of the local video frame. Refer to the enumeration class [StreamIndex](70083#StreamIndex-2).
* @param encodedVideoFrame Information about the local video frame. See {@link RTCEncodedVideoFrame RTCEncodedVideoFrame}
* @note encodedVideoFrame is only valid within the scope of the callback function. Do not store this parameter and access the memory data of this parameter in other functions
*/
onLocalEncodedVideoFrame?(streamIndex: StreamIndex, encodedVideoFrame: RTCEncodedVideoFrame): void;
}
export interface IExternalVideoEncoderEventHandler {
/** {en}
* @detail callback
* @region Video management
* @author wangzhanqiang
* @brief Prompt custom encoded frames to start pushing callbacks.
* After receiving this callback, you can call {@link pushExternalEncodedVideoFrame pushExternalEncodedVideoFrame} to push a custom encoded video frame to the SDK
* @param index Properties of the encoded stream that can be pushed. Refer to the enumeration class [StreamIndex](70083#streamindex-2).
*
*/
onStart?(index: StreamIndex): void;
/** {en}
* @detail callback
* @region Video management
* @author wangzhanqiang
* @brief When receiving the callback, you need to stop pushing custom encoded video frames to the SDK
* @param index The properties of the encoded stream that need to stop pushing. Refer to the enumeration class [StreamIndex](70083#streamindex-2).
*
*/
onStop?(index: StreamIndex): void;
/** {en}
* @detail callback
* @region Video management
* @author wangzhanqiang
* @brief When the frame rate or bit rate of a custom encoded stream changes, the callback is triggered
* @param streamIndex The properties of the changed encoded stream. Refer to the enumeration class [StreamIndex](70083#streamindex-2).
* @param videoIndex The subscript of the corresponding encoded stream
* @param fps The frame rate after the change, the unit: fps
* @param bitrateKbps The code rate after the change, the unit: kbps
*
*/
onRateUpdate?(streamIndex: StreamIndex, videoIndex: number, fps: number, bitrateKbps: number): void;
/** {en}
* @detail callback
* @region Video management
* @author wangzhanqiang
* @brief This callback is used to inform the stream publisher that a keyframe needs to be regenerated.
* @param streamIndex Properties of the remote encoded stream. Refer to the enumeration class [StreamIndex](70083#streamindex-2).
* @param videoIndex Subscript of the corresponding encoded stream
*
*/
onRequestKeyFrame?(streamIndex: StreamIndex, videoIndex: number): void;
/** {en}
* @valid since 3.56
* @detail callback
* @brief As the sender of a external encoded video stream, you will receive this callback at certain moments.
* Based on the hints of this callback, you can selectively encode the video stream that is ready for transmission, in order to reduce the performance impact of video encoding on the local device. This callback is triggered based on a combination of factors, including the performance of the local device, the local network, and whether the stream is subscribed by the remote user.
* @param streamIndex See [StreamIndex](70083#streamindex-2).
* @param videoIndex Subscript of the corresponding encoded stream.
* @param active The active state of the corresponding encoded stream.
* @note To receive the callback, call {@link setVideoSourceType setVideoSourceType} to set the input video source to custom encoded video and call {@link setExternalVideoEncoderEventHandler setExternalVideoEncoderEventHandler} to set the callback handler.
*
*/
onActiveVideoLayer?(streamIndex: StreamIndex, videoIndex: number, active: boolean): void;
}
export interface IMediaPlayerEventHandler {
/** {en}
* @detail callback
* @brief Callback for audio mixing status change.
* @param playerId The ID of {@link IMediaPlayer IMediaPlayer}. Set by {@link getMediaPlayer getMediaPlayer}.
* @param state See {@link PlayerState PlayerState}.
* @param error See {@link PlayerError PlayerError}.
*
*/
onMediaPlayerStateChanged?(playerId: number, state: PlayerState, error: PlayerError): void;
/** {en}
* @detail callback
* @brief Periodic callback for audio mixing progress. The period is set by {@link setProgressInterval setProgressInterval}.
* @param playerId The ID of {@link IMediaPlayer IMediaPlayer}. Set by {@link getMediaPlayer getMediaPlayer}.
* @param progress Mixing progress in ms.
*
*/
onMediaPlayerPlayingProgress?(playerId: number, progress: number): void;
}
export interface IAudioFrameObserver {
/** {en}
* @detail callback
* @region Audio Data Callback
* @author wangjunzheng
* @brief Returns the audio data recorded by local microphone.
* @param audioFrame Audio data. See {@link IAudioFrame IAudioFrame}.
*
*/
onRecordAudioFrame?(audioFrame: IAudioFrame): void;
/** {en}
* @detail callback
* @region Audio Data Callback
* @author wangjunzheng
* @brief Returns the mixed audio data of all remote users subscribed by the local user.
* @param audioFrame Audio data. See {@link IAudioFrame IAudioFrame}.
*
*/
onPlaybackAudioFrame?(audioFrame: IAudioFrame): void;
/** {en}
* @detail callback
* @region Audio Data Callback
* @author wangjunzheng
* @brief Returns the audio data of one remote user.
* @param streamKey Remote stream information. See {@link RemoteStreamKey RemoteStreamKey}.
* @param audioFrame Audio data. See {@link IAudioFrame IAudioFrame}.
* @note This callback works on the playback thread. Don't do anything time-consuming in this callback, or it may affect the entire audio playback chain.
*
*/
onRemoteUserAudioFrame?(streamKey: RemoteStreamKey, audioFrame: IAudioFrame): void;
/** {en}
* @detail callback
* @region Audio Data Callback
* @author wangjunzheng
* @brief Returns the mixed audio data including the data recorded by local microphone and that of all remote users subscribed by the local user.
* @param audioFrame Audio data. See {@link IAudioFrame IAudioFrame}.
*
*/
onMixedAudioFrame?(audioFrame: IAudioFrame): void;
}
export interface IMediaPlayerCustomSourceProvider {
}
export interface IAudioFrameProcessor {
}
export declare class android_RTCVideoEventHandler extends $p_a.IRTCVideoEventHandler {
protected _instance: RTCVideoEventHandler;
constructor(_instance: RTCVideoEventHandler);
onWarning(warn: $p_a.int): void;
onError(err: $p_a.int): void;
onExtensionAccessError(extensionName: string, msg: string): void;
onSysStats(stats: $p_a.SysStats): void;
onNetworkTypeChanged(type: $p_a.int): void;
onUserStartVideoCapture(roomId: string, uid: string): void;
onUserStopVideoCapture(roomId: string, uid: string): void;
onCreateRoomStateChanged(roomId: string, errorCode: $p_a.int): void;
onUserStartAudioCapture(roomId: string, uid: string): void;
onUserStopAudioCapture(roomId: string, uid: string): void;
onLocalAudioStateChanged(state: $p_a.LocalAudioStreamState, error: $p_a.LocalAudioStreamError): void;
onRemoteAudioStateChanged(key: $p_a.RemoteStreamKey, state: $p_a.RemoteAudioState, reason: $p_a.RemoteAudioStateChangeReason): void;
onLocalVideoStateChanged(streamIndex: $p_a.StreamIndex, state: $p_a.LocalVideoStreamState, error: $p_a.LocalVideoStreamError): void;
onRemoteVideoStateChanged(streamKey: $p_a.RemoteStreamKey, videoState: $p_a.RemoteVideoState, videoStateReason: $p_a.RemoteVideoStateChangeReason): void;
onFirstRemoteVideoFrameRendered(remoteStreamKey: $p_a.RemoteStreamKey, frameInfo: $p_a.VideoFrameInfo): void;
onFirstRemoteVideoFrameDecoded(remoteStreamKey: $p_a.RemoteStreamKey, frameInfo: $p_a.VideoFrameInfo): void;
onFirstLocalVideoFrameCaptured(streamIndex: $p_a.StreamIndex, frameInfo: $p_a.VideoFrameInfo): void;
onLocalVideoSizeChanged(streamIndex: $p_a.StreamIndex, frameInfo: $p_a.VideoFrameInfo): void;
onRemoteVideoSizeChanged(remoteStreamKey: $p_a.RemoteStreamKey, frameInfo: $p_a.VideoFrameInfo): void;
onConnectionStateChanged(state: $p_a.int, reason: $p_a.int): void;
onAudioRouteChanged(route: $p_a.AudioRoute): void;
onFirstLocalAudioFrame(streamIndex: $p_a.StreamIndex): void;
onFirstRemoteAudioFrame(remoteStreamKey: $p_a.RemoteStreamKey): void;
onSEIMessageReceived(remoteStreamKey: $p_a.RemoteStreamKey, message: $p_a.ByteBuffer): void;
onSEIStreamUpdate(remoteStreamKey: $p_a.RemoteStreamKey, event: $p_a.SEIStreamUpdateEvent): void;
onLoginResult(uid: string, errorCode: $p_a.int, elapsed: $p_a.int): void;
onLogout(reason: $p_a.int): void;
onServerParamsSetResult(error: $p_a.int): void;
onGetPeerOnlineStatus(peerUserId: string, status: $p_a.int): void;
onUserMessageReceivedOutsideRoom(uid: string, message: string): void;
onUserBinaryMessageReceivedOutsideRoom(uid: string, message: $p_a.ByteBuffer): void;
onUserMessageSendResultOutsideRoom(msgid: $p_a.long, error: $p_a.int): void;
onServerMessageSendResult(msgid: $p_a.long, error: $p_a.int, message: $p_a.ByteBuffer): void;
onNetworkDetectionResult(type: $p_a.NetworkDetectionLinkType, quality: $p_a.int, rtt: $p_a.int, lostRate: $p_a.double, bitrate: $p_a.int, jitter: $p_a.int): void;
onNetworkDetectionStopped(reason: $p_a.NetworkDetectionStopReason): void;
onSimulcastSubscribeFallback(event: $p_a.RemoteStreamSwitch): void;
onPerformanceAlarms(mode: $p_a.PerformanceAlarmMode, roomId: string, reason: $p_a.PerformanceAlarmReason, data: $p_a.SourceWantedData): void;
onAudioFrameSendStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFrameSendState): void;
onVideoFrameSendStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFrameSendState): void;
onScreenVideoFrameSendStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFrameSendState): void;
onAudioFramePlayStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFramePlayState): void;
onVideoFramePlayStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFramePlayState): void;
onScreenVideoFramePlayStateChanged(roomId: string, user: $p_a.RtcUser, state: $p_a.FirstFramePlayState): void;
onAudioDeviceStateChanged(deviceID: string, deviceType: $p_a.AudioDeviceType, deviceState: $p_a.int, deviceError: $p_a.int): void;
onVideoDeviceStateChanged(deviceID: string, deviceType: $p_a.VideoDeviceType, deviceState: $p_a.int, deviceError: $p_a.int): void;
onAudioDeviceWarning(deviceID: string, deviceType: $p_a.AudioDeviceType, deviceWarning: $p_a.int): void;
onVideoDeviceWarning(deviceID: string, deviceType: $p_a.VideoDeviceType, deviceWarning: $p_a.int): void;
onRecordingStateUpdate(type: $p_a.StreamIndex, state: $p_a.RecordingState, errorCode: $p_a.RecordingErrorCode, info: $p_a.RecordingInfo): void;
onRecordingProgressUpdate(type: $p_a.StreamIndex, progress: $p_a.RecordingProgress, info: $p_a.RecordingInfo): void;
onAudioRecordingStateUpdate(state: $p_a.AudioRecordingState, errorCode: $p_a.AudioRecordingErrorCode): void;
onAudioMixingPlayingProgress(mixId: $p_a.int, progress: $p_a.long): void;
onLocalAudioPropertiesReport(audioPropertiesInfos: Array<$p_a.LocalAudioPropertiesInfo>): void;
onRemoteAudioPropertiesReport(audioPropertiesInfos: Array<$p_a.RemoteAudioPropertiesInfo>, totalRemoteVolume: $p_a.int): void;
onActiveSpeaker(roomId: string, uid: string): void;
onStreamSyncInfoReceived(streamKey: $p_a.RemoteStreamKey, streamType: $p_a.SyncInfoStreamType, data: $p_a.ByteBuffer): void;
onPushPublicStreamResult(roomId: string, publicStreamId: string, error: $p_a.PublicStreamErrorCode): void;
onPlayPublicStreamResult(publicStreamId: string, error: $p_a.PublicStreamErrorCode): void;
onPublicStreamSEIMessageReceived(publicStreamId: string, message: $p_a.ByteBuffer, sourceType: $p_a.DataMessageSourceType): void;
onPublicStreamDataMessageReceived(publicStreamId: string, message: $p_a.ByteBuffer, sourceType: $p_a.DataMessageSourceType): void;
onFirstPublicStreamVideoFrameDecoded(publicStreamId: string, videoFrameInfo: $p_a.VideoFrameInfo): void;
onFirstPublicStreamAudioFrame(publicStreamId: string): void;
onEchoTestResult(result: $p_a.EchoTestResult): void;
onCloudProxyConnected(interval: $p_a.int): void;
onHardwareEchoDetectionResult(hardwareEchoDetectionResult: $p_a.HardwareEchoDetectionResult): void;
onLocalProxyStateChanged(localProxyType: $p_a.LocalProxyType, localProxyState: $p_a.LocalProxyState, localProxyError: $p_a.LocalProxyError): void;
onUserMuteAudio(roomId: string, uid: string, muteState: $p_a.MuteState): void;
onUserMuteVideo(roomId: string, uid: string, muteState: $p_a.MuteState): void;
onAudioPlaybackDeviceChanged(device: $p_a.AudioPlaybackDevice): void;
onMediaDeviceStateChanged(deviceID: string, deviceType: $p_a.int, deviceState: $p_a.int, deviceError: $p_a.int): void;
onMediaDeviceWarning(deviceID: string, deviceType: $p_a.int, deviceWarning: $p_a.int): void;
onHttpProxyState(state: $p_a.int): void;
onHttpsProxyState(state: $p_a.int): void;
onSocks5ProxyState(state: $p_a.int, cmd: string, proxyAddress: string, localAddress: string, remoteAddress: string): void;
onAudioMixingStateChanged(mixId: $p_a.int, state: $p_a.AudioMixingState, error: $p_a.AudioMixingError): void;
}
export declare class ios_RTCVideoEventHandler extends $p_i.ByteRTCVideoDelegate {
protected _instance: RTCVideoEventHandler;
constructor(_instance: RTCVideoEventHandler);
rtcEngine$onWarning(engine: $p_i.ByteRTCVideo, code: $p_i.ByteRTCWarningCode): void;
rtcEngine$onError(engine: $p_i.ByteRTCVideo, errorCode: $p_i.ByteRTCErrorCode): void;
rtcEngine$onExtensionAccessError$msg(engine: $p_i.ByteRTCVideo, extensionName: $p_i.NSString, msg: $p_i.NSString): void;
rtcEngine$onSysStats(engine: $p_i.ByteRTCVideo, stats: $p_i.ByteRTCSysStats): void;
rtcEngine$onNetworkTypeChanged(engine: $p_i.ByteRTCVideo, type: $p_i.ByteRTCNetworkType): void;
rtcEngine$onUserStartVideoCapture$uid(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, uid: $p_i.NSString): void;
rtcEngine$onUserStopVideoCapture$uid(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, uid: $p_i.NSString): void;
rtcEngine$onCreateRoomStateChanged$errorCode(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, errorCode: $p_i.NSInteger): void;
rtcEngine$onUserStartAudioCapture$uid(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, userId: $p_i.NSString): void;
rtcEngine$onUserStopAudioCapture$uid(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, userId: $p_i.NSString): void;
rtcEngine$onLocalAudioStateChanged$error(engine: $p_i.ByteRTCVideo, state: $p_i.ByteRTCLocalAudioStreamState, error: $p_i.ByteRTCLocalAudioStreamError): void;
rtcEngine$onRemoteAudioStateChanged$state$reason(engine: $p_i.ByteRTCVideo, key: $p_i.ByteRTCRemoteStreamKey, state: $p_i.ByteRTCRemoteAudioState, reason: $p_i.ByteRTCRemoteAudioStateChangeReason): void;
rtcEngine$onLocalVideoStateChanged$withStreamState$withStreamError(engine: $p_i.ByteRTCVideo, streamIndex: $p_i.ByteRTCStreamIndex, state: $p_i.ByteRTCLocalVideoStreamState, error: $p_i.ByteRTCLocalVideoStreamError): void;
rtcEngine$onRemoteVideoStateChanged$withVideoState$withVideoStateReason(engine: $p_i.ByteRTCVideo, streamKey: $p_i.ByteRTCRemoteStreamKey, state: $p_i.ByteRTCRemoteVideoState, reason: $p_i.ByteRTCRemoteVideoStateChangeReason): void;
rtcEngine$onFirstRemoteVideoFrameRendered$withFrameInfo(engine: $p_i.ByteRTCVideo, streamKey: $p_i.ByteRTCRemoteStreamKey, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onFirstRemoteVideoFrameDecoded$withFrameInfo(engine: $p_i.ByteRTCVideo, streamKey: $p_i.ByteRTCRemoteStreamKey, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onFirstLocalVideoFrameCaptured$withFrameInfo(engine: $p_i.ByteRTCVideo, streamIndex: $p_i.ByteRTCStreamIndex, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onLocalVideoSizeChanged$withFrameInfo(engine: $p_i.ByteRTCVideo, streamIndex: $p_i.ByteRTCStreamIndex, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onRemoteVideoSizeChanged$withFrameInfo(engine: $p_i.ByteRTCVideo, streamKey: $p_i.ByteRTCRemoteStreamKey, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onConnectionStateChanged(engine: $p_i.ByteRTCVideo, state: $p_i.ByteRTCConnectionState): void;
rtcEngine$onAudioRouteChanged(engine: $p_i.ByteRTCVideo, device: $p_i.ByteRTCAudioRoute): void;
rtcEngine$onFirstLocalAudioFrame(engine: $p_i.ByteRTCVideo, streamIndex: $p_i.ByteRTCStreamIndex): void;
rtcEngine$onFirstRemoteAudioFrame(engine: $p_i.ByteRTCVideo, key: $p_i.ByteRTCRemoteStreamKey): void;
rtcEngine$onSEIMessageReceived$andMessage(engine: $p_i.ByteRTCVideo, remoteStreamKey: $p_i.ByteRTCRemoteStreamKey, message: $p_i.NSData): void;
rtcEngine$onSEIStreamUpdate$eventType(engine: $p_i.ByteRTCVideo, remoteStreamKey: $p_i.ByteRTCRemoteStreamKey, eventType: $p_i.ByteRTCSEIStreamEventType): void;
rtcEngine$onLoginResult$errorCode$elapsed(engine: $p_i.ByteRTCVideo, uid: $p_i.NSString, errorCode: $p_i.ByteRTCLoginErrorCode, elapsed: $p_i.NSInteger): void;
rtcEngine$onLogout(engine: $p_i.ByteRTCVideo, reason: $p_i.ByteRTCLogoutReason): void;
rtcEngine$onServerParamsSetResult(engine: $p_i.ByteRTCVideo, errorCode: $p_i.NSInteger): void;
rtcEngine$onGetPeerOnlineStatus$status(engine: $p_i.ByteRTCVideo, peerUserId: $p_i.NSString, status: $p_i.ByteRTCUserOnlineStatus): void;
rtcEngine$onUserMessageReceivedOutsideRoom$message(engine: $p_i.ByteRTCVideo, uid: $p_i.NSString, message: $p_i.NSString): void;
rtcEngine$onUserBinaryMessageReceivedOutsideRoom$message(engine: $p_i.ByteRTCVideo, uid: $p_i.NSString, message: $p_i.NSData): void;
rtcEngine$onUserMessageSendResultOutsideRoom$error(engine: $p_i.ByteRTCVideo, msgid: $p_i.NSInteger, error: $p_i.ByteRTCUserMessageSendResult): void;
rtcEngine$onServerMessageSendResult$error$message(engine: $p_i.ByteRTCVideo, msgid: $p_i.int64_t, error: $p_i.ByteRTCUserMessageSendResult, message: $p_i.NSData): void;
rtcEngine$onNetworkDetectionResult$quality$rtt$lostRate$bitrate$jitter(engine: $p_i.ByteRTCVideo, type: $p_i.ByteRTCNetworkDetectionLinkType, quality: $p_i.ByteRTCNetworkQuality, rtt: $p_i.int, lostRate: $p_i.double, bitrate: $p_i.int, jitter: $p_i.int): void;
rtcEngine$onNetworkDetectionStopped(engine: $p_i.ByteRTCVideo, errorCode: $p_i.ByteRTCNetworkDetectionStopReason): void;
rtcEngine$onSimulcastSubscribeFallback(engine: $p_i.ByteRTCVideo, event: $p_i.ByteRTCRemoteStreamSwitchEvent): void;
rtcEngine$onPerformanceAlarms$roomId$reason$sourceWantedData(engine: $p_i.ByteRTCVideo, mode: $p_i.ByteRTCPerformanceAlarmMode, roomId: $p_i.NSString, reason: $p_i.ByteRTCPerformanceAlarmReason, data: $p_i.ByteRTCSourceWantedData): void;
rtcEngine$onAudioFrameSendStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFrameSendState): void;
rtcEngine$onVideoFrameSendStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFrameSendState): void;
rtcEngine$onScreenVideoFrameSendStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFrameSendState): void;
rtcEngine$onAudioFramePlayStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFramePlayState): void;
rtcEngine$onVideoFramePlayStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFramePlayState): void;
rtcEngine$onScreenVideoFramePlayStateChanged$rtcUser$state(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, user: $p_i.ByteRTCUser, state: $p_i.ByteRTCFirstFramePlayState): void;
rtcEngine$onAudioDeviceStateChanged$device_type$device_state$device_error(engine: $p_i.ByteRTCVideo, deviceID: $p_i.NSString, deviceType: $p_i.ByteRTCAudioDeviceType, deviceState: $p_i.ByteRTCMediaDeviceState, deviceError: $p_i.ByteRTCMediaDeviceError): void;
rtcEngine$onVideoDeviceStateChanged$device_type$device_state$device_error(engine: $p_i.ByteRTCVideo, deviceID: $p_i.NSString, deviceType: $p_i.ByteRTCVideoDeviceType, deviceState: $p_i.ByteRTCMediaDeviceState, deviceError: $p_i.ByteRTCMediaDeviceError): void;
rtcEngine$onAudioDeviceWarning$deviceType$deviceWarning(engine: $p_i.ByteRTCVideo, deviceId: $p_i.NSString, deviceType: $p_i.ByteRTCAudioDeviceType, deviceWarning: $p_i.ByteRTCMediaDeviceWarning): void;
rtcEngine$onVideoDeviceWarning$deviceType$deviceWarning(engine: $p_i.ByteRTCVideo, deviceId: $p_i.NSString, deviceType: $p_i.ByteRTCVideoDeviceType, deviceWarning: $p_i.ByteRTCMediaDeviceWarning): void;
rtcEngine$onRecordingStateUpdate$state$error_code$recording_info(engine: $p_i.ByteRTCVideo, type: $p_i.ByteRTCStreamIndex, state: $p_i.ByteRTCRecordingState, errorCode: $p_i.ByteRTCRecordingErrorCode, recordingInfo: $p_i.ByteRTCRecordingInfo): void;
rtcEngine$onRecordingProgressUpdate$process$recording_info(engine: $p_i.ByteRTCVideo, type: $p_i.ByteRTCStreamIndex, process: $p_i.ByteRTCRecordingProgress, recordingInfo: $p_i.ByteRTCRecordingInfo): void;
rtcEngine$onAudioRecordingStateUpdate$error_code(engine: $p_i.ByteRTCVideo, state: $p_i.ByteRTCAudioRecordingState, errorCode: $p_i.ByteRTCAudioRecordingErrorCode): void;
rtcEngine$onAudioMixingPlayingProgress$progress(engine: $p_i.ByteRTCVideo, mixId: $p_i.NSInteger, progress: $p_i.int64_t): void;
rtcEngine$onLocalAudioPropertiesReport(engine: $p_i.ByteRTCVideo, audioPropertiesInfos: $p_i.NSArray<$p_i.ByteRTCLocalAudioPropertiesInfo>): void;
rtcEngine$onRemoteAudioPropertiesReport$totalRemoteVolume(engine: $p_i.ByteRTCVideo, audioPropertiesInfos: $p_i.NSArray<$p_i.ByteRTCRemoteAudioPropertiesInfo>, totalRemoteVolume: $p_i.NSInteger): void;
rtcEngine$onActiveSpeaker$uid(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, uid: $p_i.NSString): void;
rtcEngine$onStreamSyncInfoReceived$streamType$data(engine: $p_i.ByteRTCVideo, remoteStreamKey: $p_i.ByteRTCRemoteStreamKey, streamType: $p_i.ByteRTCSyncInfoStreamType, data: $p_i.NSData): void;
rtcEngine$onPushPublicStreamResult$publicStreamId$errorCode(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, streamId: $p_i.NSString, errorCode: $p_i.ByteRTCPublicStreamErrorCode): void;
rtcEngine$onPlayPublicStreamResult$errorCode(engine: $p_i.ByteRTCVideo, publicStreamId: $p_i.NSString, errorCode: $p_i.ByteRTCPublicStreamErrorCode): void;
rtcEngine$onPublicStreamSEIMessageReceived$andMessage$andSourceType(engine: $p_i.ByteRTCVideo, publicStreamId: $p_i.NSString, message: $p_i.NSData, sourceType: $p_i.ByteRTCDataMessageSourceType): void;
rtcEngine$onPublicStreamDataMessageReceived$andMessage$andSourceType(engine: $p_i.ByteRTCVideo, publicStreamId: $p_i.NSString, message: $p_i.NSData, sourceType: $p_i.ByteRTCDataMessageSourceType): void;
rtcEngine$onFirstPublicStreamVideoFrameDecoded$withFrameInfo(engine: $p_i.ByteRTCVideo, publicStreamId: $p_i.NSString, frameInfo: $p_i.ByteRTCVideoFrameInfo): void;
rtcEngine$onFirstPublicStreamAudioFrame(engine: $p_i.ByteRTCVideo, publicStreamId: $p_i.NSString): void;
rtcEngine$onEchoTestResult(engine: $p_i.ByteRTCVideo, result: $p_i.ByteRTCEchoTestResult): void;
rtcEngine$onCloudProxyConnected(engine: $p_i.ByteRTCVideo, interval: $p_i.NSInteger): void;
rtcEngine$onHardwareEchoDetectionResult(engine: $p_i.ByteRTCVideo, result: $p_i.ByteRTCHardwareEchoDetectionResult): void;
rtcEngine$onLocalProxyStateChanged$withProxyState$withProxyError(engine: $p_i.ByteRTCVideo, type: $p_i.ByteRTCLocalProxyType, state: $p_i.ByteRTCLocalProxyState, error: $p_i.ByteRTCLocalProxyError): void;
rtcEngine$onUserMuteAudio$uid$muteState(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, uid: $p_i.NSString, muteState: $p_i.ByteRTCMuteState): void;
rtcEngine$onUserMuteVideo$uid$withMuteState(engine: $p_i.ByteRTCVideo, roomId: $p_i.NSString, uid: $p_i.NSString, muteState: $p_i.ByteRTCMuteState): void;
rtcEngine$onAudioPlaybackDeviceChanged(engine: $p_i.ByteRTCVideo, device: $p_i.ByteRTCAudioPlaybackDevice): void;
rtcEngine$onMediaDeviceStateChanged$device_type$device_state$device_error(engine: $p_i.ByteRTCVideo, deviceID: $p_i.NSString, deviceType: $p_i.ByteRTCMediaDeviceType, deviceState: $p_i.ByteRTCMediaDeviceState, deviceError: $p_i.ByteRTCMediaDeviceError): void;
rtcEngine$onMediaDeviceWarning$deviceType$deviceWarning(engine: $p_i.ByteRTCVideo, deviceId: $p_i.NSString, deviceType: $p_i.ByteRTCMediaDeviceType, deviceWarning: $p_i.ByteRTCMediaDeviceWarning): void;
rtcEngine$onHttpProxyState(engine: $p_i.ByteRTCVideo, state: $p_i.NSInteger): void;
rtcEngine$onHttpsProxyState(engine: $p_i.ByteRTCVideo, state: $p_i.NSInteger): void;
rtcEngine$onSocks5ProxyState$cmd$proxy_address$local_address$remote_address(engine: $p_i.ByteRTCVideo, state: $p_i.NSInteger, cmd: $p_i.NSString, proxyAddress: $p_i.NSString, localAddress: $p_i.NSString, remoteAddress: $p_i.NSString): void;
rtcEngine$onAudioMixingStateChanged$state$error(engine: $p_i.ByteRTCVideo, mixId: $p_i.NSInteger, state: $p_i.ByteRTCAudioMixingState, error: $p_i.ByteRTCAudioMixingError): void;
}
export declare class android_RTCRoomEventHandler extends $p_a.IRTCRoomEventHandler {
protected _instance: RTCRoomEventHandler;
constructor(_instance: RTCRoomEventHandler);
onLeaveRoom(stats: $p_a.RTCRoomStats): void;
onRoomStateChanged(roomId: string, uid: string, state: $p_a.int, extraInfo: string): void;
onStreamStateChanged(roomId: string, uid: string, state: $p_a.int, extraInfo: string): void;
onAVSyncStateChange(state: $p_a.AVSyncState): void;
onRoomStats(stats: $p_a.RTCRoomStats): void;
onUserJoined(userInfo: $p_a.UserInfo, elapsed: $p_a.int): void;
onUserLeave(uid: string, reason: $p_a.int): void;
onTokenWillExpire(): void;
onPublishPrivilegeTokenWillExpire(): void;
onSubscribePrivilegeTokenWillExpire(): void;
onVideoPublishStateChanged(roomId: string, uid: string, state: $p_a.PublishState, reason: $p_a.PublishStateChangeReason): void;
onAudioPublishStateChanged(roomId: string, uid: string, state: $p_a.PublishState, reason: $p_a.PublishStateChangeReason): void;
onScreenVideoPublishStateChanged(roomId: string, uid: string, state: $p_a.PublishState, reason: $p_a.PublishStateChangeReason): void;
onScreenAudioPublishStateChanged(roomId: string, uid: string, state: $p_a.PublishState, reason: $p_a.PublishStateChangeReason): void;
onVideoSubscribeStateChanged(roomId: string, uid: string, state: $p_a.SubscribeState, reason: $p_a.SubscribeStateChangeReason): void;
onAudioSubscribeStateChanged(roomId: string, uid: string, state: $p_a.SubscribeState, reason: $p_a.SubscribeStateChangeReason): void;
onScreenVideoSubscribeStateChanged(roomId: string, uid: string, state: $p_a.SubscribeState, reason: $p_a.SubscribeStateChangeReason): void;
onScreenAudioSubscribeStateChanged(roomId: string, uid: string, state: $p_a.SubscribeState, reason: $p_a.SubscribeStateChangeReason): void;
onLocalStreamStats(stats: $p_a.LocalStreamStats): void;
onRemoteStreamStats(stats: $p_a.RemoteStreamStats): void;
onStreamSubscribed(stateCode: $p_a.int, userId: string, info: $p_a.SubscribeConfig): void;
onUserPublishStreamVideo(roomId: string, uid: string, isPublish: boolean): void;
onUserPublishStreamAudio(roomId: string, uid: string, isPublish: boolean): void;
onUserPublishScreenVideo(roomId: string, uid: string, isPublish: boolean): void;
onUserPublishScreenAudio(roomId: string, uid: string, isPublish: boolean): void;
onRoomMessageReceived(uid: string, message: string): void;
onRoomBinaryMessageReceived(uid: string, message: $p_a.ByteBuffer): void;
onUserMessageReceived(uid: string, message: string): void;
onUserBinaryMessageReceived(uid: string, message: $p_a.ByteBuffer): void;
onUserMessageSendResult(msgid: $p_a.long, error: $p_a.int): void;
onRoomMessageSendResult(msgid: $p_a.long, error: $p_a.int): void;
onVideoStreamBanned(uid: string, banned: boolean): void;
onAudioStreamBanned(uid: string, banned: boolean): void;
onForwardStreamStateChanged(stateInfos: Array<$p_a.ForwardStreamStateInfo>): void;
onForwardStreamEvent(eventInfos: Array<$p_a.ForwardStreamEventInfo>): void;
onNetworkQuality(localQuality: $p_a.NetworkQualityStats, remoteQualities: Array<$p_a.NetworkQualityStats>): void;
onSetRoomExtraInfoResult(taskId: $p_a.long, error: $p_a.SetRoomExtraInfoResult): void;
onRoomExtraInfoUpdate(key: string, value: string, lastUpdateUserId: string, lastUpdateTimeMs: $p_a.long): void;
onUserVisibilityChanged(currentUserVisibility: boolean, errorCode: $p_a.UserVisibilityChangeError): void;
onSubtitleStateChanged(state: $p_a.SubtitleState, errorCode: $p_a.SubtitleErrorCode, errorMessage: string): void;
onSubtitleMessageReceived(subtitles: Array<$p_a.SubtitleMessage>): void;
onRoomWarning(warn: $p_a.int): void;
onRoomError(err: $p_a.int): void;
onStreamAdd(stream: $p_a.RTCStream): void;
}
export declare class ios_RTCRoomEventHandler extends $p_i.ByteRTCRoomDelegate {
protected _instance: RTCRoomEventHandler;
constructor(_instance: RTCRoomEventHandler);
rtcRoom$onLeaveRoom(rtcRoom: $p_i.ByteRTCRoom, stats: $p_i.ByteRTCRoomStats): void;
rtcRoom$onRoomStateChanged$withUid$state$extraInfo(rtcRoom: $p_i.ByteRTCRoom, roomId: $p_i.NSString, uid: $p_i.NSString, state: $p_i.NSInteger, extraInfo: $p_i.NSString): void;
rtcRoom$onStreamStateChanged$withUid$state$extraInfo(rtcRoom: $p_i.ByteRTCRoom, roomId: $p_i.NSString, uid: $p_i.NSString, state: $p_i.NSInteger, extraInfo: $p_i.NSString): void;
rtcRoom$onAVSyncStateChange(rtcRoom: $p_i.ByteRTCRoom, state: $p_i.ByteRTCAVSyncState): void;
rtcRoom$onRoomStats(rtcRoom: $p_i.ByteRTCRoom, stats: $p_i.ByteRTCRoomStats): void;
rtcRoom$onUserJoined$elapsed(rtcRoom: $p_i.ByteRTCRoom, userInfo: $p_i.ByteRTCUserInfo, elapsed: $p_i.NSInteger): void;
rtcRoom$onUserLeave$reason(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, reason: $p_i.ByteRTCUserOfflineReason): void;
onTokenWillExpire(rtcRoom: $p_i.ByteRTCRoom): void;
onPublishPrivilegeTokenWillExpire(rtcRoom: $p_i.ByteRTCRoom): void;
onSubscribePrivilegeTokenWillExpire(rtcRoom: $p_i.ByteRTCRoom): void;
rtcRoom$onUserPublishStreamVideo$uid$isPublish(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
rtcRoom$onUserPublishStreamAudio$uid$isPublish(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
rtcRoom$onUserPublishScreenVideo$uid$isPublish(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
rtcRoom$onUserPublishScreenAudio$uid$isPublish(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
rtcRoom$onVideoPublishStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCPublishState, reason: $p_i.ByteRTCPublishStateChangeReason): void;
rtcRoom$onAudioPublishStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCPublishState, reason: $p_i.ByteRTCPublishStateChangeReason): void;
rtcRoom$onScreenVideoPublishStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCPublishState, reason: $p_i.ByteRTCPublishStateChangeReason): void;
rtcRoom$onScreenAudioPublishStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCPublishState, reason: $p_i.ByteRTCPublishStateChangeReason): void;
rtcRoom$onVideoSubscribeStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCSubscribeState, reason: $p_i.ByteRTCSubscribeStateChangeReason): void;
rtcRoom$onAudioSubscribeStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCSubscribeState, reason: $p_i.ByteRTCSubscribeStateChangeReason): void;
rtcRoom$onScreenVideoSubscribeStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCSubscribeState, reason: $p_i.ByteRTCSubscribeStateChangeReason): void;
rtcRoom$onScreenAudioSubscribeStateChanged$Uid$state$reason(rtcRoom: $p_i.ByteRTCRoom, roomId: NSString, uid: NSString, state: $p_i.ByteRTCSubscribeState, reason: $p_i.ByteRTCSubscribeStateChangeReason): void;
rtcRoom$onLocalStreamStats(rtcRoom: $p_i.ByteRTCRoom, stats: $p_i.ByteRTCLocalStreamStats): void;
rtcRoom$onRemoteStreamStats(rtcRoom: $p_i.ByteRTCRoom, stats: $p_i.ByteRTCRemoteStreamStats): void;
rtcRoom$onStreamSubscribed$userId$subscribeConfig(rtcRoom: $p_i.ByteRTCRoom, state: $p_i.ByteRTCSubscribeState, userId: $p_i.NSString, info: $p_i.ByteRTCSubscribeConfig): void;
rtcRoom$onRoomMessageReceived$message(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, message: $p_i.NSString): void;
rtcRoom$onRoomBinaryMessageReceived$message(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, message: $p_i.NSData): void;
rtcRoom$onUserMessageReceived$message(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, message: $p_i.NSString): void;
rtcRoom$onUserBinaryMessageReceived$message(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, message: $p_i.NSData): void;
rtcRoom$onUserMessageSendResult$error(rtcRoom: $p_i.ByteRTCRoom, msgid: $p_i.NSInteger, error: $p_i.ByteRTCUserMessageSendResult): void;
rtcRoom$onRoomMessageSendResult$error(rtcRoom: $p_i.ByteRTCRoom, msgid: $p_i.NSInteger, error: $p_i.ByteRTCRoomMessageSendResult): void;
rtcRoom$onVideoStreamBanned$isBanned(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, banned: $p_i.BOOL): void;
rtcRoom$onAudioStreamBanned$isBanned(rtcRoom: $p_i.ByteRTCRoom, uid: $p_i.NSString, banned: $p_i.BOOL): void;
rtcRoom$onForwardStreamStateChanged(rtcRoom: $p_i.ByteRTCRoom, infos: $p_i.NSArray<$p_i.ByteRTCForwardStreamStateInfo>): void;
rtcRoom$onForwardStreamEvent(rtcRoom: $p_i.ByteRTCRoom, infos: $p_i.NSArray<$p_i.ByteRTCForwardStreamEventInfo>): void;
rtcRoom$onNetworkQuality$remoteQualities(rtcRoom: $p_i.ByteRTCRoom, localQuality: $p_i.ByteRTCNetworkQualityStats, remoteQualities: $p_i.NSArray<$p_i.ByteRTCNetworkQualityStats>): void;
rtcRoom$onSetRoomExtraInfoResult$error(rtcRoom: $p_i.ByteRTCRoom, taskId: $p_i.NSInteger, error: $p_i.ByteRTCSetRoomExtraInfoResult): void;
rtcRoom$onRoomExtraInfoUpdate$value$lastUpdateUserId$lastUpdateTimeMs(rtcRoom: $p_i.ByteRTCRoom, key: $p_i.NSString, value: $p_i.NSString, lastUpdateUserId: $p_i.NSString, lastUpdateTimeMs: $p_i.NSInteger): void;
rtcRoom$onUserVisibilityChanged$errorCode(rtcRoom: $p_i.ByteRTCRoom, currentUserVisibility: $p_i.BOOL, errorCode: $p_i.ByteRTCUserVisibilityChangeError): void;
rtcRoom$onSubtitleStateChanged$errorCode$errorMessage(rtcRoom: $p_i.ByteRTCRoom, state: $p_i.ByteRTCSubtitleState, errorCode: $p_i.ByteRTCSubtitleErrorCode, errorMessage: $p_i.NSString): void;
rtcRoom$onSubtitleMessageReceived(rtcRoom: $p_i.ByteRTCRoom, subtitles: $p_i.NSArray<$p_i.ByteRTCSubtitleMessage>): void;
rtcRoom$onRoomWarning(rtcRoom: $p_i.ByteRTCRoom, warningCode: $p_i.ByteRTCWarningCode): void;
rtcRoom$onRoomError(rtcRoom: $p_i.ByteRTCRoom, errorCode: $p_i.ByteRTCErrorCode): void;
rtcRoom$onStreamAdd(rtcRoom: $p_i.ByteRTCRoom, stream: $p_i.id<$p_i.ByteRTCStream>): void;
}
export declare class android_IAudioEffectPlayerEventHandler extends $p_a.IAudioEffectPlayerEventHandler {
protected _instance: IAudioEffectPlayerEventHandler;
constructor(_instance: IAudioEffectPlayerEventHandler);
onAudioEffectPlayerStateChanged(effectId: $p_a.int, state: $p_a.PlayerState, error: $p_a.PlayerError): void;
}
export declare class ios_IAudioEffectPlayerEventHandler extends $p_i.ByteRTCAudioEffectPlayerEventHandler {
protected _instance: IAudioEffectPlayerEventHandler;
constructor(_instance: IAudioEffectPlayerEventHandler);
onAudioEffectPlayerStateChanged$state$error(effectId: $p_i.int, state: $p_i.ByteRTCPlayerState, error: $p_i.ByteRTCPlayerError): void;
}
export declare class android_IPushSingleStreamToCDNObserver extends $p_a.IPushSingleStreamToCDNObserver {
protected _instance: IPushSingleStreamToCDNObserver;
constructor(_instance: IPushSingleStreamToCDNObserver);
onStreamPushEvent(eventType: $p_a.ByteRTCStreamSinglePushEvent, taskId: string, error: $p_a.int): void;
}
export declare class ios_IPushSingleStreamToCDNObserver extends $p_i.ByteRTCPushSingleStreamToCDNObserver {
protected _instance: IPushSingleStreamToCDNObserver;
constructor(_instance: IPushSingleStreamToCDNObserver);
onStreamPushEvent$taskId$error(event: $p_i.ByteRTCSingleStreamPushEvent, taskID: $p_i.NSString, errorCode: $p_i.NSInteger): void;
}
export declare class android_IRemoteEncodedVideoFrameObserver extends $p_a.IRemoteEncodedVideoFrameObserver {
protected _instance: IRemoteEncodedVideoFrameObserver;
constructor(_instance: IRemoteEncodedVideoFrameObserver);
onRemoteEncodedVideoFrame(streamKey: $p_a.RemoteStreamKey, encodedVideoFrame: $p_a.RTCEncodedVideoFrame): void;
}
export declare class ios_IRemoteEncodedVideoFrameObserver extends $p_i.ByteRTCRemoteEncodedVideoFrameObserver {
protected _instance: IRemoteEncodedVideoFrameObserver;
constructor(_instance: IRemoteEncodedVideoFrameObserver);
onRemoteEncodedVideoFrame$withEncodedVideoFrame(streamKey: $p_i.ByteRTCRemoteStreamKey, videoFrame: $p_i.ByteRTCEncodedVideoFrame): void;
}
export declare class android_IFaceDetectionObserver extends $p_a.IFaceDetectionObserver {
protected _instance: IFaceDetectionObserver;
constructor(_instance: IFaceDetectionObserver);
onFaceDetectResult(result: $p_a.FaceDetectionResult): void;
}
export declare class ios_IFaceDetectionObserver extends $p_i.ByteRTCFaceDetectionObserver {
protected _instance: IFaceDetectionObserver;
constructor(_instance: IFaceDetectionObserver);
onFaceDetectResult(result: $p_i.ByteRTCFaceDetectionResult): void;
}
export declare class android_IMixedStreamObserver extends $p_a.IMixedStreamObserver {
protected _instance: IMixedStreamObserver;
constructor(_instance: IMixedStreamObserver);
onMixingEvent(eventType: $p_a.ByteRTCStreamMixingEvent, taskId: string, error: $p_a.ByteRTCTranscoderErrorCode, mixType: $p_a.MixedStreamType): void;
}
export declare class ios_IMixedStreamObserver extends $p_i.ByteRTCMixedStreamObserver {
protected _instance: IMixedStreamObserver;
constructor(_instance: IMixedStreamObserver);
onMixingEvent$taskId$error$mixType(event: $p_i.ByteRTCStreamMixingEvent, taskId: $p_i.NSString, errorCode: $p_i.ByteRTCStreamMixingErrorCode, mixType: $p_i.ByteRTCMixedStreamType): void;
}
export declare class android_IMediaPlayerAudioFrameObserver extends $p_a.IMediaPlayerAudioFrameObserver {
protected _instance: IMediaPlayerAudioFrameObserver;
constructor(_instance: IMediaPlayerAudioFrameObserver);
onFrame(playerId: $p_a.int, frame: $p_a.IAudioFrame): void;
}
export declare class ios_IMediaPlayerAudioFrameObserver extends $p_i.ByteRTCMediaPlayerAudioFrameObserver {
protected _instance: IMediaPlayerAudioFrameObserver;
constructor(_instance: IMediaPlayerAudioFrameObserver);
onFrame$audioFrame(playerId: $p_i.int, audioFrame: $p_i.ByteRTCAudioFrame): void;
}
export declare class android_IAudioFileFrameObserver extends $p_a.IAudioFileFrameObserver {
protected _instance: IAudioFileFrameObserver;
constructor(_instance: IAudioFileFrameObserver);
onAudioFileFrame(mixID: $p_a.int, audioFrame: $p_a.IAudioFrame): void;
}
export declare class ios_IAudioFileFrameObserver extends $p_i.ByteRTCAudioFileFrameObserver {
protected _instance: IAudioFileFrameObserver;
constructor(_instance: IAudioFileFrameObserver);
onAudioFileFrame$audioFrame(mixID: $p_i.int, audioFrame: $p_i.ByteRTCAudioFrame): void;
}
export declare class android_ILocalEncodedVideoFrameObserver extends $p_a.ILocalEncodedVideoFrameObserver {
protected _instance: ILocalEncodedVideoFrameObserver;
constructor(_instance: ILocalEncodedVideoFrameObserver);
onLocalEncodedVideoFrame(streamIndex: $p_a.StreamIndex, encodedVideoFrame: $p_a.RTCEncodedVideoFrame): void;
}
export declare class ios_ILocalEncodedVideoFrameObserver extends $p_i.ByteRTCLocalEncodedVideoFrameObserver {
protected _instance: ILocalEncodedVideoFrameObserver;
constructor(_instance: ILocalEncodedVideoFrameObserver);
onLocalEncodedVideoFrame$Frame(streamIndex: $p_i.ByteRTCStreamIndex, frame: $p_i.ByteRTCEncodedVideoFrame): void;
}
export declare class android_IExternalVideoEncoderEventHandler extends $p_a.IExternalVideoEncoderEventHandler {
protected _instance: IExternalVideoEncoderEventHandler;
constructor(_instance: IExternalVideoEncoderEventHandler);
onStart(index: $p_a.StreamIndex): void;
onStop(index: $p_a.StreamIndex): void;
onRateUpdate(streamIndex: $p_a.StreamIndex, videoIndex: $p_a.int, fps: $p_a.int, bitrateKbps: $p_a.int): void;
onRequestKeyFrame(streamIndex: $p_a.StreamIndex, videoIndex: $p_a.int): void;
onActiveVideoLayer(streamIndex: $p_a.StreamIndex, videoIndex: $p_a.int, active: boolean): void;
}
export declare class ios_IExternalVideoEncoderEventHandler extends $p_i.ByteRTCExternalVideoEncoderEventHandler {
protected _instance: IExternalVideoEncoderEventHandler;
constructor(_instance: IExternalVideoEncoderEventHandler);
onStart(streamIndex: $p_i.ByteRTCStreamIndex): void;
onStop(streamIndex: $p_i.ByteRTCStreamIndex): void;
onRateUpdate$withVideoIndex$withFps$withBitRate(streamIndex: $p_i.ByteRTCStreamIndex, videoIndex: $p_i.NSInteger, fps: $p_i.NSInteger, bitRateKps: $p_i.NSInteger): void;
onRequestKeyFrame$withVideoIndex(streamIndex: $p_i.ByteRTCStreamIndex, videoIndex: $p_i.NSInteger): void;
onActiveVideoLayer$withVideoIndex$withActive(streamIndex: $p_i.ByteRTCStreamIndex, videoIndex: $p_i.NSInteger, active: $p_i.BOOL): void;
}
export declare class android_IMediaPlayerEventHandler extends $p_a.IMediaPlayerEventHandler {
protected _instance: IMediaPlayerEventHandler;
constructor(_instance: IMediaPlayerEventHandler);
onMediaPlayerStateChanged(playerId: $p_a.int, state: $p_a.PlayerState, error: $p_a.PlayerError): void;
onMediaPlayerPlayingProgress(playerId: $p_a.int, progress: $p_a.long): void;
}
export declare class ios_IMediaPlayerEventHandler extends $p_i.ByteRTCMediaPlayerEventHandler {
protected _instance: IMediaPlayerEventHandler;
constructor(_instance: IMediaPlayerEventHandler);
onMediaPlayerStateChanged$state$error(playerId: $p_i.int, state: $p_i.ByteRTCPlayerState, error: $p_i.ByteRTCPlayerError): void;
onMediaPlayerPlayingProgress$progress(playerId: $p_i.int, progress: $p_i.int64_t): void;
}
export declare class android_IAudioFrameObserver extends $p_a.IAudioFrameObserver {
protected _instance: IAudioFrameObserver;
constructor(_instance: IAudioFrameObserver);
onRecordAudioFrame(audioFrame: $p_a.IAudioFrame): void;
onPlaybackAudioFrame(audioFrame: $p_a.IAudioFrame): void;
onRemoteUserAudioFrame(streamKey: $p_a.RemoteStreamKey, audioFrame: $p_a.IAudioFrame): void;
onMixedAudioFrame(audioFrame: $p_a.IAudioFrame): void;
}
export declare class ios_IAudioFrameObserver extends $p_i.ByteRTCAudioFrameObserver {
protected _instance: IAudioFrameObserver;
constructor(_instance: IAudioFrameObserver);
onRecordAudioFrame(audioFrame: $p_i.ByteRTCAudioFrame): void;
onPlaybackAudioFrame(audioFrame: $p_i.ByteRTCAudioFrame): void;
onRemoteUserAudioFrame$audioFrame(streamKey: $p_i.ByteRTCRemoteStreamKey, audioFrame: $p_i.ByteRTCAudioFrame): void;
onMixedAudioFrame(audioFrame: $p_i.ByteRTCAudioFrame): void;
}
export declare class android_IMediaPlayerCustomSourceProvider extends $p_a.IMediaPlayerCustomSourceProvider {
protected _instance: IMediaPlayerCustomSourceProvider;
constructor(_instance: IMediaPlayerCustomSourceProvider);
}
export declare class ios_IMediaPlayerCustomSourceProvider extends $p_i.ByteRTCMediaPlayerCustomSourceProvider {
protected _instance: IMediaPlayerCustomSourceProvider;
constructor(_instance: IMediaPlayerCustomSourceProvider);
}
export declare class android_IAudioFrameProcessor extends $p_a.IAudioFrameProcessor {
protected _instance: IAudioFrameProcessor;
constructor(_instance: IAudioFrameProcessor);
}
export declare class ios_IAudioFrameProcessor extends $p_i.ByteRTCAudioFrameProcessor {
protected _instance: IAudioFrameProcessor;
constructor(_instance: IAudioFrameProcessor);
}