@agora-js/media 4.19.3 → 4.20.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/media.d.ts CHANGED
@@ -265,7 +265,7 @@ declare class AudioElementPlayCenter {
265
265
  * 监听页面事件,自动恢复音频播放
266
266
  */
267
267
  private autoResumeAudioElement;
268
- private autoResumeAfterInterruption;
268
+ autoResumeAfterInterruption: (force?: boolean) => void;
269
269
  private autoResumeAfterInterruptionOnIOS15_16;
270
270
  }
271
271
 
@@ -730,7 +730,7 @@ export declare class CameraVideoTrack extends LocalVideoTrack implements ICamera
730
730
  _enabled: boolean;
731
731
  _deviceName: string;
732
732
  get __className__(): string;
733
- constructor(track: MediaStreamTrack, config: CameraVideoTrackInitConfig, constraints: MediaTrackConstraints, scalabilityConfig?: SVCConfiguration, optimizationMode?: "motion" | "detail" | "balanced", trackId?: string);
733
+ constructor(track: MediaStreamTrack, config: CameraVideoTrackInitConfig, constraints: MediaTrackConstraints, scalabilityConfig?: SVCConfiguration, optimizationMode?: OptimizationMode | "balanced", trackId?: string);
734
734
  setDevice(deviceId: string | RequiredOnlyOneOf<{
735
735
  facingMode: VideoFacingModeEnum;
736
736
  deviceId: string;
@@ -832,7 +832,7 @@ export declare interface CameraVideoTrackInitConfig {
832
832
  *
833
833
  * > Note: This method is only supported on Chrome.
834
834
  */
835
- optimizationMode?: "motion" | "detail";
835
+ optimizationMode?: OptimizationMode;
836
836
  /**
837
837
  * @ignore
838
838
  * **自从**
@@ -1354,6 +1354,28 @@ declare function event_beauty_effect_overload(): void;
1354
1354
  */
1355
1355
  declare function event_first_frame_decoded(): void;
1356
1356
 
1357
+ /**
1358
+ * **自从**
1359
+ * <br>&emsp;&emsp;&emsp;*4.20.1*
1360
+ *
1361
+ * 从 H.264 视频流中解析出 SEI 数据时触发,此事件会返回 SEI 数据。
1362
+ *
1363
+ * @param sei Uint8Array 类型的 SEI 数据
1364
+ * @asMemberOf ILocalVideoTrack
1365
+ * @event
1366
+ */
1367
+ /** @en
1368
+ * **Since**
1369
+ * <br>&emsp;&emsp;&emsp;*4.20.1*
1370
+ *
1371
+ * Parsing SEI data from the H.264 video stream triggers this event, which returns the SEI data.
1372
+ *
1373
+ * @param sei SEI data in Uint8Array
1374
+ * @asMemberOf ILocalVideoTrack
1375
+ * @event
1376
+ */
1377
+ declare function event_sei_received(sei: Uint8Array): void;
1378
+
1357
1379
  /**
1358
1380
  * 当 [BufferSourceAudioTrack]{@link IBufferSourceAudioTrack} 的音频数据源处理状态变化时,会触发此事件。
1359
1381
  *
@@ -1408,6 +1430,8 @@ declare function event_source_state_change(currentState: AudioSourceState): void
1408
1430
  */
1409
1431
  declare function event_track_ended(): void;
1410
1432
 
1433
+ export declare function event_track_updated(track: MediaStreamTrack): void;
1434
+
1411
1435
  /**
1412
1436
  * 当前轨道的 `RTCRtpTransceiver` 实例更新回调。
1413
1437
  *
@@ -1533,6 +1557,20 @@ declare function event_video_element_visible_status(data?: CheckVideoVisibleResu
1533
1557
  */
1534
1558
  declare function event_video_element_visible_status_2(data?: CheckVideoVisibleResult): void;
1535
1559
 
1560
+ /**
1561
+ * 视频状态发生变化时触发。
1562
+ *
1563
+ * @event
1564
+ * @asMemberOf IRemoteTrack
1565
+ */
1566
+ /** @en
1567
+ * Occurs when the video state changes.
1568
+ *
1569
+ * @event
1570
+ * @asMemberOf IRemoteTrack
1571
+ */
1572
+ declare function event_video_state_changed(videoState: VideoState): void;
1573
+
1536
1574
  export declare interface ExtendedVideoFrameCallbackMetadata extends VideoFrameCallbackMetadata {
1537
1575
  timestamp: DOMHighResTimeStamp;
1538
1576
  }
@@ -1576,7 +1614,15 @@ export declare function getAudioContext(): AudioContext;
1576
1614
 
1577
1615
  export declare function getAudioEncoderConfiguration(profile: AudioEncoderConfigurationPreset | AudioEncoderConfiguration): AudioEncoderConfiguration;
1578
1616
 
1579
- export declare function getBitrateFromResAndFps(width: number, height: number, fps: number, bitrateAdapterType: "STANDARD_BITRATE" | "COMPATIABLE_BITRATE"): [number, number] | void;
1617
+ export declare function getBitrateConstrainRange(width: number, height: number, frameRate: number, bitrateMin?: number, bitrateMax?: number): DoubleRange;
1618
+
1619
+ /**
1620
+ * get bitrate, use STANDARD_BITRATE to make sure the response
1621
+ * @param width
1622
+ * @param height
1623
+ * @param fps
1624
+ */
1625
+ export declare function getBitrateFromResAndFps(width: number, height: number, fps: number): Required<DoubleRange>;
1580
1626
 
1581
1627
  export declare function getCompatibility(): AgoraRTCCompatibility;
1582
1628
 
@@ -1594,6 +1640,22 @@ export declare function getElectronScreenStreamByUserSelect(config: ScreenConstr
1594
1640
 
1595
1641
  export declare function getLocalStream(config: GetUserMediaConfig, id: string): Promise<MediaStream>;
1596
1642
 
1643
+ /**
1644
+ * 获取初始配置
1645
+ * 分辨率:track.getMediaStreamTrackSettings > 客户设置
1646
+ * 帧率: track.getMediaStreamTrackSettings > 客户设置
1647
+ * 码率: 客户设置 > 根据分辨率计算
1648
+ *
1649
+ * ⚠️:理论上不存在没有分辨率的情况,如果出现不足任何处理
1650
+ */
1651
+ export declare const getOriginSenderConfig: (track: LocalVideoTrack) => {
1652
+ frameRate: number;
1653
+ bitrateMax: number;
1654
+ bitrateMin: number;
1655
+ scaleResolutionDownBy: number;
1656
+ scale: number;
1657
+ };
1658
+
1597
1659
  export declare function getScalabilityConfiguration(profile: SVCConfiguration | SVCConfigurationPreset): SVCConfiguration;
1598
1660
 
1599
1661
  export declare function getScreenEncoderConfiguration(profile: VideoEncoderConfiguration | ScreenEncoderConfigurationPreset | string): VideoEncoderConfiguration;
@@ -2034,7 +2096,6 @@ export declare interface ILocalAudioTrack extends ILocalTrack {
2034
2096
  *
2035
2097
  * > 注意事项:
2036
2098
  * > - 自 v4.7.0 起,该方法不再生效。请改用 [IRemoteAudioTrack.setPlaybackDevice]{@link IRemoteAudioTrack.setPlaybackDevice}。
2037
- * > - 该方法只支持桌面端的 Chrome 浏览器,其他浏览器调用将会抛出 `NOT_SUPPORTED` 错误。
2038
2099
  *
2039
2100
  * 设置本地播放远端音频流的设备(扬声器)。
2040
2101
  *
@@ -2046,7 +2107,6 @@ export declare interface ILocalAudioTrack extends ILocalTrack {
2046
2107
  *
2047
2108
  * > Note:
2048
2109
  * > - As of v4.7.0, this method no longer takes effect. Use [IRemoteAudioTrack.setPlaybackDevice]{@link IRemoteAudioTrack.setPlaybackDevice} instead.
2049
- * > - This method supports Chrome on desktop devices only. Other browsers throw a '`NOT_SUPPORTED` error when calling this method.
2050
2110
  *
2051
2111
  * Sets the playback device (speaker) for the remote audio stream.
2052
2112
  *
@@ -2132,6 +2192,7 @@ export declare interface ILocalDataChannel extends IDataChannel {
2132
2192
  * `LocalTrack` is the basic interface for local tracks, providing public methods for [LocalAudioTrack]{@link ILocalAudioTrack} and [LocalVideoTrack]{@link ILocalVideoTrack}.
2133
2193
  */
2134
2194
  export declare interface ILocalTrack extends ITrack {
2195
+ on(event: "track-updated", listener: typeof event_track_updated): void;
2135
2196
  /**
2136
2197
  * @param event 事件名称。
2137
2198
  * @param listener 详见 [track-ended]{@link event_track_ended}。
@@ -2144,12 +2205,12 @@ export declare interface ILocalTrack extends ITrack {
2144
2205
  /**
2145
2206
  * 添加事件监听器。
2146
2207
  * @param event 事件名称。
2147
- * @param listener 详见 [transceiver-updated]{@link event_transceiver_updated}。
2208
+ * @param listener 详见 [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}。
2148
2209
  */
2149
2210
  /** @en
2150
2211
  * Adds an event listener.
2151
2212
  * @param event The event name.
2152
- * @param listener See [transceiver-updated]{@link event_transceiver_updated}.
2213
+ * @param listener See [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}.
2153
2214
  */
2154
2215
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated): void;
2155
2216
  /**
@@ -2241,7 +2302,7 @@ export declare interface ILocalTrack extends ITrack {
2241
2302
  *
2242
2303
  * If the track is published, a successful call of `setMuted(true)` triggers the [user-unpublished]{@link IAgoraRTCClient.event_user_unpublished} event on the remote client, and a successful call of `setMuted(false)` triggers the [user-published]{@link IAgoraRTCClient.event_user_published} event.
2243
2304
  *
2244
- * > - Calling `setMuted(true)` does not stop capturing audio or video and takes shorter time to take effect than [[setEnabled]]. For details, see [What are the differences between setEnabled and setMuted?](https://docs.agora.io/en/Interactive%20Broadcast/faq/differences_between_setenabled_and_setmuted).
2305
+ * > - Calling `setMuted(true)` does not stop capturing audio or video and takes shorter time to take effect than [[setEnabled]]. For details, see [What are the differences between setEnabled and setMuted?](https://docs.agora.io/en/interactive-live-streaming/develop/product-workflow?platform=web#setenabled-and-setmuted).
2245
2306
  * > - Do not call `setEnabled` and `setMuted` together.
2246
2307
  *
2247
2308
  * @param muted Whether to stop sending the media data of the track:
@@ -2285,6 +2346,7 @@ export declare interface ILocalTrack extends ITrack {
2285
2346
  * Inherited from `LocalVideoTrack`, [CameraVideoTrack]{@link ICameraVideoTrack} is an interface for the video captured by a local camera and adds several camera-related functions.
2286
2347
  */
2287
2348
  export declare interface ILocalVideoTrack extends ILocalTrack {
2349
+ on(event: "track-updated", listener: typeof event_track_updated): void;
2288
2350
  /** @internal */
2289
2351
  on(event: "beauty-effect-overload", listener: typeof event_beauty_effect_overload): void;
2290
2352
  /**
@@ -2308,16 +2370,16 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
2308
2370
  /**
2309
2371
  * 添加事件监听器。
2310
2372
  * @param event 事件名称。
2311
- * @param listener 详见 [transceiver-updated]{@link event_transceiver_updated}。
2373
+ * @param listener 详见 [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}。
2312
2374
  */
2313
2375
  /** @en
2314
2376
  * Adds an event listener.
2315
2377
  * @param event The event name.
2316
- * @param listener See [transceiver-updated]{@link event_transceiver_updated}.
2378
+ * @param listener See [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}.
2317
2379
  */
2318
2380
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated): void;
2319
2381
  /**
2320
- * 在页面上播放本地视频轨道。
2382
+ * 在页面上播放远端视频轨道。
2321
2383
  *
2322
2384
  * @param element 指定一个 DOM 元素,SDK 将在这个元素下创建 `<video>` 元素播放视频轨道,支持 2 种类型:
2323
2385
  * - `string`: 指定该 DOM 元素的 ID 值。
@@ -2325,7 +2387,7 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
2325
2387
  * @param config 设置播放参数(镜像/显示模式)。详见 [[VideoPlayerConfig]]。对于本地视频轨道,镜像模式默认开启。
2326
2388
  */
2327
2389
  /** @en
2328
- * Plays a local video track on the web page.
2390
+ * Plays a remote video track on the web page.
2329
2391
  *
2330
2392
  * @param element Specifies a DOM element. The SDK will create a `<video>` element under the specified DOM element to play the video track. You can specify a DOM element in either of the following ways:
2331
2393
  * - `string`: Specify the ID of the DOM element.
@@ -2641,6 +2703,17 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
2641
2703
  * @param config The video encoder configurations. You can pass either [[VideoEncoderConfigurationPreset]] or a customized [[VideoEncoderConfiguration]] object.
2642
2704
  */
2643
2705
  setEncoderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset): Promise<void>;
2706
+ /**
2707
+ * 在 H.264 视频流中添加 SEI 数据。
2708
+ *
2709
+ * @param sei SEI 数据。
2710
+ */
2711
+ /** @en
2712
+ * Add the SEI data to the H.264 video stream.
2713
+ *
2714
+ * @param config SEI data.
2715
+ */
2716
+ sendSeiData(sei: Uint8Array): void;
2644
2717
  }
2645
2718
 
2646
2719
  export declare interface ImageTypedData {
@@ -2710,6 +2783,18 @@ export declare interface IMicrophoneAudioTrack extends ILocalAudioTrack {
2710
2783
  setEnabled(enabled: boolean): Promise<void>;
2711
2784
  }
2712
2785
 
2786
+ export declare function interceptLocalAudioFrame(sender: RTCRtpSender): Promise<void>;
2787
+
2788
+ export declare function interceptLocalVideoFrame(sender: RTCRtpSender, localVideoTrack: LocalVideoTrack): Promise<void>;
2789
+
2790
+ export declare function interceptRemoteAudioFrame(receiver: RTCRtpReceiver): Promise<void>;
2791
+
2792
+ export declare function interceptRemoteVideoFrame(receiver: RTCRtpReceiver, options?: InterceptVideoFrameOptions): Promise<void>;
2793
+
2794
+ declare interface InterceptVideoFrameOptions {
2795
+ onSei?: (sei: Uint8Array) => void;
2796
+ }
2797
+
2713
2798
  /**
2714
2799
  * 远端音频轨道,调用 [subscribe]{@link IAgoraRTCClient.subscribe} 后通过 [AgoraRTCRemoteUser.audioTrack]{@link IAgoraRTCRemoteUser.audioTrack} 对象获取
2715
2800
  */
@@ -2749,7 +2834,7 @@ export declare interface IRemoteAudioTrack extends IRemoteTrack {
2749
2834
  *
2750
2835
  * 设置音频播放设备,比如扬声器。
2751
2836
  *
2752
- * > 该方法只支持桌面端的 Chrome 浏览器,其他浏览器调用将会抛出 `NOT_SUPPORTED` 错误。
2837
+ * > 该方法只支持桌面端的 Chrome 和 Edge 浏览器,其他浏览器调用将会抛出 `NOT_SUPPORTED` 错误。
2753
2838
  * @param deviceId 设备 ID,可以通过 [[getPlaybackDevices]] 方法获取。
2754
2839
  */
2755
2840
  /** @en
@@ -2758,7 +2843,7 @@ export declare interface IRemoteAudioTrack extends IRemoteTrack {
2758
2843
  *
2759
2844
  * Sets the audio playback device, for example, the speaker.
2760
2845
  *
2761
- * > This method supports Chrome on desktop devices only. Other browsers throw a `NOT_SUPPORTED` error when calling this method.
2846
+ * > This method supports Chrome and Edge on desktop devices only. Other browsers throw a `NOT_SUPPORTED` error when calling this method.
2762
2847
  * @param deviceId Device ID, which can be retrieved by calling [[getPlaybackDevices]].
2763
2848
  */
2764
2849
  setPlaybackDevice(deviceId: string): Promise<void>;
@@ -2904,6 +2989,7 @@ export declare interface IRemoteDataChannel extends IDataChannel {
2904
2989
  * `RemoteTrack` is the basic interface for remote tracks, providing public methods for [RemoteAudioTrack]{@link IRemoteAudioTrack} and [RemoteVideoTrack]{@link IRemoteVideoTrack}.
2905
2990
  */
2906
2991
  export declare interface IRemoteTrack extends ITrack {
2992
+ on(event: "track-updated", listener: typeof event_track_updated): void;
2907
2993
  /**
2908
2994
  * @param event 事件名称。
2909
2995
  * @param listener 详见 [first-frame-decoded]{@link event_first_frame_decoded}。
@@ -2916,12 +3002,12 @@ export declare interface IRemoteTrack extends ITrack {
2916
3002
  /**
2917
3003
  * 添加事件监听器。
2918
3004
  * @param event 事件名称。
2919
- * @param listener 详见 [transceiver-updated-2]{@link event_transceiver_updated_2}。
3005
+ * @param listener 详见 [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}。
2920
3006
  */
2921
3007
  /** @en
2922
3008
  * Adds an event listener.
2923
3009
  * @param event The event name.
2924
- * @param listener See [transceiver-updated-2]{@link event_transceiver_updated_2}.
3010
+ * @param listener See [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}.
2925
3011
  */
2926
3012
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated_2): void;
2927
3013
  /**
@@ -2963,6 +3049,16 @@ export declare interface IRemoteTrack extends ITrack {
2963
3049
  * You can get create a remote video track by the [AgoraRTCRemoteUser.videoTrack]{@link IAgoraRTCRemoteUser.videoTrack} object after calling [subscribe]{@link IAgoraRTCClient.subscribe}.
2964
3050
  */
2965
3051
  export declare interface IRemoteVideoTrack extends IRemoteTrack {
3052
+ /**
3053
+ * @param event 事件名称。
3054
+ * @param listener 详见 [video-state-changed]{@link event_video_state_changed}。
3055
+ */
3056
+ /** @en
3057
+ * @param event The event name.
3058
+ * @param listener See [video-state-changed]{@link event_video_state_changed}.
3059
+ */
3060
+ on(event: "track-updated", listener: typeof event_track_updated): void;
3061
+ on(event: "video-state-changed", listener: typeof event_video_state_changed): void;
2966
3062
  /**
2967
3063
  * @param event 事件名称。
2968
3064
  * @param listener 详见 [first-frame-decoded]{@link event_first_frame_decoded}。
@@ -2984,14 +3080,25 @@ export declare interface IRemoteVideoTrack extends IRemoteTrack {
2984
3080
  /**
2985
3081
  * 添加事件监听器。
2986
3082
  * @param event 事件名称。
2987
- * @param listener 详见 [transceiver-updated-2]{@link event_transceiver_updated_2}。
3083
+ * @param listener 详见 [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}。
2988
3084
  */
2989
3085
  /** @en
2990
3086
  * Adds an event listener.
2991
3087
  * @param event The event name.
2992
- * @param listener See [transceiver-updated-2]{@link event_transceiver_updated_2}.
3088
+ * @param listener See [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}.
2993
3089
  */
2994
3090
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated_2): void;
3091
+ /**
3092
+ * 添加事件监听器。
3093
+ * @param event 事件名称。
3094
+ * @param listener 详见 [ILocalTrack.sei-received]{@link event_sei_received}。
3095
+ */
3096
+ /** @en
3097
+ * Adds an event listener.
3098
+ * @param event The event name.
3099
+ * @param listener See [ILocalTrack.sei-received]{@link event_sei_received}.
3100
+ */
3101
+ on(event: "sei-received", listener: typeof event_sei_received): void;
2995
3102
  /**
2996
3103
  * 获取远端视频轨道相关信息。
2997
3104
  *
@@ -3194,8 +3301,8 @@ export declare interface ITrack extends EventEmitter {
3194
3301
  * 该方法目前主要用于视频流的[端到端加密(Beta)](https://doc.shengwang.cn/doc/rtc/javascript/advanced-features/e2e-encryption)。
3195
3302
  *
3196
3303
  * > 如果 SDK 发生断线重连,当前轨道对应的 `RTCRtpTransceiver` 实例可能会发生变化。你可以通过以下回调来获取新的 `RTCRtpTransceiver` 实例:
3197
- * > - 本地轨道:["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
3198
- * > - 远端轨道:["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
3304
+ * > - 本地轨道:[ILocalTrack.transceiver-updated]{@link event_transceiver_updated}
3305
+ * > - 远端轨道:[IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}
3199
3306
  *
3200
3307
  * @param type 视频流的类型。详见 {@link StreamType}。
3201
3308
  * @returns 当前轨道的 `RTCRtpTransceiver` 实例。
@@ -3206,8 +3313,8 @@ export declare interface ITrack extends EventEmitter {
3206
3313
  * This method is currently mainly used for end-to-end encryption of video streams (Beta).
3207
3314
  *
3208
3315
  * > If the SDK experiences a reconnection, the `RTCRtpTransceiver` instance corresponding to the current track might change. You can obtain the new `RTCRtpTransceiver` instance through the following callbacks:
3209
- * > - For a local track: ["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
3210
- * > - For a remote track: ["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
3316
+ * > - For a local track: [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}
3317
+ * > - For a remote track: [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}
3211
3318
  *
3212
3319
  * @param type The type of the video stream. See {@link StreamType}.
3213
3320
  * @returns The [RTCRtpTransceiver](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver) instance of the current track.
@@ -3241,23 +3348,24 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
3241
3348
  readonly trackMediaType: "audio" | "video";
3242
3349
  _encoderConfig?: AudioEncoderConfiguration;
3243
3350
  _trackSource: AudioTrackSource | FakeTrackSource;
3244
- get _source(): AudioTrackSource | FakeTrackSource;
3351
+ /**
3352
+ * @description This method is used to init WebAudio, if you're sure you don't want to use WebAudio, call _trackSource
3353
+ */
3354
+ get _source(): AudioTrackSource;
3245
3355
  set _source(source: AudioTrackSource | FakeTrackSource);
3246
3356
  _enabled: boolean;
3247
3357
  private _volume;
3248
3358
  _useAudioElement: boolean;
3249
3359
  _bypassWebAudio: boolean;
3250
3360
  protected processor?: IAudioProcessor;
3251
- protected _processorContext: AudioProcessorContext;
3361
+ protected _processorContext: AudioProcessorContext | undefined;
3252
3362
  protected get processorContext(): AudioProcessorContext;
3253
- protected set processorContext(ctx: AudioProcessorContext);
3254
- _processorDestination: AudioProcessorDestination;
3363
+ _processorDestination: AudioProcessorDestination | undefined;
3255
3364
  get processorDestination(): AudioProcessorDestination;
3256
- set processorDestination(des: AudioProcessorDestination);
3257
3365
  protected _getOriginVolumeLevel: boolean;
3258
3366
  get isPlaying(): boolean;
3259
3367
  get __className__(): string;
3260
- constructor(track: MediaStreamTrack, encoderConfig?: AudioEncoderConfiguration, trackId?: string, getOriginVolumeLevel?: boolean, deferWebAudio?: boolean);
3368
+ constructor(track: MediaStreamTrack, encoderConfig?: AudioEncoderConfiguration, trackId?: string, getOriginVolumeLevel?: boolean);
3261
3369
  setVolume(volume: number): void;
3262
3370
  getVolumeLevel(): number;
3263
3371
  setPlaybackDevice(deviceId: string): Promise<void>;
@@ -3276,7 +3384,10 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
3276
3384
  unpipe(): void;
3277
3385
  private bindProcessorDestinationEvents;
3278
3386
  private unbindProcessorDestinationEvents;
3279
- private unbindProcessorContextEvents;
3387
+ protected bindProcessorContextEvents(processorContext: AudioProcessorContext): void;
3388
+ protected unbindProcessorContextEvents(processorContext: AudioProcessorContext): void;
3389
+ private initWebAudio;
3390
+ private initProcessor;
3280
3391
  }
3281
3392
 
3282
3393
  /**
@@ -3395,9 +3506,9 @@ export declare abstract class LocalTrack extends Track implements ILocalTrack {
3395
3506
  _isClosed: boolean;
3396
3507
  protected _enabledMutex: PromiseMutex;
3397
3508
  protected processor?: IBaseProcessor;
3398
- protected abstract _processorContext: IProcessorContext;
3399
- protected get processorContext(): IProcessorContext;
3400
- protected set processorContext(ctx: IProcessorContext);
3509
+ protected abstract _processorContext: IProcessorContext | undefined;
3510
+ protected get processorContext(): IProcessorContext | undefined;
3511
+ abstract processorDestination: IBaseProcessor;
3401
3512
  constructor(track: MediaStreamTrack, trackId?: string);
3402
3513
  abstract getStats(): LocalVideoTrackStats | LocalAudioTrackStats;
3403
3514
  abstract setMuted(enabled: boolean): Promise<void>;
@@ -3435,9 +3546,21 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
3435
3546
  protected _statsTimer: number | null;
3436
3547
  private _previousVideoVisibleStatus;
3437
3548
  private _clearPreviousVideoVisibleStatus;
3438
- _encoderConfig?: Partial<VideoEncoderConfiguration>;
3549
+ _encoderConfig?: Partial<VideoEncoderConfiguration & {
3550
+ scale: number;
3551
+ }>;
3439
3552
  _scalabilityMode?: SVCConfiguration;
3440
- _optimizationMode?: "motion" | "detail" | "balanced";
3553
+ _optimizationMode?: OptimizationMode | "balanced";
3554
+ _qualityLimitationReason?: QualityLimitationReason;
3555
+ /**
3556
+ * Adaptation origin config
3557
+ */
3558
+ private _originalSenderConfig?;
3559
+ _adaptationConfig?: VideoSenderConfig;
3560
+ /**
3561
+ * 轮询监听stats
3562
+ */
3563
+ private _adaptationTimer;
3441
3564
  _videoHeight?: number;
3442
3565
  _videoWidth?: number;
3443
3566
  _forceBitrateLimit?: {
@@ -3451,13 +3574,13 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
3451
3574
  protected get processorContext(): VideoProcessorContext;
3452
3575
  protected set processorContext(ctx: VideoProcessorContext);
3453
3576
  get __className__(): string;
3454
- constructor(track: MediaStreamTrack, encoderConfig?: Partial<VideoEncoderConfiguration>, scalabilityConfig?: SVCConfiguration, optimizationMode?: "motion" | "detail" | "balanced", trackId?: string, hints?: TrackHint[]);
3577
+ constructor(track: MediaStreamTrack, encoderConfig?: Partial<VideoEncoderConfiguration>, scalabilityConfig?: SVCConfiguration, optimizationMode?: OptimizationMode | "balanced", trackId?: string, hints?: TrackHint[]);
3455
3578
  play(element: HTMLElement | HTMLVideoElement | string, config?: VideoPlayerConfig): void;
3456
3579
  stop(): void;
3457
3580
  setEnabled(enabled: boolean, skipChangeState?: boolean): Promise<void>;
3458
3581
  setMuted(muted: boolean): Promise<void>;
3459
3582
  setEncoderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset, doNotRenegoation?: boolean): Promise<void>;
3460
- getStats(): LocalVideoTrackStats;
3583
+ getStats(isExternal?: boolean): LocalVideoTrackStats;
3461
3584
  setBeautyEffect(enabled: boolean, options?: BeautyEffectOptions): Promise<void>;
3462
3585
  getCurrentFrameData(): ImageData;
3463
3586
  getCurrentFrameImage(imageType: string, quality?: number): Promise<ImageTypedData>;
@@ -3465,7 +3588,10 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
3465
3588
  max_bitrate: number;
3466
3589
  min_bitrate: number;
3467
3590
  }): Promise<void>;
3468
- setOptimizationMode(mode: "motion" | "detail" | "balanced"): Promise<void>;
3591
+ setOptimizationMode(mode: OptimizationMode | "balanced"): Promise<void>;
3592
+ protected applyAdaptation(config: VideoSenderConfig): Promise<void>;
3593
+ startVideoStreamAdapter(): void;
3594
+ protected updateAdapterConfig(): void;
3469
3595
  setScalabiltyMode(mode: SVCConfiguration): void;
3470
3596
  updateMediaStreamTrackResolution(): void;
3471
3597
  protected _updatePlayerSource(): void;
@@ -3480,6 +3606,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
3480
3606
  clone(config?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset, cloneTrack?: boolean): LocalVideoTrack;
3481
3607
  replaceTrack(track: MediaStreamTrack, stopOldTrack: boolean): Promise<void>;
3482
3608
  startMonitorStats(): void;
3609
+ sendSeiData(sei: Uint8Array): never;
3483
3610
  private bindProcessorDestinationEvents;
3484
3611
  private unbindProcessorDestinationEvents;
3485
3612
  private unbindProcessorContextEvents;
@@ -3497,7 +3624,6 @@ export declare interface LocalVideoTrackStats {
3497
3624
  * 视频编码格式。
3498
3625
  *
3499
3626
  * - `"H264"`: 视频编码格式为 H.264。
3500
- * - `"H265"`: 视频编码格式为 H.265。
3501
3627
  * - `"VP8"`: 视频编码格式为 VP8。
3502
3628
  * - `"VP9"`: 视频编码格式为 VP9。
3503
3629
  * - `"AV1X"`: 预留参数,暂不支持。
@@ -3509,7 +3635,6 @@ export declare interface LocalVideoTrackStats {
3509
3635
  * The video codec.
3510
3636
  *
3511
3637
  * - `"H264"`: The video codec is H.264.
3512
- * - `"H265"`: The video codec is H.265.
3513
3638
  * - `"VP8"`: The video codec is VP8.
3514
3639
  * - `"VP9"`: The video codec is VP9.
3515
3640
  * - `"AV1X"`: Reserved for future use.
@@ -3753,7 +3878,8 @@ export declare class MicrophoneAudioTrack extends LocalAudioTrack implements IMi
3753
3878
  close(): void;
3754
3879
  protected onTrackEnded(): void;
3755
3880
  renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
3756
- private bindProcessorContextEvents;
3881
+ protected bindProcessorContextEvents(processorContext: AudioProcessorContext): void;
3882
+ protected unbindProcessorContextEvents(processorContext: AudioProcessorContext): void;
3757
3883
  }
3758
3884
 
3759
3885
  /**
@@ -3855,6 +3981,8 @@ export declare class MixingAudioTrack extends LocalAudioTrack {
3855
3981
  _updateRtpTransceiver(transceiver: RTCRtpTransceiver): void;
3856
3982
  }
3857
3983
 
3984
+ export declare type OptimizationMode = "motion" | "detail";
3985
+
3858
3986
  /**
3859
3987
  * @internal
3860
3988
  */
@@ -3887,109 +4015,11 @@ export declare interface ProcessorUsageStats {
3887
4015
  totalTs: number;
3888
4016
  }
3889
4017
 
3890
- export declare interface PublishAudioUploadStats {
3891
- id: string;
3892
- timestamp: string;
3893
- mediaType: "audio";
3894
- type: "ssrc";
3895
- ssrc: string;
3896
- /** audioInputLevel */
3897
- A_ail?: string;
3898
- /** audioPCMInputLevel */
3899
- A_apil?: string;
3900
- /** Audio Send Track is Disabled */
3901
- A_astd?: string;
3902
- /** googEchoCancellationReturnLoss */
3903
- A_ecrl?: string;
3904
- /** googEchoCancellationReturnLossEnhancement */
3905
- A_ecrle?: string;
3906
- /** 发流字节数目,目前仅在p2p下上报 */
3907
- bytesSent?: string;
3908
- /** 发流丢包数目,目前仅在p2p下上报 */
3909
- packetsLost?: string;
3910
- /** 发包数目,目前仅在p2p下上报 */
3911
- packetsSent?: string;
3912
- }
3913
-
3914
- export declare interface PublishBandwidthUploadStats {
3915
- id: "bweforvideo";
3916
- type: "VideoBwe";
3917
- timestamp: string;
3918
- /** ActualEncBitrate */
3919
- A_aeb?: string;
3920
- /** AvailableSendBandwidth */
3921
- A_asb?: string;
3922
- /** RetransmitBitrate */
3923
- A_rb?: string;
3924
- /** AvailableReceiveBandwidth */
3925
- A_arb?: string;
3926
- /** TargetEncBitrate */
3927
- A_teb?: string;
3928
- /** BucketDelay */
3929
- A_bd?: string;
3930
- /** TransmitBitrate */
3931
- A_tb?: string;
3932
- }
3933
-
3934
- export declare interface PublishVideoInputStats {
3935
- id: string;
3936
- timestamp: string;
3937
- mediaType: "video";
3938
- type: "ssrc";
3939
- ssrc: string;
3940
- /** FrameHeightInput */
3941
- A_fhi?: string;
3942
- /** FrameRateInput */
3943
- A_fri?: string;
3944
- /** FrameWidthInput */
3945
- A_fwi?: string;
3946
- }
3947
-
3948
- export declare interface PublishVideoRelatedStats {
3949
- mediaType: "video";
3950
- isVideoMute: boolean;
3951
- frameRateInput?: string;
3952
- frameRateSent?: string;
3953
- googRtt: string;
3954
- qpSumPerFrame?: string;
3955
- }
3956
-
3957
- export declare interface PublishVideoUploadStats {
3958
- id: string;
3959
- timestamp: string;
3960
- mediaType: "video";
3961
- type: "ssrc";
3962
- ssrc: string;
3963
- /** FrameHeightSent */
3964
- A_fhs?: string;
3965
- /** FrameRateSent */
3966
- A_frs?: string;
3967
- /** FrameWidthSent */
3968
- A_fws?: string;
3969
- /** NacksReceived */
3970
- A_nr?: string;
3971
- /** Video Send Track is Disabled */
3972
- A_vstd?: string;
3973
- /** googAvgEncodeMs */
3974
- A_aem?: string;
3975
- /** Local Video Player Status */
3976
- A_lvps?: string;
3977
- /**
3978
- * googAdaptationChanges
3979
- *
3980
- * 这里实际是记录发生自动回退的次数,但是目前 spec stats 还没有这个值,只能拿到回退的原因。所以修改一下上报格式:
3981
- * - “0” 没有发生回退
3982
- * - “1” 因为 cpu 发生回退
3983
- * - “2” 因为 bandwidth 发生回退
3984
- * - “3” 因为其他原因发生回退
3985
- */
3986
- A_ac?: string;
3987
- /** 发流字节数目,目前仅在p2p下上报 */
3988
- bytesSent?: string;
3989
- /** 发流丢包数目,目前仅在p2p下上报 */
3990
- packetsLost?: string;
3991
- /** 发包数目,目前仅在p2p下上报 */
3992
- packetsSent?: string;
4018
+ declare enum QualityLimitationReason {
4019
+ BANDWIDTH = "bandwidth",
4020
+ CPU = "cpu",
4021
+ NONE = "none",
4022
+ OTHER = "other"
3993
4023
  }
3994
4024
 
3995
4025
  export declare class RemoteAudioTrack extends RemoteTrack implements IRemoteAudioTrack {
@@ -4179,7 +4209,7 @@ export declare class RemoteDataChannel extends DataChannel implements IRemoteDat
4179
4209
  }
4180
4210
 
4181
4211
  /**
4182
- * 远端视频流的回退类型,用于 [setStreamFallbackOption]{@link IAgoraRTCClient.setStreamFallbackOption}。
4212
+ * 媒体流的回退策略选项,用于 [setStreamFallbackOption]{@link IAgoraRTCClient.setStreamFallbackOption}。
4183
4213
  * @public
4184
4214
  */
4185
4215
  /** @en
@@ -4192,9 +4222,9 @@ export declare enum RemoteStreamFallbackType {
4192
4222
  * 0: Disable the fallback.
4193
4223
  */
4194
4224
  DISABLE = 0,
4195
- /** 1:(默认)网络条件较差的情况下,SDK 将自动订阅视频小流。 */
4225
+ /** 1: 在网络条件较差的情况下,自动订阅视频小流。 */
4196
4226
  /** @en
4197
- * 1: (Default) Automatically subscribe to the low-video stream under poor network conditions. */
4227
+ * 1: Automatically subscribe to the low-video stream under poor network conditions. */
4198
4228
  LOW_STREAM = 1,
4199
4229
  /** 2: 网络较弱时,先尝试订阅视频小流。如果网络环境无法显示视频,则再回退到订阅纯音频流。 */
4200
4230
  /** @en
@@ -4243,7 +4273,8 @@ export declare abstract class RemoteTrack extends Track implements IRemoteTrack
4243
4273
 
4244
4274
  export declare enum RemoteTrackEvents {
4245
4275
  FIRST_FRAME_DECODED = "first-frame-decoded",
4246
- VIDEO_ELEMENT_VISIBLE_STATUS = "video-element-visible-status"
4276
+ VIDEO_ELEMENT_VISIBLE_STATUS = "video-element-visible-status",
4277
+ VIDEO_STATE_CHANGED = "video-state-changed"
4247
4278
  }
4248
4279
 
4249
4280
  export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVideoTrack {
@@ -4271,6 +4302,7 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
4271
4302
  private bindProcessorDestinationEvents;
4272
4303
  private unbindProcessorDestinationEvents;
4273
4304
  _destroy(): void;
4305
+ _onSei(sei: Uint8Array): void;
4274
4306
  }
4275
4307
 
4276
4308
  /**
@@ -4296,7 +4328,6 @@ export declare interface RemoteVideoTrackStats {
4296
4328
  * 视频编码格式。
4297
4329
  *
4298
4330
  * - `"H264"`: 视频编码格式为 H.264。
4299
- * - `"H265"`: 视频编码格式为 H.265。
4300
4331
  * - `"VP8"`: 视频编码格式为 VP8。
4301
4332
  * - `"VP9"`: 视频编码格式为 VP9。
4302
4333
  * - `"AV1X"`: 视频编码格式为 AV1,在 Chrome M96 版本之前。
@@ -4308,7 +4339,6 @@ export declare interface RemoteVideoTrackStats {
4308
4339
  * The video codec.
4309
4340
  *
4310
4341
  * - `"H264"`: The video codec is H.264.
4311
- * - `"H265"`: The video codec is H.265.
4312
4342
  * - `"VP8"`: The video codec is VP8.
4313
4343
  * - `"VP9"`: The video codec is VP9.
4314
4344
  * - `"AV1X"`: Reserved for future use.
@@ -4775,6 +4805,12 @@ export declare interface ScreenVideoTrackInitConfig {
4775
4805
  systemAudio?: "include" | "exclude";
4776
4806
  }
4777
4807
 
4808
+ export declare type SenderConfig = {
4809
+ bitrateMax: number;
4810
+ bitrateMin: number;
4811
+ scaleResolutionDownBy: number;
4812
+ };
4813
+
4778
4814
  /**
4779
4815
  * 将节点输入的 AudioBuffer 返回,将节点输出的 AudioBuffer 设置成 silence
4780
4816
  */
@@ -4800,100 +4836,6 @@ export declare enum StreamType {
4800
4836
  LOW_STREAM = 1
4801
4837
  }
4802
4838
 
4803
- export declare interface SubscribeAudioRelatedStats {
4804
- mediaType: "audio";
4805
- peerId: UID;
4806
- isAudioMute: boolean;
4807
- frameDropped?: string;
4808
- frameReceived?: string;
4809
- googJitterReceived: string;
4810
- bytesReceived: string;
4811
- packetsReceived: string;
4812
- isFreeze: boolean;
4813
- packetsLost: string;
4814
- }
4815
-
4816
- export declare interface SubscribeAudioUploadStats {
4817
- id: string;
4818
- timestamp: string;
4819
- mediaType: "audio";
4820
- type: "ssrc";
4821
- ssrc: string;
4822
- bytesReceived?: string;
4823
- packetsLost?: string;
4824
- packetsReceived?: string;
4825
- /** audioOutputLevel */
4826
- A_aol?: string;
4827
- /** audioPCMOutputLevel */
4828
- A_apol?: string;
4829
- /** JitterReceived */
4830
- A_jr?: string;
4831
- /** JitterBufferMs */
4832
- A_jbm?: string;
4833
- /** CurrentDelayMs(JitterBufferMs) */
4834
- A_cdm?: string;
4835
- /** Audio Recv Track is Disabled */
4836
- A_artd?: string;
4837
- /** Remote Audio Player Status */
4838
- A_raps?: string;
4839
- /**Audio concealed samples*/
4840
- A_cs?: string;
4841
- }
4842
-
4843
- export declare interface SubscribeVideoRelatedStats {
4844
- mediaType: "video";
4845
- peerId: UID;
4846
- isVideoMute: boolean;
4847
- frameRateReceived?: string;
4848
- frameRateDecoded?: string;
4849
- bytesReceived: string;
4850
- packetsReceived: string;
4851
- isFreeze: boolean;
4852
- packetsLost: string;
4853
- qpSumPerFrame?: string;
4854
- }
4855
-
4856
- export declare interface SubscribeVideoUploadStats {
4857
- id: string;
4858
- timestamp: string;
4859
- mediaType: "video";
4860
- type: "ssrc";
4861
- ssrc: string;
4862
- bytesReceived?: string;
4863
- packetsLost?: string;
4864
- packetsReceived?: string;
4865
- /** FrameRateReceived */
4866
- A_frr?: string;
4867
- /** FrameRateDecoded */
4868
- A_frd?: string;
4869
- /** FrameRateOutput */
4870
- A_fro?: string;
4871
- /** JitterBufferMs */
4872
- A_jbm?: string;
4873
- /** CurrentDelayMs(JitterBufferMs) */
4874
- A_cdm?: string;
4875
- /** NacksSent */
4876
- A_ns?: string;
4877
- /** PlisSent */
4878
- A_ps?: string;
4879
- /** FirsSent */
4880
- A_fs?: string;
4881
- /** Video Recv Track is Disabled */
4882
- A_vrtd?: string;
4883
- /** Video Recv Freeze Time */
4884
- A_vrft?: string;
4885
- /** Remote Video Player Status */
4886
- A_rvps?: string;
4887
- /** Frame height received */
4888
- A_fhr?: string;
4889
- /** Frame width received */
4890
- A_fwr?: string;
4891
- /** Video Recv Render Freeze Time */
4892
- A_vrrft?: string;
4893
- /** Video Recv Inter Frame Delay in ms standard deviation */
4894
- A_ifdsd?: string;
4895
- }
4896
-
4897
4839
  export declare const SUPPORT_720P_AUTO_CONFIG_LIST: Required<{
4898
4840
  scaleResolutionDownBy: number;
4899
4841
  width: number;
@@ -5007,7 +4949,9 @@ export declare abstract class Track extends EventEmitter implements ITrack {
5007
4949
  /** 原始的 Track 对象,来自于采集/用户传入/订阅返回 */
5008
4950
  _originMediaStreamTrack: MediaStreamTrack;
5009
4951
  /** 用于播放和发布的 Track 对象,可能被各种模块修改,一般来说等于 `_originMediaStreamTrack` */
5010
- _mediaStreamTrack: MediaStreamTrack;
4952
+ mediaStreamTrack: MediaStreamTrack;
4953
+ set _mediaStreamTrack(track: MediaStreamTrack);
4954
+ get _mediaStreamTrack(): MediaStreamTrack;
5011
4955
  /** 提供给外部插件以同步数据 */
5012
4956
  _external: ExternalMethods;
5013
4957
  constructor(track: MediaStreamTrack, trackId?: string);
@@ -5023,7 +4967,10 @@ export declare abstract class Track extends EventEmitter implements ITrack {
5023
4967
  }
5024
4968
 
5025
4969
  export declare enum TrackEvents {
5026
- TRANSCEIVER_UPDATED = "transceiver-updated"
4970
+ TRANSCEIVER_UPDATED = "transceiver-updated",
4971
+ SEI_TO_SEND = "sei-to-send",
4972
+ SEI_RECEIVED = "sei-received",
4973
+ TRACK_UPDATED = "track-updated"
5027
4974
  }
5028
4975
 
5029
4976
  /**
@@ -5041,6 +4988,7 @@ export declare enum TrackHint {
5041
4988
  export declare enum TrackInternalEvent {
5042
4989
  NEED_RENEGOTIATE = "@need_renegotiate",
5043
4990
  NEED_REPLACE_TRACK = "@need_replace_track",
4991
+ NEED_REPLACE_MIXING_TRACK = "@need_replace_mixing_track",
5044
4992
  NEED_CLOSE = "@need_close",
5045
4993
  NEED_ENABLE_TRACK = "@need_enable_track",
5046
4994
  NEED_DISABLE_TRACK = "@need_disable_track",
@@ -5051,15 +4999,11 @@ export declare enum TrackInternalEvent {
5051
4999
  GET_LOW_VIDEO_TRACK = "@get_low_video_track",
5052
5000
  NEED_RESET_REMOTE_SDP = "@need_reset_remote_sdp",
5053
5001
  NEED_UPDATE_VIDEO_ENCODER = "@need_update_video_encoder",
5002
+ NEED_UPDATE_VIDEO_SEND_PARAMETERS = "@need_update_video_send_parameters",
5054
5003
  NEED_MUTE_TRACK = "@need_mute_track",
5055
5004
  NEED_UNMUTE_TRACK = "@need_unmute_track"
5056
5005
  }
5057
5006
 
5058
- export declare interface TransportUploadStats {
5059
- connectionType: number;
5060
- googRtt?: number;
5061
- }
5062
-
5063
5007
  export declare function updateAgoraRTCCompatibility(): void;
5064
5008
 
5065
5009
  export declare interface UsageRegistry {
@@ -5277,6 +5221,7 @@ declare class VideoPlayer {
5277
5221
  trackId: string;
5278
5222
  config: PlayerConfig;
5279
5223
  onFirstVideoFrameDecoded?: () => void;
5224
+ onVideoStateChanged?: (state: VideoState) => void;
5280
5225
  freezeTimeCounterList: number[];
5281
5226
  renderFreezeAccTime: number;
5282
5227
  isKeepLastFrame: boolean;
@@ -5292,7 +5237,11 @@ declare class VideoPlayer {
5292
5237
  protected cacheVideoElement?: HTMLVideoElement;
5293
5238
  get videoElementStatus(): MediaElementStatus;
5294
5239
  set videoElementStatus(status: MediaElementStatus);
5240
+ get videoState(): VideoState;
5241
+ set videoState(state: VideoState);
5242
+ private _videoState;
5295
5243
  private videoElementCheckInterval?;
5244
+ private videoElementFreezeTimeout?;
5296
5245
  private _videoElementStatus;
5297
5246
  private isGettingVideoDimensions;
5298
5247
  constructor(config: PlayerConfig);
@@ -5405,6 +5354,44 @@ export declare class VideoProcessorDestination extends EventEmitter implements I
5405
5354
  reset(): void;
5406
5355
  }
5407
5356
 
5357
+ declare interface VideoSenderConfig {
5358
+ frameRate: number;
5359
+ bitrateMax: number;
5360
+ bitrateMin: number;
5361
+ scaleResolutionDownBy: number;
5362
+ scale: number;
5363
+ }
5364
+
5365
+ /**
5366
+ * 视频流状态。
5367
+ * @public
5368
+ */
5369
+ /** @en
5370
+ * The state of the video stream.
5371
+ */
5372
+ export declare enum VideoState {
5373
+ /** 0: 视频默认初始状态。 */
5374
+ /** @en
5375
+ * 0: The initial state of the video.
5376
+ */
5377
+ VideoStateStopped = 0,
5378
+ /** 1: 本地用户已接收视频首包。 */
5379
+ /** @en
5380
+ * 1: The local user has received the first video packet.
5381
+ */
5382
+ VideoStateStarting = 1,
5383
+ /** 2: 视频流正在解码,正常播放。 */
5384
+ /** @en
5385
+ * 2: The video stream is being decoded and played normally.
5386
+ */
5387
+ VideoStateDecoding = 2,
5388
+ /** 3: 视频流卡顿。 */
5389
+ /** @en
5390
+ * 3: The video stream is frozen.
5391
+ */
5392
+ VideoStateFrozen = 3
5393
+ }
5394
+
5408
5395
  declare class VisibilityWatcher extends EventEmitter {
5409
5396
  private _lastHiddenTime;
5410
5397
  private _lastVisibleTime;