@agora-js/media 4.24.2-200 → 4.24.3
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/AgoraRTC_N-media.esm.mjs +2 -2
- package/AgoraRTC_N-media.js +2 -2
- package/media.d.ts +10 -7
- package/package.json +4 -4
- package/rtc-sdk-media_en.d.ts +10 -7
package/media.d.ts
CHANGED
|
@@ -433,6 +433,10 @@ export declare class AudioProcessorDestination extends EventEmitter implements I
|
|
|
433
433
|
}): void;
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
+
export declare interface AudioPts {
|
|
437
|
+
value: BigInt;
|
|
438
|
+
}
|
|
439
|
+
|
|
436
440
|
declare abstract class AudioSource extends EventEmitter {
|
|
437
441
|
outputNode: GainNode;
|
|
438
442
|
outputTrack?: MediaStreamTrack;
|
|
@@ -1290,9 +1294,9 @@ export declare function detectSupportPreSub(store?: SDKStore): boolean;
|
|
|
1290
1294
|
|
|
1291
1295
|
export declare function detectSupportRestrictOwnAudio(): boolean;
|
|
1292
1296
|
|
|
1293
|
-
export declare function
|
|
1297
|
+
export declare function detectSupportSDPEndpoint(): boolean;
|
|
1294
1298
|
|
|
1295
|
-
export declare function
|
|
1299
|
+
export declare function detectSupportSuppressLocalAudioPlayback(): boolean;
|
|
1296
1300
|
|
|
1297
1301
|
/**
|
|
1298
1302
|
* 音视频采集设备的信息。
|
|
@@ -2951,7 +2955,6 @@ export declare function interceptLocalAudioFrame(sender: RTCRtpSender, options?:
|
|
|
2951
2955
|
|
|
2952
2956
|
export declare interface InterceptLocalAudioFrameOptions {
|
|
2953
2957
|
metadata?: () => Uint8Array | undefined;
|
|
2954
|
-
pts?: () => BigInt | undefined;
|
|
2955
2958
|
}
|
|
2956
2959
|
|
|
2957
2960
|
export declare function interceptLocalVideoFrame(sender: RTCRtpSender, localVideoTrack: LocalVideoTrack): Promise<void>;
|
|
@@ -2962,7 +2965,6 @@ export declare interface InterceptRemoteAudioFrameOptions {
|
|
|
2962
2965
|
enableTopn?: boolean;
|
|
2963
2966
|
enableMetadata?: boolean;
|
|
2964
2967
|
enablePts?: boolean;
|
|
2965
|
-
pt?: number | undefined;
|
|
2966
2968
|
onMetadata?: (metadata: Uint8Array) => void;
|
|
2967
2969
|
onPts?: (pts: bigint) => void;
|
|
2968
2970
|
}
|
|
@@ -3559,7 +3561,6 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
|
|
|
3559
3561
|
_encoderConfig?: AudioEncoderConfiguration;
|
|
3560
3562
|
_trackSource: AudioTrackSource | FakeTrackSource;
|
|
3561
3563
|
metadata: AudioMetadata[];
|
|
3562
|
-
pts: BigInt[];
|
|
3563
3564
|
/**
|
|
3564
3565
|
* @description This method is used to init WebAudio, if you're sure you don't want to use WebAudio, call _trackSource
|
|
3565
3566
|
*/
|
|
@@ -4396,6 +4397,7 @@ export declare interface RemoteAudioTrackStats {
|
|
|
4396
4397
|
export declare class RemoteDataChannel extends DataChannel implements IRemoteDataChannel {
|
|
4397
4398
|
private _messageListener;
|
|
4398
4399
|
constructor(config: IDataChannelConfig);
|
|
4400
|
+
_updateDataChannelConfig(config: IDataChannelConfig): void;
|
|
4399
4401
|
_updateOriginDataChannel(datachannel: RTCDataChannel): void;
|
|
4400
4402
|
_close(): void;
|
|
4401
4403
|
private _bandRemoteDataChannelEvents;
|
|
@@ -4508,7 +4510,7 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
|
|
|
4508
4510
|
protected processorContext: VideoProcessorContext;
|
|
4509
4511
|
get isPlaying(): boolean;
|
|
4510
4512
|
get __className__(): string;
|
|
4511
|
-
constructor(track: MediaStreamTrack, userId: UID, uintId: number, store: SDKStore, player?: AgoraRTCPlayer);
|
|
4513
|
+
constructor(track: MediaStreamTrack, userId: UID, uintId: number, store: SDKStore, player?: AgoraRTCPlayer | VideoPlayer);
|
|
4512
4514
|
getStats(): RemoteVideoTrackStats;
|
|
4513
4515
|
play(element: string | HTMLElement | HTMLVideoElement, config?: VideoPlayerConfig): void;
|
|
4514
4516
|
stop(isKeepLastFrame?: boolean): void;
|
|
@@ -5578,7 +5580,7 @@ export declare type VideoEncoderConfigurationPreset = keyof typeof SUPPORT_VIDEO
|
|
|
5578
5580
|
/**
|
|
5579
5581
|
* @internal
|
|
5580
5582
|
*/
|
|
5581
|
-
declare class VideoPlayer {
|
|
5583
|
+
export declare class VideoPlayer {
|
|
5582
5584
|
trackId: string;
|
|
5583
5585
|
config: PlayerConfig;
|
|
5584
5586
|
onFirstVideoFrameDecoded?: () => void;
|
|
@@ -5588,6 +5590,7 @@ declare class VideoPlayer {
|
|
|
5588
5590
|
freezeTimeCounterList: number[];
|
|
5589
5591
|
renderFreezeAccTime: number;
|
|
5590
5592
|
renderFreezeAccTime2: number;
|
|
5593
|
+
totalFreezeTime: number;
|
|
5591
5594
|
isKeepLastFrame: boolean;
|
|
5592
5595
|
isDestroyed: boolean;
|
|
5593
5596
|
/** 计算 500ms 卡顿时间用 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agora-js/media",
|
|
3
|
-
"version": "4.24.
|
|
3
|
+
"version": "4.24.3",
|
|
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,9 +23,9 @@
|
|
|
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.24.
|
|
27
|
-
"@agora-js/report": "4.24.
|
|
28
|
-
"axios": "^1.13.
|
|
26
|
+
"@agora-js/shared": "4.24.3",
|
|
27
|
+
"@agora-js/report": "4.24.3",
|
|
28
|
+
"axios": "^1.13.6",
|
|
29
29
|
"agora-rte-extension": "^1.2.4",
|
|
30
30
|
"webrtc-adapter": "8.2.0"
|
|
31
31
|
}
|
package/rtc-sdk-media_en.d.ts
CHANGED
|
@@ -288,6 +288,10 @@ export declare class AudioProcessorDestination extends EventEmitter implements I
|
|
|
288
288
|
}): void;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
export declare interface AudioPts {
|
|
292
|
+
value: BigInt;
|
|
293
|
+
}
|
|
294
|
+
|
|
291
295
|
declare abstract class AudioSource extends EventEmitter {
|
|
292
296
|
outputNode: GainNode;
|
|
293
297
|
outputTrack?: MediaStreamTrack;
|
|
@@ -841,9 +845,9 @@ export declare function detectSupportPreSub(store?: SDKStore): boolean;
|
|
|
841
845
|
|
|
842
846
|
export declare function detectSupportRestrictOwnAudio(): boolean;
|
|
843
847
|
|
|
844
|
-
export declare function
|
|
848
|
+
export declare function detectSupportSDPEndpoint(): boolean;
|
|
845
849
|
|
|
846
|
-
export declare function
|
|
850
|
+
export declare function detectSupportSuppressLocalAudioPlayback(): boolean;
|
|
847
851
|
|
|
848
852
|
/**
|
|
849
853
|
* Information of the media input device.
|
|
@@ -1814,7 +1818,6 @@ export declare function interceptLocalAudioFrame(sender: RTCRtpSender, options?:
|
|
|
1814
1818
|
|
|
1815
1819
|
export declare interface InterceptLocalAudioFrameOptions {
|
|
1816
1820
|
metadata?: () => Uint8Array | undefined;
|
|
1817
|
-
pts?: () => BigInt | undefined;
|
|
1818
1821
|
}
|
|
1819
1822
|
|
|
1820
1823
|
export declare function interceptLocalVideoFrame(sender: RTCRtpSender, localVideoTrack: LocalVideoTrack): Promise<void>;
|
|
@@ -1825,7 +1828,6 @@ export declare interface InterceptRemoteAudioFrameOptions {
|
|
|
1825
1828
|
enableTopn?: boolean;
|
|
1826
1829
|
enableMetadata?: boolean;
|
|
1827
1830
|
enablePts?: boolean;
|
|
1828
|
-
pt?: number | undefined;
|
|
1829
1831
|
onMetadata?: (metadata: Uint8Array) => void;
|
|
1830
1832
|
onPts?: (pts: bigint) => void;
|
|
1831
1833
|
}
|
|
@@ -2167,7 +2169,6 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
|
|
|
2167
2169
|
_encoderConfig?: AudioEncoderConfiguration;
|
|
2168
2170
|
_trackSource: AudioTrackSource | FakeTrackSource;
|
|
2169
2171
|
metadata: AudioMetadata[];
|
|
2170
|
-
pts: BigInt[];
|
|
2171
2172
|
get _source(): AudioTrackSource;
|
|
2172
2173
|
set _source(source: AudioTrackSource | FakeTrackSource);
|
|
2173
2174
|
_enabled: boolean;
|
|
@@ -2739,6 +2740,7 @@ export declare interface RemoteAudioTrackStats {
|
|
|
2739
2740
|
export declare class RemoteDataChannel extends DataChannel implements IRemoteDataChannel {
|
|
2740
2741
|
private _messageListener;
|
|
2741
2742
|
constructor(config: IDataChannelConfig);
|
|
2743
|
+
_updateDataChannelConfig(config: IDataChannelConfig): void;
|
|
2742
2744
|
_updateOriginDataChannel(datachannel: RTCDataChannel): void;
|
|
2743
2745
|
_close(): void;
|
|
2744
2746
|
private _bandRemoteDataChannelEvents;
|
|
@@ -2828,7 +2830,7 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
|
|
|
2828
2830
|
protected processorContext: VideoProcessorContext;
|
|
2829
2831
|
get isPlaying(): boolean;
|
|
2830
2832
|
get __className__(): string;
|
|
2831
|
-
constructor(track: MediaStreamTrack, userId: UID, uintId: number, store: SDKStore, player?: AgoraRTCPlayer);
|
|
2833
|
+
constructor(track: MediaStreamTrack, userId: UID, uintId: number, store: SDKStore, player?: AgoraRTCPlayer | VideoPlayer);
|
|
2832
2834
|
getStats(): RemoteVideoTrackStats;
|
|
2833
2835
|
play(element: string | HTMLElement | HTMLVideoElement, config?: VideoPlayerConfig): void;
|
|
2834
2836
|
stop(isKeepLastFrame?: boolean): void;
|
|
@@ -3465,7 +3467,7 @@ export declare interface VideoEncoderConfiguration {
|
|
|
3465
3467
|
*/
|
|
3466
3468
|
export declare type VideoEncoderConfigurationPreset = keyof typeof SUPPORT_VIDEO_ENCODER_CONFIG_LIST;
|
|
3467
3469
|
|
|
3468
|
-
declare class VideoPlayer {
|
|
3470
|
+
export declare class VideoPlayer {
|
|
3469
3471
|
trackId: string;
|
|
3470
3472
|
config: PlayerConfig;
|
|
3471
3473
|
onFirstVideoFrameDecoded?: () => void;
|
|
@@ -3475,6 +3477,7 @@ declare class VideoPlayer {
|
|
|
3475
3477
|
freezeTimeCounterList: number[];
|
|
3476
3478
|
renderFreezeAccTime: number;
|
|
3477
3479
|
renderFreezeAccTime2: number;
|
|
3480
|
+
totalFreezeTime: number;
|
|
3478
3481
|
isKeepLastFrame: boolean;
|
|
3479
3482
|
isDestroyed: boolean;
|
|
3480
3483
|
private timeUpdatedCount;
|