@agora-js/media 4.19.3 → 4.20.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agora-js/media",
3
- "version": "4.19.3",
3
+ "version": "4.20.1",
4
4
  "description": "media module across @agora-js packages",
5
5
  "main": "AgoraRTC_N-media.js",
6
6
  "module": "AgoraRTC_N-media.esm.mjs",
@@ -23,10 +23,10 @@
23
23
  "homepage": "https://api-ref.agora.io/en/voice-sdk/web/4.x/index.html",
24
24
  "peerDependencies": {},
25
25
  "dependencies": {
26
- "@agora-js/shared": "^4.19.3",
27
- "@agora-js/report": "^4.19.3",
26
+ "@agora-js/shared": "4.20.1",
27
+ "@agora-js/report": "4.20.1",
28
28
  "axios": "^0.27.2",
29
- "agora-rte-extension": "^1.2.3",
29
+ "agora-rte-extension": "^1.2.4",
30
30
  "webrtc-adapter": "8.2.0",
31
31
  "pako": "^2.1.0"
32
32
  }
@@ -174,7 +174,7 @@ declare class AudioElementPlayCenter {
174
174
  private bindAudioElementEvents;
175
175
  getPlayerState(trackId: string): string;
176
176
  private autoResumeAudioElement;
177
- private autoResumeAfterInterruption;
177
+ autoResumeAfterInterruption: (force?: boolean) => void;
178
178
  private autoResumeAfterInterruptionOnIOS15_16;
179
179
  }
180
180
 
@@ -896,6 +896,18 @@ declare function event_beauty_effect_overload(): void;
896
896
  */
897
897
  declare function event_first_frame_decoded(): void;
898
898
 
899
+ /**
900
+ * **Since**
901
+ * <br>&emsp;&emsp;&emsp;*4.20.1*
902
+ *
903
+ * Parsing SEI data from the H.264 video stream triggers this event, which returns the SEI data.
904
+ *
905
+ * @param sei SEI data in Uint8Array
906
+ * @asMemberOf ILocalVideoTrack
907
+ * @event
908
+ */
909
+ declare function event_sei_received(sei: Uint8Array): void;
910
+
899
911
  /**
900
912
  * Occurs when the state of processing the audio buffer in [BufferSourceAudioTrack]{@link IBufferSourceAudioTrack} changes.
901
913
  *
@@ -999,6 +1011,14 @@ declare function event_video_element_visible_status(data?: CheckVideoVisibleResu
999
1011
  */
1000
1012
  declare function event_video_element_visible_status_2(data?: CheckVideoVisibleResult): void;
1001
1013
 
1014
+ /**
1015
+ * Occurs when the video state changes.
1016
+ *
1017
+ * @event
1018
+ * @asMemberOf IRemoteTrack
1019
+ */
1020
+ declare function event_video_state_changed(videoState: VideoState): void;
1021
+
1002
1022
  export declare interface ExtendedVideoFrameCallbackMetadata extends VideoFrameCallbackMetadata {
1003
1023
  timestamp: DOMHighResTimeStamp;
1004
1024
  }
@@ -1042,7 +1062,7 @@ export declare function getAudioContext(): AudioContext;
1042
1062
 
1043
1063
  export declare function getAudioEncoderConfiguration(profile: AudioEncoderConfigurationPreset | AudioEncoderConfiguration): AudioEncoderConfiguration;
1044
1064
 
1045
- export declare function getBitrateFromResAndFps(width: number, height: number, fps: number, bitrateAdapterType: "STANDARD_BITRATE" | "COMPATIABLE_BITRATE"): [number, number] | void;
1065
+ export declare function getBitrateConstrainRange(width: number, height: number, frameRate: number, bitrateMin?: number, bitrateMax?: number): DoubleRange;
1046
1066
 
1047
1067
  export declare function getCompatibility(): AgoraRTCCompatibility;
1048
1068
 
