import { IAudioProcessor } from 'agora-rte-extension'; import { IBaseProcessor } from 'agora-rte-extension'; import { IExtension } from 'agora-rte-extension'; declare const AgoraRTC: IAgoraRTC; export default AgoraRTC; /** * @ignore */ declare class AgoraRTCError extends AgoraRTCError_2 { readonly name: string; constructor(code: AgoraRTCErrorCode, message?: string, data?: any); print(level?: "error" | "warning"): AgoraRTCError; throw(): never; } /** * @ignore */ declare class AgoraRTCError_2 extends Error implements IAgoraRTCError { readonly code: AgoraRTCErrorCode; readonly message: string; readonly data?: any; readonly name: string; constructor(code: AgoraRTCErrorCode, message?: string, data?: any); toString(): string; print(level?: "error" | "warning", logger?: any): AgoraRTCError_2; throw(logger?: any): never; } /** * @ignore */ export declare enum AgoraRTCErrorCode { UNEXPECTED_ERROR = "UNEXPECTED_ERROR", UNEXPECTED_RESPONSE = "UNEXPECTED_RESPONSE", TIMEOUT = "TIMEOUT", INVALID_PARAMS = "INVALID_PARAMS", NOT_READABLE = "NOT_READABLE", NOT_SUPPORTED = "NOT_SUPPORTED", INVALID_OPERATION = "INVALID_OPERATION", OPERATION_ABORTED = "OPERATION_ABORTED", WEB_SECURITY_RESTRICT = "WEB_SECURITY_RESTRICT", EXCHANGE_SDP_FAILED = "EXCHANGE_SDP_FAILED", ADD_CANDIDATE_FAILED = "ADD_CANDIDATE_FAILED", DATACHANNEL_FAILED = "DATACHANNEL_FAILED", NETWORK_ERROR = "NETWORK_ERROR", NETWORK_TIMEOUT = "NETWORK_TIMEOUT", NETWORK_RESPONSE_ERROR = "NETWORK_RESPONSE_ERROR", API_INVOKE_TIMEOUT = "API_INVOKE_TIMEOUT", ENUMERATE_DEVICES_FAILED = "ENUMERATE_DEVICES_FAILED", DEVICE_NOT_FOUND = "DEVICE_NOT_FOUND", ELECTRON_IS_NULL = "ELECTRON_IS_NULL", ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR = "ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR", CHROME_PLUGIN_NO_RESPONSE = "CHROME_PLUGIN_NO_RESPONSE", CHROME_PLUGIN_NOT_INSTALL = "CHROME_PLUGIN_NOT_INSTALL", MEDIA_OPTION_INVALID = "MEDIA_OPTION_INVALID", PERMISSION_DENIED = "PERMISSION_DENIED", CONSTRAINT_NOT_SATISFIED = "CONSTRAINT_NOT_SATISFIED", TRACK_IS_DISABLED = "TRACK_IS_DISABLED", GET_VIDEO_ELEMENT_VISIBLE_ERROR = "GET_VIDEO_ELEMENT_VISIBLE_ERROR", SHARE_AUDIO_NOT_ALLOWED = "SHARE_AUDIO_NOT_ALLOWED", LOW_STREAM_ENCODING_ERROR = "LOW_STREAM_ENCODING_ERROR", SET_ENCODING_PARAMETER_ERROR = "SET_ENCODING_PARAMETER_ERROR", TRACK_STATE_UNREACHABLE = "TRACK_STATE_UNREACHABLE", INVALID_UINT_UID_FROM_STRING_UID = "INVALID_UINT_UID_FROM_STRING_UID", CAN_NOT_GET_PROXY_SERVER = "CAN_NOT_GET_PROXY_SERVER", CAN_NOT_GET_GATEWAY_SERVER = "CAN_NOT_GET_GATEWAY_SERVER", VOID_GATEWAY_ADDRESS = "VOID_GATEWAY_ADDRESS", UID_CONFLICT = "UID_CONFLICT", MULTI_UNILBS_RESPONSE_ERROR = "MULTI_UNILBS_RESPONSE_ERROR", UPDATE_TICKET_FAILED = "UPDATE_TICKET_FAILED", INVALID_LOCAL_TRACK = "INVALID_LOCAL_TRACK", INVALID_TRACK = "INVALID_TRACK", SENDER_NOT_FOUND = "SENDER_NOT_FOUND", CREATE_OFFER_FAILED = "CREATE_OFFER_FAILED", SET_ANSWER_FAILED = "SET_ANSWER_FAILED", ICE_FAILED = "ICE_FAILED", PC_CLOSED = "PC_CLOSED", SENDER_REPLACE_FAILED = "SENDER_REPLACE_FAILED", GET_LOCAL_CAPABILITIES_FAILED = "GET_LOCAL_CAPABILITIES_FAILED", GET_LOCAL_CONNECTION_PARAMS_FAILED = "GET_LOCAL_CONNECTION_PARAMS_FAILED", SUBSCRIBE_FAILED = "SUBSCRIBE_FAILED", UNSUBSCRIBE_FAILED = "UNSUBSCRIBE_FAILED", GATEWAY_P2P_LOST = "GATEWAY_P2P_LOST", NO_ICE_CANDIDATE = "NO_ICE_CANDIDATE", CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS = "CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS", EXIST_DISABLED_VIDEO_TRACK = "EXIST_DISABLED_VIDEO_TRACK", INVALID_REMOTE_USER = "INVALID_REMOTE_USER", REMOTE_USER_IS_NOT_PUBLISHED = "REMOTE_USER_IS_NOT_PUBLISHED", CUSTOM_REPORT_SEND_FAILED = "CUSTOM_REPORT_SEND_FAILED", CUSTOM_REPORT_FREQUENCY_TOO_HIGH = "CUSTOM_REPORT_FREQUENCY_TOO_HIGH", FETCH_AUDIO_FILE_FAILED = "FETCH_AUDIO_FILE_FAILED", READ_LOCAL_AUDIO_FILE_ERROR = "READ_LOCAL_AUDIO_FILE_ERROR", DECODE_AUDIO_FILE_FAILED = "DECODE_AUDIO_FILE_FAILED", WS_ABORT = "WS_ABORT", WS_DISCONNECT = "WS_DISCONNECT", WS_ERR = "WS_ERR", EXTERNAL_SIGNAL_ABORT = "EXTERNAL_SIGNAL_ABORT", LIVE_STREAMING_TASK_CONFLICT = "LIVE_STREAMING_TASK_CONFLICT", LIVE_STREAMING_INVALID_ARGUMENT = "LIVE_STREAMING_INVALID_ARGUMENT", LIVE_STREAMING_INTERNAL_SERVER_ERROR = "LIVE_STREAMING_INTERNAL_SERVER_ERROR", LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED = "LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED", LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED = "LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED", LIVE_STREAMING_CDN_ERROR = "LIVE_STREAMING_CDN_ERROR", LIVE_STREAMING_INVALID_RAW_STREAM = "LIVE_STREAMING_INVALID_RAW_STREAM", LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT = "LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT", LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE = "LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE", LIVE_STREAMING_WARN_FREQUENT_REQUEST = "LIVE_STREAMING_WARN_FREQUENT_REQUEST", WEBGL_INTERNAL_ERROR = "WEBGL_INTERNAL_ERROR", BEAUTY_PROCESSOR_INTERNAL_ERROR = "BEAUTY_PROCESSOR_INTERNAL_ERROR", CROSS_CHANNEL_WAIT_STATUS_ERROR = "CROSS_CHANNEL_WAIT_STATUS_ERROR", CROSS_CHANNEL_FAILED_JOIN_SRC = "CROSS_CHANNEL_FAILED_JOIN_SEC", CROSS_CHANNEL_FAILED_JOIN_DEST = "CROSS_CHANNEL_FAILED_JOIN_DEST", CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST = "CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST", CROSS_CHANNEL_SERVER_ERROR_RESPONSE = "CROSS_CHANNEL_SERVER_ERROR_RESPONSE", METADATA_OUT_OF_RANGE = "METADATA_OUT_OF_RANGE", LOCAL_AEC_ERROR = "LOCAL_AEC_ERROR", INVALID_PLUGIN = "INVALID_PLUGIN", DISCONNECT_P2P = "DISCONNECT_P2P", CONVERTING_IMAGEDATA_TO_BLOB_FAILED = "CONVERTING_IMAGEDATA_TO_BLOB_FAILED", CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED = "CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED", INIT_DATACHANNEL_TIMEOUT = "INIT_DATACHANNEL_TIMEOUT", CREATE_DATACHANNEL_ERROR = "CREATE_DATACHANNEL_ERROR", DATACHANNEL_CONNECTION_TIMEOUT = "DATACHANNEL_CONNECTION_TIMEOUT", PROHIBITED_OPERATION = "PROHIBITED_OPERATION", IMAGE_MODERATION_UPLOAD_FAILED = "IMAGE_MODERATION_UPLOAD_FAILED", P2P_MESSAGE_FAILED = "P2P_MESSAGE_FAILED" } /** * Statistics of the call, which can be retrieved by calling [AgoraRTCClient.getRTCStats]{@link IAgoraRTCClient.getRTCStats}. */ export declare interface AgoraRTCStats { /** * Call duration in seconds. */ Duration: number; /** * The total bitrate (bps) of the received audio and video, represented by an instantaneous value. */ RecvBitrate: number; /** * The total number of bytes received, represented by an aggregate value. */ RecvBytes: number; /** * The total bitrate (bps) of the sent audio and video, represented by an instantaneous value. */ SendBitrate: number; /** * The total number of bytes sent, represented by an aggregate value. */ SendBytes: number; /** * The number of users in the channel. * * - Communication profile: The number of users in the channel. * - Live Broadcast profile: * - If the local user is an audience: The number of users in the channel = The number of hosts in the channel + 1. * - If the local user is a host: The number of users in the channel = The number of hosts in the channel. */ UserCount: number; /** * RTT (Round-Trip Time) between the SDK and Agora's edge server, in ms. */ RTT: number; /** * The estimated bandwidth (Kbps) of the uplink network. */ OutgoingAvailableBandwidth: number; } declare enum AppType { APP_TYPE_INVALID_VALUE = -1, APP_TYPE_NATIVE = 0, APP_TYPE_NATIVE_COCOS = 1, APP_TYPE_NATIVE_UNITY = 2, APP_TYPE_NATIVE_ELECTRON = 3, APP_TYPE_NATIVE_FLUTTER = 4, APP_TYPE_NATIVE_UNREAL = 5, APP_TYPE_NATIVE_XAMARIN = 6, APP_TYPE_NATIVE_API_CLOUD = 7, APP_TYPE_NATIVE_REACT_NATIVE = 8, APP_TYPE_NATIVE_PYTHON = 9, APP_TYPE_NATIVE_COCOS_CREATOR = 10, APP_TYPE_NATIVE_RUST = 11, APP_TYPE_NATIVE_C_SHARP = 12, APP_TYPE_NATIVE_CEF = 13, APP_TYPE_NATIVE_UNI_APP = 14, APP_TYPE_WEBRTC = 1000, APP_TYPE_WEBRTC_REACT = 1001, APP_TYPE_WEBRTC_VUE = 1002, APP_TYPE_WEBRTC_ANGULAR = 1003 } /** * Regions for the connection. Used for calling [AgoraRTC.setArea]{@link IAgoraRTC.setArea}. */ export declare enum AREAS { /** * China. */ CHINA = "CHINA", /** * Asia, excluding Mainland China. */ ASIA = "ASIA", /** * North America. */ NORTH_AMERICA = "NORTH_AMERICA", /** * Europe. */ EUROPE = "EUROPE", /** * Japan. */ JAPAN = "JAPAN", /** * India. */ INDIA = "INDIA", /** * @ignore */ KOREA = "KOREA", /** * @ignore */ HKMC = "HKMC", /** * @ignore */ US = "US", /** * @ignore */ OCEANIA = "OCEANIA", /** * @ignore */ SOUTH_AMERICA = "SOUTH_AMERICA", /** * @ignore */ AFRICA = "AFRICA", /** * @ignore */ OVERSEA = "OVERSEA", /** * Global. */ GLOBAL = "GLOBAL", /** * @ignore */ EXTENSIONS = "EXTENSIONS" } /** * * The latency level of an audience member in a live interactive streaming. Takes effect only when the user role is `"audience"`. * - `1`: Low latency. * - `2`: (Default) Ultra low latency. */ export declare enum AudienceLatencyLevelType { /** * Low latency. */ AUDIENCE_LEVEL_LOW_LATENCY = 1, /** * Ultra-low latency. */ AUDIENCE_LEVEL_ULTRA_LOW_LATENCY = 2, /** * @ignore */ AUDIENCE_LEVEL_SYNC_LATENCY = 3 } /** * @ignore */ declare const AUDIO_ENCODER_CONFIG_SETTINGS: { speech_low_quality: AudioEncoderConfiguration; speech_standard: AudioEncoderConfiguration; music_standard: AudioEncoderConfiguration; standard_stereo: AudioEncoderConfiguration; high_quality: AudioEncoderConfiguration; high_quality_stereo: AudioEncoderConfiguration; }; declare enum AudioCodec { opus = "opus", pcma = "pcma", pcmu = "pcmu", g722 = "g722" } /** * * `AudioEncoderConfiguration` is the interface that defines the audio encoder configurations. * * You can customize the audio encoder configurations when calling [AgoraRTC.createCustomAudioTrack]{@link IAgoraRTC.createCustomAudioTrack}, [AgoraRTC.createMicrophoneAudioTrack]{@link IAgoraRTC.createMicrophoneAudioTrack} or [AgoraRTC.createBufferSourceAudioTrack]{@link IAgoraRTC.createBufferSourceAudioTrack}. */ export declare interface AudioEncoderConfiguration { /** * Sample rate of the audio (Hz). */ sampleRate?: number; /** * Sample size of the audio. */ sampleSize?: number; /** * Whether to enable stereo. */ stereo?: boolean; /** * Bitrate of the audio (Kbps). */ bitrate?: number; } /** * The preset audio encoder configurations. * * You can pass the preset video encoder configurations when calling the following methods: * - [AgoraRTC.createCustomAudioTrack]{@link IAgoraRTC.createCustomAudioTrack} * - [AgoraRTC.createMicrophoneAudioTrack]{@link IAgoraRTC.createMicrophoneAudioTrack} * - [AgoraRTC.createBufferSourceAudioTrack]{@link IAgoraRTC.createBufferSourceAudioTrack} * * The following table lists all the preset audio profiles. The SDK uses `"music_standard"` by default. * * | Audio Profile | Configurations | * | -------- | --------------- | * |`"speech_low_quality"`|Sample rate 16 kHz, mono, encoding bitrate 24 Kbps| * |`"speech_standard"`|Sample rate 32 kHz, mono, encoding bitrate 24 Kbps| * |`"music_standard"`|Sample rate 48 kHz, mono, encoding bitrate 32 Kbps| * |`"standard_stereo"`|Sample rate 48 kHz, stereo, encoding bitrate 64 Kbps| * |`"high_quality"`|Sample rate 48 kHz, mono, encoding bitrate 128 Kbps| * |`"high_quality_stereo"`|Sample rate 48 kHz, stereo, encoding bitrate 192 Kbps| Kbps. * @public */ export declare type AudioEncoderConfigurationPreset = keyof typeof AUDIO_ENCODER_CONFIG_SETTINGS; /** * Options for processing the audio buffer. You need to set the options for processing the audio buffer when calling [startProcessAudioBuffer]{@link IBufferSourceAudioTrack.startProcessAudioBuffer}. */ export declare interface AudioSourceOptions { /** * How many times the audio loops. */ cycle?: number; /** * Whether to loop the audio infinitely. */ loop?: boolean; /** * The playback position (seconds). */ startPlayTime?: number; } /** * Processing state of the audio buffer: * - `"stopped"`: The SDK stops processing the audio buffer. Reasons may include: * - The SDK finishes processing the audio buffer. * - The user manually stops the processing of the audio buffer. * - `"playing"`: The SDK is processing the audio buffer. * - `"paused"`: The SDK pauses processing the audio buffer. * * You can get the state with [BufferSourceAudioTrack.on("source-state-change")]{@link IBufferSourceAudioTrack.event_source_state_change}. */ export declare type AudioSourceState = "stopped" | "playing" | "paused"; /** * @ignore * * Image enhancement options. You need to set the image enhancement options when calling [setBeautyEffect]{@link ILocalVideoTrack.setBeautyEffect}. */ export declare interface BeautyEffectOptions { /** * * The smoothness level. * * The value range is [0.0, 1.0]. The original smoothness level is 0.0. The default value is 0.5. This parameter is usually used to remove blemishes. */ smoothnessLevel?: number; /** * The brightness level. * * The value range is [0.0, 1.0]. The original brightness level is 0.0. The default value is 0.7. */ lighteningLevel?: number; /** * The redness level. * * The value range is [0.0, 1.0]. The original redness level is 0.0. The default value is 0.1. This parameter adjusts the red saturation level. */ rednessLevel?: number; /** * The contrast level. Use this together with {@link lighteningLevel}. * - 0: Low contrast level. * - 1: (Default) The original contrast level. * - 2: High contrast level. */ lighteningContrastLevel?: 0 | 1 | 2; } /** * Configurations for the audio track from an audio file or `AudioBuffer` object. Set these configurations when calling [AgoraRTC.createBufferSourceAudioTrack]{@link IAgoraRTC.createBufferSourceAudioTrack}. */ export declare interface BufferSourceAudioTrackInitConfig { /** * The type of the audio source: * - `File`: An [File](https://developer.mozilla.org/en-US/docs/Web/API/File) object, representing a local audio file. * - `string`: The online audio file retrieved from an HTTPS address. Ensure the address supports HTTPS and CORS. * - `AudioBuffer`: An [AudioBuffer](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer) object, representing the raw data in PCM format. */ source: File | string | AudioBuffer; /** * Whether to cache the online file: * - `true`: Cache the online file. * - `false`: (default) Do not cache the online file. */ cacheOnlineFile?: boolean; /** * The audio encoder configurations. * * You can set the audio encoder configurations in either of the following ways: * - Pass the preset audio encoder configurations by using [[AudioEncoderConfigurationPreset]]. * - Pass your customized audio encoder configurations by using [[AudioEncoderConfiguration]]. * * > Firefox does not support setting the audio encoding rate. */ encoderConfig?: AudioEncoderConfiguration | AudioEncoderConfigurationPreset; } /** * Configurations for the video track from the video captured by a camera. Set these configurations when calling [AgoraRTC.createCameraVideoTrack]{@link IAgoraRTC.createCameraVideoTrack}. */ export declare interface CameraVideoTrackInitConfig { /** * The video encoder configurations. * * You can set the video encoder configurations in either of the following ways: * - Pass the preset video encoder configurations by using [[VideoEncoderConfigurationPreset]]. * - Pass your customized video encoder configurations by using [[VideoEncoderConfiguration]]. * - Leave this property empty to use the SDK's default value, `"480p_1"` (resolution: 640 × 480, frame rate: 15 fps, bitrate: 500 Kbps). */ encoderConfig?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset; /** * Whether to user the front camera or the rear camera. * * You can use this parameter to choose between the front camera and the rear camera on a mobile device: * - `"user"`: The front camera. * - `"environment"`: The rear camera. */ facingMode?: VideoFacingModeEnum; /** * Specifies the camera ID. * * You can get a list of the available cameras by calling [AgoraRTC.getCameras]{@link IAgoraRTC.getCameras}. */ cameraId?: string; /** * @since *
   *4.2.0* * * Sets the video transmission optimization mode. * * You can call this method during a video call, a live streaming or screen sharing to dynamically change the optimization mode. For example, during the screen sharing, before you change the shared content from text to video, you can change the optimization mode from `"detail"` to `"motion"` to ensure smoothness in poor network conditions. * * > Note: This method supports Chrome only. * * @param mode The video transmission optimization mode: * - `"detail"`: Prioritizes video quality. * - The SDK ensures high-quality images by automatically calculating a minimum bitrate based on the capturing resolution and frame rate. No matter how poor the network condition is, the sending bitrate will never be lower than the minimum value. * - In most cases, the SDK does not reduce the sending resolution, but may reduce the frame rate. * - `"motion"`: Since 4.21.0, the SDK prioritizes video smoothness. * - In poor network conditions, the SDK reduces the sending bitrate to minimize video freezes. * - In most cases, the SDK does not reduce the frame rate, but may reduce the sending resolution. */ optimizationMode?: OptimizationMode; /** * @ignore * * @since *
   *4.18.0* * * Configurations for Scalable Video Coding (SVC). * * You can set the configurations using one of the following options: * - Use the preset SVC configurations provided by the SDK through {@link SVCConfigurationPreset}. * - Use your custom SVC configurations through {@link SVCConfiguration}. */ scalabiltyMode?: SVCConfiguration | SVCConfigurationPreset; } /** * The error code of the media stream relay. You can get the code through [AgoraRTCClient.on("channel-media-relay-state")]{@link IAgoraRTCClient.event_channel_media_relay_state}. */ export declare enum ChannelMediaRelayError { /** * No error. */ RELAY_OK = "RELAY_OK", /** * The SDK disconnects from the relay service. */ SERVER_CONNECTION_LOST = "SERVER_CONNECTION_LOST", /** * The token of the source channel has expired. */ SRC_TOKEN_EXPIRED = "SRC_TOKEN_EXPIRED", /** * The token of the destination channel has expired. */ DEST_TOKEN_EXPIRED = "DEST_TOKEN_EXPIRED" } /** * Events during the media stream relay. You can get the event through [AgoraRTCClient.on("channel-media-relay-event")]{@link IAgoraRTCClient.event_channel_media_relay_event}. */ export declare enum ChannelMediaRelayEvent { /** * The user disconnects from the server due to a poor network connection. */ NETWORK_DISCONNECTED = "NETWORK_DISCONNECTED", /** * The user is connected to the server. */ NETWORK_CONNECTED = "NETWORK_CONNECTED", /** * The user joins the source channel. */ PACKET_JOINED_SRC_CHANNEL = "PACKET_JOINED_SRC_CHANNEL", /** * The user joins the destination channel. */ PACKET_JOINED_DEST_CHANNEL = "PACKET_JOINED_DEST_CHANNEL", /** * The SDK starts relaying the media stream to the destination channel. */ PACKET_SENT_TO_DEST_CHANNEL = "PACKET_SENT_TO_DEST_CHANNEL", /** * The server receives the video stream from the source channel. */ PACKET_RECEIVED_VIDEO_FROM_SRC = "PACKET_RECEIVED_VIDEO_FROM_SRC", /** * The server receives the audio stream from the source channel. */ PACKET_RECEIVED_AUDIO_FROM_SRC = "PACKET_RECEIVED_AUDIO_FROM_SRC", /** * The destination channel is updated. */ PACKET_UPDATE_DEST_CHANNEL = "PACKET_UPDATE_DEST_CHANNEL", /** * Fails to update the destination channel due to an internal error. */ PACKET_UPDATE_DEST_CHANNEL_REFUSED = "PACKET_UPDATE_DEST_CHANNEL_REFUSED", /** * The destination channel is not updated. */ PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = "PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE" } /** * Channel information in the media relay, used in [ChannelMediaRelayConfiguration]{@link IChannelMediaRelayConfiguration}. */ export declare interface ChannelMediaRelayInfo { /** * The channel name. */ channelName: string; /** * The token generated with the `channelName` and `uid`. Do not set this parameter if you have not enabled token. * The token for authentication. Do not set this parameter if you have not enabled token authentication. * * - When you set the information of the source channel, the token is generated with 0 and the source channel name. * - When you set the information of the destination channel, the token is generated with `uid` and the destination channel name. */ token?: string; /** * The unique ID to identify the relay stream. * * A 32-bit unsigned integer with a value ranging from 0 to (232-1). If you set it as `0`, the server assigns a random one. * * When used for the source channel, it is the ID to identify the relay stream in the source channel. * * When used for the destination channel, it is the ID to identify the relay stream in the destination channel. To avoid UID conflicts, this value must be different from any other user IDs in the destination channel. * - When you set the information of the source channel, set `uid` as the ID of the host whose stream is relayed. * - When you set the information of the destination channel, you can set `uid` as `0` (the server assigns a random one) or a 32-bit unsigned integer with a value ranging from 0 to (232-1). To avoid UID conflicts, this value must be different from any other user IDs in the destination channel. */ uid: number; } /** * The state code of the media stream relay. You can get the code through [AgoraRTCClient.on("channel-media-relay-state")]{@link IAgoraRTCClient.event_channel_media_relay_state}. */ export declare enum ChannelMediaRelayState { /** * The SDK is initialized, but has not started the media stream relay service. */ RELAY_STATE_IDLE = "RELAY_STATE_IDLE", /** * The SDK is connecting to the media stream relay service. */ RELAY_STATE_CONNECTING = "RELAY_STATE_CONNECTING", /** * The SDK successfully relays the media stream to the destination channel. */ RELAY_STATE_RUNNING = "RELAY_STATE_RUNNING", /** * An error occurs in the media stream relay. See {@link ChannelMediaRelayError} for the error code. */ RELAY_STATE_FAILURE = "RELAY_STATE_FAILURE" } /** * The visibility of the `