import { ErrorData, HlsConfig } from 'hls.js'; import * as agora_rtc_sdk_ng_esm from 'agora-rtc-sdk-ng/esm'; export { RemoteAudioTrackStats as RtcAudioStats, IAgoraRTCRemoteUser as RtcUser, RemoteVideoTrackStats as RtcVideoStats } from 'agora-rtc-sdk-ng/esm'; /** * @enum {string} RtcSourceEvent * @description Enum representing various RTC source events. * @public */ /** @en * Enum representing various RTC source events. */ declare enum RtcSourceEvent { /** 网络质量变化事件 */ /** @en * Event for network quality changes. */ NETWORK_QUALITY = "network_quality", /** 状态变化事件 */ /** @en * Event for state changes. */ STATE_CHANGED = "state_changed", /** 视频状态变化事件 */ /** @en * Event for video state changes. */ VIDEO_STATE_CHANGED = "video_state_changed", /** 音频状态变化事件 */ /** @en * Event for audio state changes. */ AUDIO_STATE_CHANGED = "audio_state_changed", /** 主持人变化事件 */ /** @en * Event for host changes. */ HOST_CHANGED = "host_changed", /** 用户状态变化事件 */ /** @en * Event for user state changes. */ USER_STATE_CHANGED = "user_state_changed", /** 流消息事件 */ /** @en * Event for stream message. */ STREAM_MESSAGE = "stream_message", /** av1 解码失败事件 */ /** @en * Event for av1 decode failed. */ AV1_DECODE_FAILED = "av1_decode_failed" } /** * RTC 源状态. * @public */ /** @en * The state of the RTC source. */ declare enum RtcSourceState { /** RTC 源正在创建. */ /** @en * The RTC source is being created. */ CREATING = "creating", /** RTC 源创建好了. */ /** @en * The RTC source has been created. */ CREATED = "created", /** RTC 源正在连接. */ /** @en * The RTC source is connecting. */ CONNECTING = "connecting", /** RTC 源连接好了. */ /** @en * The RTC source is connected. */ CONNECTED = "connected", /** RTC 源连接失败. */ /** @en * The RTC source connection failed. */ CONNECT_FAILED = "connect-failed", /** RTC 源销毁了. */ /** @en * The RTC source has been destroyed. */ DESTROYED = "destroyed" } /** * rtc 用户状态 * @public */ /** @en * The state of rtc user */ declare enum RtcUserState { /** RTC 用户加入了频道. */ /** @en * The RTC user has joined. */ JOINED = "joined", /** RTC 用户离开了频道. */ /** @en * The RTC user has left. */ LEFT = "left", /** RTC 用户取消了发流. */ /** @en * The RTC user has unpublished. */ UNPUBLISHED = "unpublished", /** RTC 用户发流了. */ /** @en * The RTC user has published. */ PUBLISHED = "published" } /** * rtc 媒体播放状态 * @public */ /** @en * The state of rtc media */ declare enum RtcMediaState { /** RTC 媒体处于播放状态. */ /** @en * The RTC media is playing. */ PLAYING = "playing", /** RTC 媒体处于暂停状态. */ /** @en * The RTC media is paused. */ PAUSED = "paused", /** RTC 媒体处于停止状态. */ /** @en * The RTC media is stopped. */ STOPPED = "stopped", /** RTC 媒体被重置了. */ /** @en * The RTC media is empty. */ EMPTY = "empty" } /** * 媒体源类型 * @public */ /** @en * The type of media */ declare enum MediaSource { HLS = "hls", RTC = "rtc", FILE = "file", /** * @ignore */ FLV = "flv", UNKNOWN = "unknown" } /** * 播放器状体 * @public */ /** @en * The state of the player */ declare enum MediaPlayState { /** pending: 播放器正在加载 */ /** @en * pending: The player is loading. */ PENDING = "pending", /** * canplay: 播放器准备就绪,可以播放 * @en * canplay: The player is ready to play. */ /** playing: 播放器正在播放 */ /** @en * playing: The player is playing. */ PLAYING = "playing", /** paused: 播放器正在暂停 */ /** @en * paused: The player is paused. */ PAUSED = "paused", /** stopped: 播放器被销毁了 */ /** @en * stopped: The player is stopped. */ STOPPED = "stopped" } /** * 播放器事件。 * @public */ /** @en * The event of the player */ declare enum PlayerEvent { /** rtc-user-state-changed: rtc 频道内远端用户状态发生改变 */ /** @en * rtc-user-state-changed: The state of the remote user in the rtc channel has changed. */ RTC_USER_STATE_CHANGED = "rtc-user-state-changed", /** rtc-source-state-changed: rtc 视频源状态发生变化 */ /** @en * rtc-source-state-changed: The state of the rtc video source has changed * */ RTC_SOURCE_STATE_CHANGED = "rtc-source-state-changed", /** rtc-host-changed: rtc 频道内当前推流用户发生改变。第一个参数为变更后的推流用户,第二个参数为变更前推流用户。仅在 rtc 视频源下触发,如无特殊用途,忽略该事件。 */ /** @en * rtc-host-changed: The current push user in the rtc channel has changed. The first parameter is the push user after the change, and the second parameter is the push user before the change. Only triggered under the rtc video source, ignore this event if there is no special purpose. * */ RTC_HOST_CHANGED = "rtc-host-changed", /** rtc-media-changed: rtc 频道内当前播放的媒体源发生变化。 */ /** @en * rtc-media-changed: The media source currently played in the rtc channel has changed. * */ RTC_MEDIA_CHANGED = "rtc-media-changed", /** rtc-events: rtc 相关事件, 用于处理rtc一些异常事件状态 {@link RtcEvent} */ /** @en * rtc-events: rtc related events, used to handle some abnormal event states of rtc {@link RtcEvent} * */ RTC_EVENTS = "rtc-events", /** play-state-changed: 该状态为用户主观认定的播放器状态 */ /** @en * play-state-changed: The state is the player state subjectively recognized by the user. * */ PLAY_STATE_CHANGED = "play-state-changed", /** before-media-source-change: 播放器准备切换视频源,对应 {@link PlayerEvent.BEFORE_MEDIA_SOURCE_CHANGE} */ /** @en * before-media-source-change: The player is ready to switch video sources, corresponding to {@link PlayerEvent.BEFORE_MEDIA_SOURCE_CHANGE} * */ BEFORE_MEDIA_SOURCE_CHANGE = "before-media-source-change", /** media-source-changed:播放器切换视频源(如从 RTC 切换到 HLS)成功后,触发该事件。 */ /** @en * media-source-changed: After the player successfully switches the video source (such as from RTC to HLS), this event is triggered. * */ MEDIA_SOURCE_CHANGED = "media-source-changed", /** autoplay-prevented: 在一些特定浏览器上自动播放失败回调,需要手动触发播放 */ /** @en * autoplay-prevented: The automatic playback failed callback on some specific browsers, and manual playback is required. * */ AUTOPLAY_PREVENTED = "autoplay-prevented", /** network-quality: 表示网络的质量, 0 | 1 | 2 | 3 | 4 | 5 | 6*/ /** @en * network-quality: Indicates the quality of the network, 0 | 1 | 2 | 3 | 4 | 5 | 6 * */ NETWORK_QUALITY = "network-quality", /** av1-support: av1 解码失败事件 */ /** @en * av1-support: The event for av1 decode failed * */ AV1_DECODE_FAILED = "av1-decode-failed", /** video-events: 视频元素的原始事件 */ /** @en * video-events: The original events of the video element * */ VIDEO_EVENTS = "video-events", /** error: 播放器中出现的各种错误,不包含触发 UNRECOVERABLE_ERROR 的报错,可尝试调用 retry进行恢复。 * 在 RTC 模式下参考:agora-rtc-sdk-ng的报错 https://api-ref.agora.io/en/voice-sdk/web/4.x/index.html#error-codes * 在 HLS 模式下参考:hls.js的报错 https://github.com/video-dev/hls.js/blob/master/docs/API.md#errors * */ /** @en * error: Various errors that occur in the player, excluding the errors that trigger UNRECOVERABLE_ERROR, you can try to call retry to recover. * In RTC mode, refer to the error of agora-rtc-sdk-ng https://api-ref.agora.io/en/voice-sdk/web/4.x/index.html#error-codes * In HLS mode, refer to the error of hls.js * */ ERROR = "error", /** request-switch-media-source: 视频源出现不可恢复的错误,一旦触发需要切换视频源。如从 RTC 切换到 HLS */ REQUEST_SWITCH_MEDIA_SOURCE = "request-switch-media-source", /** user-assigned: 分配的 uid 发生变化 */ /** @en * user-assigned: The uid assigned has changed * */ USER_ASSIGNED = "user-assigned", /** rtc-stream-message: rtc 流消息事件 */ /** @en * rtc-stream-message: The stream message event of the rtc * */ STREAM_MESSAGE = "stream-message", /** av1-detected: av1 检测是否可用,true 表示可用,false 表示不可用 */ /** @en * av1-detected: av1 detected whether it is available * */ AV1_DETECTED = "av1-detected" } /** * rtc 相关事件 * @public */ /** @en * The event of rtc */ declare enum RtcEvent { /** 1001: 网络断线 */ /** @en * 1001: Network disconnection * */ NETWORK_EXCEPTION = 1001, /** 1002: 网络断线恢复 */ /** @en * 1002: Network disconnection recovered * */ NETWORK_EXCEPTION_RECOVERED = 1002, /** 1003: 视频解码失败/超时 */ /** @en * 1003: Video decoding failed/timeout * */ VIDEO_DECODED_FAILED = 1003, /** 1004: 视频解码恢复 */ /** @en * 1004: Video decoding recovered * */ VIDEO_DECODED_RECOVERED = 1004, /** 1005: 视频卡顿 */ /** @en * 1005: Video frozen * */ VIDEO_FROZEN = 1005, /** 1006: 视频卡顿恢复 */ /** @en * 1006: Video frozen recovered * */ VIDEO_FROZEN_RECOVERED = 1006 } /** * Player 抛出的错误的 Code */ /** @en */ declare enum PlayerErrorCode { /** * 播放超时 */ TIMEOUT = "TIMEOUT" } interface IPlayerError { source: MediaSource; error: ErrorData | Error | IPlayerErrorMeta; } interface IPlayerErrorMeta { code: PlayerErrorCode; message?: string; } /** * `EventEmitter` 类提供了定义、触发和处理事件的方式。 */ /** @en * The `EventEmitter` class provides a way to define, emit, and handle events. */ declare class EventEmitter { private _events; /** * 指定一个事件名,获取当前所有监听这个事件的回调函数。 * * @param event - 事件名称。 */ /** @en * Gets all the listeners for a specified event. * * @param event The event name. */ getListeners(event: E): Function[]; /** * 监听一个指定的事件,当事件触发时会调用传入的回调函数。 * * @param event - 指定事件的名称。 * @param listener - 传入的回调函数。 */ /** @en * Listens for a specified event. * * When the specified event happens, the SDK triggers the callback that you pass. * @param event The event name. * @param listener The callback to trigger. */ on(event: E, listener: Function): void; /** * 监听一个指定的事件,当事件触发时会调用传入的回调函数。 * * 当监听后事件第一次触发时,该监听和回调函数就会被立刻移除,也就是只监听一次指定事件。 * * @param event - 指定事件的名称。 * @param listener - 传入的回调函数。 */ /** @en * Listens for a specified event once. * * When the specified event happens, the SDK triggers the callback that you pass and then removes the listener. * @param event The event name. * @param listener The callback to trigger. */ once(event: E, listener: Function): void; /** * 取消一个指定事件的监听。 * * @param event - 指定事件的名称。 * @param listener - 监听事件时传入的回调函数。 */ /** @en * Removes the listener for a specified event. * * @param event The event name. * @param listener The callback that corresponds to the event listener. */ off(event: E, listener?: Function): void; /** * 指定一个事件,取消其所有的监听。 * * @param event - 指定事件的名称,如果没有指定事件,则取消所有事件的所有监听。 */ /** @en * Removes all listeners for a specified event. * * @param event The event name. If left empty, all listeners for all events are removed. */ removeAllListeners(event?: E): void; private _indexOfListener; } declare function isHlsSupported(): boolean; declare function isRtcSupported(): boolean; declare enum PlayerKey { SessionStartTime = "session_start_time", SessionId = "session_id", SourceInit = "source_init", SourcePlaySuccess = "source_play_success", SessionUid = "session_user_id" } /** * Store 用于在 Player 和 Source 之间共享数据 * @public */ declare class PlayerStore { private data; private listeners; /** * 设置 store 中的值 * @param key - 键名 * @param value - 值 */ set(key: string, value: T): void; /** * 获取 store 中的值 * @param key - 键名 * @returns 对应的值,如果不存在则返回 undefined */ get(key: string): T | undefined; /** * 获取 store 中的值,如果不存在则返回默认值 * @param key - 键名 * @param defaultValue - 默认值 * @returns 对应的值或默认值 */ getOrDefault(key: string, defaultValue: T): T; /** * 检查 store 中是否存在某个键 * @param key - 键名 * @returns 是否存在 */ has(key: string): boolean; /** * 删除 store 中的值 * @param key - 键名 * @returns 是否删除成功 */ delete(key: string): boolean; /** * 清空 store */ clear(): void; /** * 监听某个键的变化 * @param key - 键名 * @param listener - 监听器函数 * @returns 取消监听的函数 */ watch(key: string, listener: (value: T) => void): () => void; /** * 取消监听某个键的变化 * @param key - 键名 * @param listener - 监听器函数(可选,如果不传则取消该键的所有监听) */ unwatch(key: string, listener?: (value: any) => void): void; /** * 通知监听器 * @param key - 键名 * @param value - 新值 */ private notify; /** * 获取所有键 * @returns 所有键的数组 */ keys(): string[]; /** * 获取所有值 * @returns 所有值的数组 */ values(): any[]; /** * 获取所有键值对 * @returns 所有键值对的数组 */ entries(): [string, any][]; /** * 获取 store 的大小 * @returns store 中键值对的数量 */ get size(): number; } /** * 播放器配置 * @public */ /** @en * The options of player */ interface IPlayerOptions { /** * 播放器播放链接 * - RTC: `rte://{appid}/{channel}?token={token}&uid={uid}&streamid={streamid}` * - HLS: `rte://{appid}/{appname}/{steamname}?token={token}&uid={uid}` * appid: 你的声网项目的 [App ID](https://doc.shengwang.cn/basics/glossary#app-id)。 * channel 标识通话的频道名称,长度在 64 字节以内的字符串。以下为支持的字符集范围(共 89 个字符): * - 26 个小写字母 a-z。 * - 26 个大写字母 A-Z。 * - 10 个数字 0-9。 * - 空格。 * - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","。 * token 用于鉴权的 token。 * - 如果你的项目没有开启 token 鉴权,这里填 `null`。 * - 安全要求不高: 你可以使用控制台生成的临时 token,详见[获取 RTC 临时 Token](http://doc.shengwang.cn/doc/rtc/javascript/get-started/enable-service)。 * - 安全要求高:传入从你的服务端获得的正式 token,详见[使用 Token 鉴权](http://doc.shengwang.cn/doc/rtc/javascript/basic-features/token-authentication)。 * uid 标识用户的 ID。整数或字符串,ASCII 字符,需保证唯一性。如果不指定或设为 `null`,服务器会自动分配一个整数型 uid 并在 Promise 中返回。 * - 如果使用整数作为用户 ID,需为 32 位无符号整数。建议设置范围:0 到 (232-1)。 * - 如果使用字符串作为用户 ID,长度不超过 255 个字符。 * streamid 标识主播的 ID。整数或字符串,ASCII 字符,需保证唯一性。如果不指定或设为 `null`,播放器会自动拉取频道内的第一个主播流。 * {appname}/{steamname} 用于 hls 模式下 * */ url: string; /** * 播放器容器 * - 可以是一个 HTML 元素的 ID * - 也可以是一个 HTMLVideoElement 对象 */ el: string | HTMLVideoElement; /** * 默认视频样式 */ noStyle?: boolean; /** * 视频宽度 */ width?: number; /** * 视频高度 */ height?: number; /** * 视频填充方式 * - `cover`: 填充整个容器,可能会裁剪视频 * - `contain`: 保持视频比例,可能会留有空白 * - `fill`: 填充整个容器,可能会拉伸视频 */ objectFit?: "cover" | "contain" | "fill"; /** * 视频宽高比 * - 例如: `16:9`, `4:3`, `1:1` */ aspectRatio?: string; /** * 是否自动切换 MediaSource, 默认为 true */ autoSwitchHLS?: boolean; /** * 默认使用HLS, 默认为 false */ defaultUseHLS?: boolean; /** * HLS 配置 */ hlsConfig?: HlsConfig; /** * 是否自动播放,默认为 false */ autoplay?: boolean; /** * 是否渲染,开启镜像 */ mirror?: boolean; /** * 超时记录 */ timeout?: number; /** * 是否loop */ loop?: boolean; /** * 是否开启NoSleep */ noSleep?: boolean; } declare class LivePlayer extends EventEmitter { /** * 检查 Agora FLS SDK,HLS协议对正在使用的浏览器的适配情况。 * * 该方法必须在创建播放器 {@link LivePlayer} 之前调用。 * * @returns 是否支持当前浏览器。 * - `true`: 支持。 * - `false`: 不支持。 */ static isHlsSupported: typeof isHlsSupported; /** * 检查 Agora FLS SDK,RTC协议对正在使用的浏览器的适配情况。 * * 该方法必须在创建播放器 {@link LivePlayer} 之前调用。 * * @returns 是否支持当前浏览器。 * - `true`: 支持。 * - `false`: 不支持。 */ static isRtcSupported: typeof isRtcSupported; _userId: number | string; get uid(): number | string; /** * 只有客户自己设置string,才会有string 的类型 */ set uid(uid: number | string); private source; /** * 播放器元素 */ /** @en * the element of player */ element: HTMLVideoElement; /** * 播放器 store,用于在 player 和 source 之间共享数据 */ /** @en * Player store for sharing data between player and source */ store: PlayerStore; private noSleep; private options; private urlInfo?; private autoSwitchHLS; private isMirror; private volume; private timeout?; private timeoutTrigger?; private fallbackTrigger?; private playDefer; private pauseDefer; private retryDefer; private switchUrlDefer; private switchSourceDefer; private _playState; private _userIntent; private exceptionManager; private exceptionTimer?; private lastTimeUpdate; private lastCheckVisibilityTime; private sessionId; private firstSuccess; private axiosCancelSource; private mutex; private needReportFirstPlaySuccess; /** * 统一上报 firstPlay 事件(成功或失败),只上报一次 */ private reportFirstPlay; get codec(): { video: "H264" | "H265" | "VP8" | "VP9" | "AV1X" | "AV1" | undefined; audio: "opus" | "aac" | "PCMU" | "PCMA" | "G722" | undefined; }; set playState(state: MediaPlayState); /** * 播放器状态 */ /** @en * the state of player */ get playState(): MediaPlayState; /** * 播放器是否正在播放 */ /** @en * Whether the player is playing */ get isPlaying(): boolean; /** * 播放器是否暂停 */ /** @en * Whether the player is paused **/ get isPaused(): boolean; /** * 播放器是否停止 */ /** @en * Whether the player is stopped **/ get isStopped(): boolean; /** * 视频总时长, 只有 file 模式下有效 */ /** @en * The total duration of the video, only effective in file mode */ get duration(): number; /** * 当前时间戳 * @return 当前时间戳 */ /** @en * Get current time * @return The current time * */ get currentTime(): number; /** * 设置时间戳 * @param timestamp - 时间戳 */ /** @en * Set timestamp * @param timestamp - The timestamp * */ set currentTime(timestamp: number); private lastUpdateConfigTime?; private enabledLogUploadByConfig; constructor(options: IPlayerOptions); private reportSessionInit; private requestConfigDistribute; private enablePureHlsLogUpload; private bindMediaEvents; private bindVideoEvents; private unbindVideoEvents; private handleVideoEvents; private unbindMediaEvents; private bindEvents; private handleVisibilityChange; private handleNetworkStateChange; private unbindEvents; /** * 播放 */ /** @en * Play */ play(): Promise; private _play; /** * 暂停 * @param stop - 是否停止 */ /** @en * Pause * @param stop - Whether to stop **/ pause(stop?: boolean): Promise; private _pause; /** * 重试 */ /** @en * Retry **/ retry(): Promise; private _retry; /** * 切换播放链接 * @param url - 播放链接 */ /** @en * Switch the play url * @param url - The play url * */ switchURL(url: string): Promise; private _switchURL; /** * 切换播放源 * @param source - 播放源 */ /** @en * Switch the play source * @param source - The play source * */ switchMediaSource(source: MediaSource): Promise; private _switchMediaSource; /** * 镜像 * @param mirror - 是否镜像 */ /** @en * Mirror * @param mirror - Whether to mirror * */ mirror(mirror?: boolean): void; /** * 设置loop * @param loop - 是否loop, file 模式下有效 */ /** @en * Set loop * @param loop - Whether to loop, only effective in file mode * */ setLoop(loop: boolean): void; /** * 销毁 */ /** @en * Destroy * */ destroy(): Promise; /** * 设置音量 * @param volume - 音量 */ /** @en * Set volume * @param volume - The volume * */ setVolume(volume: number): void; /** * 获取音量 */ /** @en * Get volume * */ getVolume(): number; /** * 获取网络质量 */ /** @en * Get network quality * */ getNetworkQuality(): 0 | 1 | 6 | 2 | 3 | 4 | 5; private normalizeReportedIssue; private getReportedIssueHlsActionAllowListSource; private getReportedIssueHlsActionAllowList; private shouldTriggerHlsActionByReportedIssue; private reportUserIssue; private fallback; reportFallback(type?: string, reason?: string): void; /** * 业务侧主动上报问题。 * @param reason - 问题类型或原因,由业务侧自定义。 */ /** @en * Report an issue from business side. * @param reason - The issue type or reason defined by the business side. * */ reportIssue(reason: string): Promise; private startMonitorException; private stopMonitorException; /** * 获取统计信息 * @returns 统计信息 * - audio: 音频统计信息 * - video: 视频统计信息 * */ /** @en * Get statistics * @returns Statistics * - audio: Audio statistics * - video: Video statistics * */ getStats(): { audio: agora_rtc_sdk_ng_esm.RemoteAudioTrackStats; video: agora_rtc_sdk_ng_esm.RemoteVideoTrackStats; } | undefined; private replaceNewVideoElement; private setupTimeoutTrigger; private clearTimeoutTrigger; } /** * 设置 SDK 的日志输出级别。 * * 选择一个级别,你就可以看到在该级别及该级别以上所有级别的日志信息。 * @param level - SDK 日志输出级别。按照输出日志最全到最少排列: * - 0: DEBUG。输出所有的 SDK 日志。 * - 1: INFO。输出 INFO、WARNING 和 ERROR 级别的日志。 * - 2: WARNING。输出 WARNING 和 ERROR 级别的日志。 * - 3: ERROR。输出 ERROR 级别的日志。 * - 4: NONE。不输出日志。 * * 例如,如果你输入代码 `setLogLevel(1);`,就可以看到 INFO,WARNING 和 ERROR 级别的日志信息。 * @category Logger */ /** @en * Sets the output log level of the SDK. * * Choose a level to see the logs preceding that level. The log level follows the sequence of NONE, ERROR, WARNING, INFO, and DEBUG. * * For example, if you set the log level as `setLogLevel(1);`, then you can see logs in levels INFO, ERROR, and WARNING. * @param level The output log level. * - 0: DEBUG. Output all API logs. * - 1: INFO. Output logs of the INFO, WARNING and ERROR level. * - 2: WARNING. Output logs of the WARNING and ERROR level. * - 3: ERROR. Output logs of the ERROR level. * - 4: NONE. Do not output any log. * @category Logger */ declare function setLogLevel(level: number): void; /** * 开启日志上传。开启后 SDK 的日志会上传到声网的服务器。 * * 日志上传功能默认为关闭状态,如果你需要开启此功能,请确保在所有方法之前调用本方法。 * * > 如果没有成功加入频道,则服务器上无法查看日志信息。 * @category Logger */ /** @en * Enables log upload. * * Call this method to enable log upload to Agora’s server. * * The log-upload function is disabled by default. To enable this function, you must call this method before calling all the other methods. * * > If a user fails to join the channel, the log information (for that user) is unavailable on Agora's server. * @category Logger */ declare function enableLogUpload(): void; /** * 关闭日志上传。 * * 日志上传默认是关闭状态,如果你调用了开启日志上传({@link enableLogUpload}),可以通过本方法停止上传日志。 * @category Logger */ /** @en * Disables log upload. * * The log-upload function is disabled by default. If you have called {@link enableLogUpload}, then call this method when you need to stop uploading the log. * @category Logger */ declare function disableLogUpload(): void; /** * 可配置的参数列表 {@link setParameter} * @private */ /** @en * @private * The list of configurable parameters. {@link setParameter} */ declare const VARIABLE_PARAMS: { CDN_DOMAIN: string; CDN_BACKUP_DOMAIN: string; UPLOAD_LOG: boolean; REPORT_ISSUE_HLS_ACTION_ALLOW_LIST: string[] | string; ENABLE_RTC_H264_CHECK: boolean; NETWORK_POINTS: number; VIDEO_DECODE_POINTS: number; VIDEO_FROZEN_POINTS: number; VIDEO_FROZEN_THRESHOLD: number; VIDEO_FROZEN_RECOVERED_THRESHOLD: number; }; /** * 新增指定配置 {@link VARIABLE_PARAMS} * * @param key - 配置名称, 联系 Agora 服务人员获取 * @param value - 配置值 */ /** @en * Set the value of the specified configuration. {@link VARIABLE_PARAMS} * @param key - The name of the configuration. Contact Agora service personnel for details. * @param value - The value of the configuration. * @param _force - 是否强制使用配置分发缓存 */ declare function setParameter(key: keyof typeof VARIABLE_PARAMS, value: any, _force?: boolean): void; /** * 获取指定配置 * * @param key - 配置名称 */ /** @en * Get the value of the specified configuration. * @param key - The name of the configuration. */ declare function getParameter(key: keyof typeof VARIABLE_PARAMS): string | number | boolean | string[]; /** * 新增RTC指定配置 * * @param key - RTC配置名称 * @param value - 配置值 */ /** @en * Set the value of the specified rtc configuration. * @param key - The name of the rtc configuration. * @param value - The value of the configuration. */ declare function setRTCParameter(key: string, value: any): void; declare function getRTCParameter(key: string): any; /** * 启用新网络配置 */ /** @en * Enable the new network configuration. * @category Network */ declare function enableNewNetworkConfig(): void; type TModuleName = "HLS"; interface IModuel { name: TModuleName; create: (...args: any[]) => T; } declare function installModule(module: IModuel, isExternal?: boolean): void; export { LivePlayer, MediaPlayState, MediaSource, PlayerErrorCode, PlayerEvent, RtcEvent, RtcMediaState, RtcSourceEvent, RtcSourceState, RtcUserState, disableLogUpload, enableLogUpload, enableNewNetworkConfig, getParameter, getRTCParameter, installModule, isHlsSupported, isRtcSupported, setLogLevel, setParameter, setRTCParameter }; export type { IPlayerError, IPlayerErrorMeta, IPlayerOptions };