@@ -1317,7 +1337,6 @@ export declare interface ILocalAudioTrack extends ILocalTrack {
1317
1337
  *
1318
1338
  * > Note:
1319
1339
  * > - As of v4.7.0, this method no longer takes effect. Use [IRemoteAudioTrack.setPlaybackDevice]{@link IRemoteAudioTrack.setPlaybackDevice} instead.
1320
- * > - This method supports Chrome on desktop devices only. Other browsers throw a '`NOT_SUPPORTED` error when calling this method.
1321
1340
  *
1322
1341
  * Sets the playback device (speaker) for the remote audio stream.
1323
1342
  *
@@ -1379,7 +1398,7 @@ export declare interface ILocalTrack extends ITrack {
1379
1398
  /**
1380
1399
  * Adds an event listener.
1381
1400
  * @param event The event name.
1382
- * @param listener See [transceiver-updated]{@link event_transceiver_updated}.
1401
+ * @param listener See [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}.
1383
1402
  */
1384
1403
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated): void;
1385
1404
  /**
@@ -1424,7 +1443,7 @@ export declare interface ILocalTrack extends ITrack {
1424
1443
  *
1425
1444
  * 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.
1426
1445
  *
1427
- * > - 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).
1446
+ * > - 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).
1428
1447
  * > - Do not call `setEnabled` and `setMuted` together.
1429
1448
  *
1430
1449
  * @param muted Whether to stop sending the media data of the track:
@@ -1465,11 +1484,11 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
1465
1484
  /**
1466
1485
  * Adds an event listener.
1467
1486
  * @param event The event name.
1468
- * @param listener See [transceiver-updated]{@link event_transceiver_updated}.
1487
+ * @param listener See [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}.
1469
1488
  */
1470
1489
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated): void;
1471
1490
  /**
1472
- * Plays a local video track on the web page.
1491
+ * Plays a remote video track on the web page.
1473
1492
  *
1474
1493
  * @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:
1475
1494
  * - `string`: Specify the ID of the DOM element.
@@ -1636,6 +1655,12 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
1636
1655
  * @param config The video encoder configurations. You can pass either [[VideoEncoderConfigurationPreset]] or a customized [[VideoEncoderConfiguration]] object.
1637
1656
  */
1638
1657
  setEncoderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset): Promise<void>;
1658
+ /**
1659
+ * Add the SEI data to the H.264 video stream.
1660
+ *
1661
+ * @param config SEI data.
1662
+ */
1663
+ sendSeiData(sei: Uint8Array): void;
1639
1664
  }
1640
1665
 
1641
1666
  export declare interface ImageTypedData {
@@ -1677,6 +1702,18 @@ export declare interface IMicrophoneAudioTrack extends ILocalAudioTrack {
1677
1702
  setEnabled(enabled: boolean): Promise<void>;
1678
1703
  }
1679
1704
 
1705
+ export declare function interceptLocalAudioFrame(sender: RTCRtpSender): Promise<void>;
1706
+
1707
+ export declare function interceptLocalVideoFrame(sender: RTCRtpSender, localVideoTrack: LocalVideoTrack): Promise<void>;
1708
+
1709
+ export declare function interceptRemoteAudioFrame(receiver: RTCRtpReceiver): Promise<void>;
1710
+
1711
+ export declare function interceptRemoteVideoFrame(receiver: RTCRtpReceiver, options?: InterceptVideoFrameOptions): Promise<void>;
1712
+
1713
+ declare interface InterceptVideoFrameOptions {
1714
+ onSei?: (sei: Uint8Array) => void;
1715
+ }
1716
+
1680
1717
  /**
1681
1718
  * `RemoteAudioTrack` is the basic interface for the remote audio track.
1682
1719
  *
@@ -1701,7 +1738,7 @@ export declare interface IRemoteAudioTrack extends IRemoteTrack {
1701
1738
  *
1702
1739
  * Sets the audio playback device, for example, the speaker.
1703
1740
  *
1704
- * > This method supports Chrome on desktop devices only. Other browsers throw a `NOT_SUPPORTED` error when calling this method.
1741
+ * > This method supports Chrome and Edge on desktop devices only. Other browsers throw a `NOT_SUPPORTED` error when calling this method.
1705
1742
  * @param deviceId Device ID, which can be retrieved by calling [[getPlaybackDevices]].
1706
1743
  */
1707
1744
  setPlaybackDevice(deviceId: string): Promise<void>;
@@ -1796,7 +1833,7 @@ export declare interface IRemoteTrack extends ITrack {
1796
1833
  /**
1797
1834
  * Adds an event listener.
1798
1835
  * @param event The event name.
1799
- * @param listener See [transceiver-updated-2]{@link event_transceiver_updated_2}.
1836
+ * @param listener See [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}.
1800
1837
  */
1801
1838
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated_2): void;
1802
1839
  /**
@@ -1820,6 +1857,11 @@ export declare interface IRemoteTrack extends ITrack {
1820
1857
  * You can get create a remote video track by the [AgoraRTCRemoteUser.videoTrack]{@link IAgoraRTCRemoteUser.videoTrack} object after calling [subscribe]{@link IAgoraRTCClient.subscribe}.
1821
1858
  */
1822
1859
  export declare interface IRemoteVideoTrack extends IRemoteTrack {
1860
+ /**
1861
+ * @param event The event name.
1862
+ * @param listener See [video-state-changed]{@link event_video_state_changed}.
1863
+ */
1864
+ on(event: "video-state-changed", listener: typeof event_video_state_changed): void;
1823
1865
  /**
1824
1866
  * @param event The event name.
1825
1867
  * @param listener See [first-frame-decoded]{@link event_first_frame_decoded}.
@@ -1833,9 +1875,15 @@ export declare interface IRemoteVideoTrack extends IRemoteTrack {
1833
1875
  /**
1834
1876
  * Adds an event listener.
1835
1877
  * @param event The event name.
1836
- * @param listener See [transceiver-updated-2]{@link event_transceiver_updated_2}.
1878
+ * @param listener See [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}.
1837
1879
  */
1838
1880
  on(event: "transceiver-updated", listener: typeof event_transceiver_updated_2): void;
1881
+ /**
1882
+ * Adds an event listener.
1883
+ * @param event The event name.
1884
+ * @param listener See [ILocalTrack.sei-received]{@link event_sei_received}.
1885
+ */
1886
+ on(event: "sei-received", listener: typeof event_sei_received): void;
1839
1887
  /**
1840
1888
  * Gets the statistics of a remote video track.
1841
1889
  *
@@ -1950,8 +1998,8 @@ export declare interface ITrack extends EventEmitter {
1950
1998
  * This method is currently mainly used for end-to-end encryption of video streams (Beta).
1951
1999
  *
1952
2000
  * > 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:
1953
- * > - For a local track: ["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
1954
- * > - For a remote track: ["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
2001
+ * > - For a local track: [ILocalTrack.transceiver-updated]{@link event_transceiver_updated}
2002
+ * > - For a remote track: [IRemoteTrack.transceiver-updated]{@link event_transceiver_updated_2}
1955
2003
  *
1956
2004
  * @param type The type of the video stream. See {@link StreamType}.
1957
2005
  * @returns The [RTCRtpTransceiver](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver) instance of the current track.
@@ -1975,23 +2023,21 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
1975
2023
  readonly trackMediaType: "audio" | "video";
1976
2024
  _encoderConfig?: AudioEncoderConfiguration;
1977
2025
  _trackSource: AudioTrackSource | FakeTrackSource;
1978
- get _source(): AudioTrackSource | FakeTrackSource;
2026
+ get _source(): AudioTrackSource;
1979
2027
  set _source(source: AudioTrackSource | FakeTrackSource);
1980
2028
  _enabled: boolean;
1981
2029
  private _volume;
1982
2030
  _useAudioElement: boolean;
1983
2031
  _bypassWebAudio: boolean;
1984
2032
  protected processor?: IAudioProcessor;
1985
- protected _processorContext: AudioProcessorContext;
2033
+ protected _processorContext: AudioProcessorContext | undefined;
1986
2034
  protected get processorContext(): AudioProcessorContext;
1987
- protected set processorContext(ctx: AudioProcessorContext);
1988
- _processorDestination: AudioProcessorDestination;
2035
+ _processorDestination: AudioProcessorDestination | undefined;
1989
2036
  get processorDestination(): AudioProcessorDestination;
1990
- set processorDestination(des: AudioProcessorDestination);
1991
2037
  protected _getOriginVolumeLevel: boolean;
1992
2038
  get isPlaying(): boolean;
1993
2039
  get __className__(): string;
1994
- constructor(track: MediaStreamTrack, encoderConfig?: AudioEncoderConfiguration, trackId?: string, getOriginVolumeLevel?: boolean, deferWebAudio?: boolean);
2040
+ constructor(track: MediaStreamTrack, encoderConfig?: AudioEncoderConfiguration, trackId?: string, getOriginVolumeLevel?: boolean);
1995
2041
  setVolume(volume: number): void;
1996
2042
  getVolumeLevel(): number;
1997
2043
  setPlaybackDevice(deviceId: string): Promise<void>;
@@ -2010,7 +2056,10 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
2010
2056
  unpipe(): void;
2011
2057
  private bindProcessorDestinationEvents;
2012
2058
  private unbindProcessorDestinationEvents;
2013
- private unbindProcessorContextEvents;
2059
+ protected bindProcessorContextEvents(processorContext: AudioProcessorContext): void;
2060
+ protected unbindProcessorContextEvents(processorContext: AudioProcessorContext): void;
2061
+ private initWebAudio;
2062
+ private initProcessor;
2014
2063
  }
2015
2064
 
2016
2065
  /**
@@ -2083,9 +2132,9 @@ export declare abstract class LocalTrack extends Track implements ILocalTrack {
2083
2132
  _isClosed: boolean;
2084
2133
  protected _enabledMutex: PromiseMutex;
2085
2134
  protected processor?: IBaseProcessor;
2086
- protected abstract _processorContext: IProcessorContext;
2087
- protected get processorContext(): IProcessorContext;
2088
- protected set processorContext(ctx: IProcessorContext);
2135
+ protected abstract _processorContext: IProcessorContext | undefined;
2136
+ protected get processorContext(): IProcessorContext | undefined;
2137
+ abstract processorDestination: IBaseProcessor;
2089
2138
  constructor(track: MediaStreamTrack, trackId?: string);
2090
2139
  abstract getStats(): LocalVideoTrackStats | LocalAudioTrackStats;
2091
2140
  abstract setMuted(enabled: boolean): Promise<void>;
@@ -2164,6 +2213,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
2164
2213
  clone(config?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset, cloneTrack?: boolean): LocalVideoTrack;
2165
2214
  replaceTrack(track: MediaStreamTrack, stopOldTrack: boolean): Promise<void>;
2166
2215
  startMonitorStats(): void;
2216
+ sendSeiData(sei: Uint8Array): never;
2167
2217
  private bindProcessorDestinationEvents;
2168
2218
  private unbindProcessorDestinationEvents;
2169
2219
  private unbindProcessorContextEvents;
@@ -2177,7 +2227,6 @@ export declare interface LocalVideoTrackStats {
2177
2227
  * The video codec.
2178
2228
  *
2179
2229
  * - `"H264"`: The video codec is H.264.
2180
- * - `"H265"`: The video codec is H.265.
2181
2230
  * - `"VP8"`: The video codec is VP8.
2182
2231
  * - `"VP9"`: The video codec is VP9.
2183
2232
  * - `"AV1X"`: Reserved for future use.
@@ -2335,7 +2384,8 @@ export declare class MicrophoneAudioTrack extends LocalAudioTrack implements IMi
2335
2384
  close(): void;
2336
2385
  protected onTrackEnded(): void;
2337
2386
  renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
2338
- private bindProcessorContextEvents;
2387
+ protected bindProcessorContextEvents(processorContext: AudioProcessorContext): void;
2388
+ protected unbindProcessorContextEvents(processorContext: AudioProcessorContext): void;
2339
2389
  }
2340
2390
 
2341
2391
  /**
@@ -2424,74 +2474,6 @@ export declare interface ProcessorUsageStats {
2424
2474
  totalTs: number;
2425
2475
  }
2426
2476
 
2427
- export declare interface PublishAudioUploadStats {
2428
- id: string;
2429
- timestamp: string;
2430
- mediaType: "audio";
2431
- type: "ssrc";
2432
- ssrc: string;
2433
- A_ail?: string;
2434
- A_apil?: string;
2435
- A_astd?: string;
2436
- A_ecrl?: string;
2437
- A_ecrle?: string;
2438
- bytesSent?: string;
2439
- packetsLost?: string;
2440
- packetsSent?: string;
2441
- }
2442
-
2443
- export declare interface PublishBandwidthUploadStats {
2444
- id: "bweforvideo";
2445
- type: "VideoBwe";
2446
- timestamp: string;
2447
- A_aeb?: string;
2448
- A_asb?: string;
2449
- A_rb?: string;
2450
- A_arb?: string;
2451
- A_teb?: string;
2452
- A_bd?: string;
2453
- A_tb?: string;
2454
- }
2455
-
2456
- export declare interface PublishVideoInputStats {
2457
- id: string;
2458
- timestamp: string;
2459
- mediaType: "video";
2460
- type: "ssrc";
2461
- ssrc: string;
2462
- A_fhi?: string;
2463
- A_fri?: string;
2464
- A_fwi?: string;
2465
- }
2466
-
2467
- export declare interface PublishVideoRelatedStats {
2468
- mediaType: "video";
2469
- isVideoMute: boolean;
2470
- frameRateInput?: string;
2471
- frameRateSent?: string;
2472
- googRtt: string;
2473
- qpSumPerFrame?: string;
2474
- }
2475
-
2476
- export declare interface PublishVideoUploadStats {
2477
- id: string;
2478
- timestamp: string;
2479
- mediaType: "video";
2480
- type: "ssrc";
2481
- ssrc: string;
2482
- A_fhs?: string;
2483
- A_frs?: string;
2484
- A_fws?: string;
2485
- A_nr?: string;
2486
- A_vstd?: string;
2487
- A_aem?: string;
2488
- A_lvps?: string;
2489
- A_ac?: string;
2490
- bytesSent?: string;
2491
- packetsLost?: string;
2492
- packetsSent?: string;
2493
- }
2494
-
2495
2477
  export declare class RemoteAudioTrack extends RemoteTrack implements IRemoteAudioTrack {
2496
2478
  readonly trackMediaType: "audio" | "video";
2497
2479
  _source: AudioTrackSource | FakeTrackSource;
@@ -2620,7 +2602,7 @@ export declare enum RemoteStreamFallbackType {
2620
2602
  */
2621
2603
  DISABLE = 0,
2622
2604
  /**
2623
- * 1: (Default) Automatically subscribe to the low-video stream under poor network conditions. */
2605
+ * 1: Automatically subscribe to the low-video stream under poor network conditions. */
2624
2606
  LOW_STREAM = 1,
2625
2607
  /**
2626
2608
  * 2: Subscribe to the low-quality video stream when the network conditions worsen, and subscribe to audio only when the conditions become too poor to support video transmission.
@@ -2662,7 +2644,8 @@ export declare abstract class RemoteTrack extends Track implements IRemoteTrack
2662
2644
 
2663
2645
  export declare enum RemoteTrackEvents {
2664
2646
  FIRST_FRAME_DECODED = "first-frame-decoded",
2665
- VIDEO_ELEMENT_VISIBLE_STATUS = "video-element-visible-status"
2647
+ VIDEO_ELEMENT_VISIBLE_STATUS = "video-element-visible-status",
2648
+ VIDEO_STATE_CHANGED = "video-state-changed"
2666
2649
  }
2667
2650
 
2668
2651
  export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVideoTrack {
@@ -2690,6 +2673,7 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
2690
2673
  private bindProcessorDestinationEvents;
2691
2674
  private unbindProcessorDestinationEvents;
2692
2675
  _destroy(): void;
2676
+ _onSei(sei: Uint8Array): void;
2693
2677
  }
2694
2678
 
2695
2679
  /**
@@ -2706,7 +2690,6 @@ export declare interface RemoteVideoTrackStats {
2706
2690
  * The video codec.
2707
2691
  *
2708
2692
  * - `"H264"`: The video codec is H.264.
2709
- * - `"H265"`: The video codec is H.265.
2710
2693
  * - `"VP8"`: The video codec is VP8.
2711
2694
  * - `"VP9"`: The video codec is VP9.
2712
2695
  * - `"AV1X"`: Reserved for future use.
@@ -2978,77 +2961,6 @@ export declare enum StreamType {
2978
2961
  LOW_STREAM = 1
2979
2962
  }
2980
2963
 
2981
- export declare interface SubscribeAudioRelatedStats {
2982
- mediaType: "audio";
2983
- peerId: UID;
2984
- isAudioMute: boolean;
2985
- frameDropped?: string;
2986
- frameReceived?: string;
2987
- googJitterReceived: string;
2988
- bytesReceived: string;
2989
- packetsReceived: string;
2990
- isFreeze: boolean;
2991
- packetsLost: string;
2992
- }
2993
-
2994
- export declare interface SubscribeAudioUploadStats {
2995
- id: string;
2996
- timestamp: string;
2997
- mediaType: "audio";
2998
- type: "ssrc";
2999
- ssrc: string;
3000
- bytesReceived?: string;
3001
- packetsLost?: string;
3002
- packetsReceived?: string;
3003
- A_aol?: string;
3004
- A_apol?: string;
3005
- A_jr?: string;
3006
- A_jbm?: string;
3007
- A_cdm?: string;
3008
- A_artd?: string;
3009
- A_raps?: string;
3010
- A_cs?: string;
3011
- }
3012
-
3013
- export declare interface SubscribeVideoRelatedStats {
3014
- mediaType: "video";
3015
- peerId: UID;
3016
- isVideoMute: boolean;
3017
- frameRateReceived?: string;
3018
- frameRateDecoded?: string;
3019
- bytesReceived: string;
3020
- packetsReceived: string;
3021
- isFreeze: boolean;
3022
- packetsLost: string;
3023
- qpSumPerFrame?: string;
3024
- }
3025
-
3026
- export declare interface SubscribeVideoUploadStats {
3027
- id: string;
3028
- timestamp: string;
3029
- mediaType: "video";
3030
- type: "ssrc";
3031
- ssrc: string;
3032
- bytesReceived?: string;
3033
- packetsLost?: string;
3034
- packetsReceived?: string;
3035
- A_frr?: string;
3036
- A_frd?: string;
3037
- A_fro?: string;
3038
- A_jbm?: string;
3039
- A_cdm?: string;
3040
- A_ns?: string;
3041
- A_ps?: string;
3042
- A_fs?: string;
3043
- A_vrtd?: string;
3044
- A_vrft?: string;
3045
- A_rvps?: string;
3046
- A_fhr?: string;
3047
- A_fwr?: string;
3048
- A_vrrft?: string;
3049
- A_ifdsd?: string;
3050
- }
3051
-
3052
2964
  export declare const SUPPORT_720P_AUTO_CONFIG_LIST: Required<{
3053
2965
  scaleResolutionDownBy: number;
3054
2966
  width: number;
@@ -3139,7 +3051,9 @@ export declare abstract class Track extends EventEmitter implements ITrack {
3139
3051
  }
3140
3052
 
3141
3053
  export declare enum TrackEvents {
3142
- TRANSCEIVER_UPDATED = "transceiver-updated"
3054
+ TRANSCEIVER_UPDATED = "transceiver-updated",
3055
+ SEI_TO_SEND = "sei-to-send",
3056
+ SEI_RECEIVED = "sei-received"
3143
3057
  }
3144
3058
 
3145
3059
  export declare enum TrackHint {
@@ -3151,6 +3065,7 @@ export declare enum TrackHint {
3151
3065
  export declare enum TrackInternalEvent {
3152
3066
  NEED_RENEGOTIATE = "@need_renegotiate",
3153
3067
  NEED_REPLACE_TRACK = "@need_replace_track",
3068
+ NEED_REPLACE_MIXING_TRACK = "@need_replace_mixing_track",
3154
3069
  NEED_CLOSE = "@need_close",
3155
3070
  NEED_ENABLE_TRACK = "@need_enable_track",
3156
3071
  NEED_DISABLE_TRACK = "@need_disable_track",
@@ -3165,11 +3080,6 @@ export declare enum TrackInternalEvent {
3165
3080
  NEED_UNMUTE_TRACK = "@need_unmute_track"
3166
3081
  }
3167
3082
 
3168
- export declare interface TransportUploadStats {
3169
- connectionType: number;
3170
- googRtt?: number;
3171
- }
3172
-
3173
3083
  export declare function updateAgoraRTCCompatibility(): void;
3174
3084
 
3175
3085
  export declare interface UsageRegistry {
@@ -3287,6 +3197,7 @@ declare class VideoPlayer {
3287
3197
  trackId: string;
3288
3198
  config: PlayerConfig;
3289
3199
  onFirstVideoFrameDecoded?: () => void;
3200
+ onVideoStateChanged?: (state: VideoState) => void;
3290
3201
  freezeTimeCounterList: number[];
3291
3202
  renderFreezeAccTime: number;
3292
3203
  isKeepLastFrame: boolean;
@@ -3300,7 +3211,11 @@ declare class VideoPlayer {
3300
3211
  protected cacheVideoElement?: HTMLVideoElement;
3301
3212
  get videoElementStatus(): MediaElementStatus;
3302
3213
  set videoElementStatus(status: MediaElementStatus);
3214
+ get videoState(): VideoState;
3215
+ set videoState(state: VideoState);
3216
+ private _videoState;
3303
3217
  private videoElementCheckInterval?;
3218
+ private videoElementFreezeTimeout?;
3304
3219
  private _videoElementStatus;
3305
3220
  private isGettingVideoDimensions;
3306
3221
  constructor(config: PlayerConfig);
@@ -3391,6 +3306,28 @@ export declare class VideoProcessorDestination extends EventEmitter implements I
3391
3306
  reset(): void;
3392
3307
  }
3393
3308
 
3309
+ /**
3310
+ * The state of the video stream.
3311
+ */
3312
+ export declare enum VideoState {
3313
+ /**
3314
+ * 0: The initial state of the video.
3315
+ */
3316
+ VideoStateStopped = 0,
3317
+ /**
3318
+ * 1: The local user has received the first video packet.
3319
+ */
3320
+ VideoStateStarting = 1,
3321
+ /**
3322
+ * 2: The video stream is being decoded and played normally.
3323
+ */
3324
+ VideoStateDecoding = 2,
3325
+ /**
3326
+ * 3: The video stream is frozen.
3327
+ */
3328
+ VideoStateFrozen = 3
3329
+ }
3330
+
3394
3331
  declare class VisibilityWatcher extends EventEmitter {
3395
3332
  private _lastHiddenTime;
3396
3333
  private _lastVisibleTime;