@agora-js/media 4.24.4 → 4.24.6
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 +282 -0
- package/package.json +4 -3
- package/rtc-sdk-media_en.d.ts +166 -0
package/media.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { AgoraRTCError } from '@agora-js/shared';
|
|
2
|
+
import type { AudioExtensionConstructor } from 'agora-rte-extension-ng';
|
|
2
3
|
import { CheckVisibleResult } from '@agora-js/shared';
|
|
3
4
|
import { ElectronDesktopCapturerSource } from '@agora-js/shared';
|
|
4
5
|
import { EventEmitter } from '@agora-js/shared';
|
|
6
|
+
import type { IAudioExtension } from 'agora-rte-extension-ng';
|
|
5
7
|
import { IAudioProcessor } from 'agora-rte-extension';
|
|
6
8
|
import type { IAudioProcessorContext } from 'agora-rte-extension';
|
|
7
9
|
import { IBaseProcessor } from 'agora-rte-extension';
|
|
8
10
|
import type { IProcessorContext } from 'agora-rte-extension';
|
|
9
11
|
import { isElectron } from '@agora-js/shared';
|
|
12
|
+
import type { IVideoExtension } from 'agora-rte-extension-ng';
|
|
10
13
|
import type { Kind } from 'agora-rte-extension';
|
|
11
14
|
import type { NetworkQuality } from '@agora-js/shared';
|
|
12
15
|
import type { ProcessorStats } from 'agora-rte-extension';
|
|
@@ -16,6 +19,7 @@ import { SDKStore } from '@agora-js/shared';
|
|
|
16
19
|
import { UID } from '@agora-js/shared';
|
|
17
20
|
import { Usage } from 'agora-rte-extension';
|
|
18
21
|
import type { UsageWithDirection } from 'agora-rte-extension';
|
|
22
|
+
import type { VideoExtensionConstructor } from 'agora-rte-extension-ng';
|
|
19
23
|
|
|
20
24
|
export declare const __TRACK_LIST__: Track[];
|
|
21
25
|
|
|
@@ -260,6 +264,12 @@ declare class AudioElementPlayCenter {
|
|
|
260
264
|
private elementStateMap;
|
|
261
265
|
private elementsNeedToResume;
|
|
262
266
|
private sinkIdMap;
|
|
267
|
+
/**
|
|
268
|
+
* element → 当前 trackId 的可变持有者。
|
|
269
|
+
* 事件监听闭包读它拿「当前 id」,而不是捕获创建时的 id;
|
|
270
|
+
* 这样预渲染移交后 reuseTrackId 只改一处,监听器就写到新 id 上(见 reuseTrackId)。
|
|
271
|
+
*/
|
|
272
|
+
private elementIdMap;
|
|
263
273
|
constructor();
|
|
264
274
|
setSinkID(trackId: string, deviceID: string): Promise<void>;
|
|
265
275
|
play(track: MediaStreamTrack, trackId: string, volume: number, sessionId?: string): void;
|
|
@@ -268,6 +278,12 @@ declare class AudioElementPlayCenter {
|
|
|
268
278
|
setVolume(trackId: string, volume: number): void;
|
|
269
279
|
getVolume(trackId: string): number;
|
|
270
280
|
stop(trackId: string): void;
|
|
281
|
+
/**
|
|
282
|
+
* 预渲染移交:把已在播放的 <audio> 从临时 id 迁移到 track 的正式 id(getTrackId())。
|
|
283
|
+
* 参照 RemoteVideoTrack 复用 _prePlayer 的思路——渲染层归属 track 自己的身份,
|
|
284
|
+
* 而不是让 track 长期追着一个临时 id。迁移 3 张 map + 更新事件监听读取的 id 持有者。
|
|
285
|
+
*/
|
|
286
|
+
reuseTrackId(fromId: string, toId: string): void;
|
|
271
287
|
private bindAudioElementEvents;
|
|
272
288
|
getPlayerState(trackId: string): string;
|
|
273
289
|
/**
|
|
@@ -1146,6 +1162,28 @@ export declare interface CustomVideoTrackInitConfig {
|
|
|
1146
1162
|
* The maximum bitrate of sending the video track (Kbps).
|
|
1147
1163
|
*/
|
|
1148
1164
|
bitrateMax?: number;
|
|
1165
|
+
/**
|
|
1166
|
+
* 自动降分辨率时允许降到的最小宽度。
|
|
1167
|
+
*
|
|
1168
|
+
* 当 SDK 接管分辨率降档时,发送宽度不会低于这个值。
|
|
1169
|
+
*/
|
|
1170
|
+
/** @en
|
|
1171
|
+
* The minimum width allowed during automatic downscaling.
|
|
1172
|
+
*
|
|
1173
|
+
* When the SDK takes over resolution downscaling, the sending width will not go below this value.
|
|
1174
|
+
*/
|
|
1175
|
+
minDownscaleWidth?: number;
|
|
1176
|
+
/**
|
|
1177
|
+
* 自动降分辨率时允许降到的最小高度。
|
|
1178
|
+
*
|
|
1179
|
+
* 当 SDK 接管分辨率降档时,发送高度不会低于这个值。
|
|
1180
|
+
*/
|
|
1181
|
+
/** @en
|
|
1182
|
+
* The minimum height allowed during automatic downscaling.
|
|
1183
|
+
*
|
|
1184
|
+
* When the SDK takes over resolution downscaling, the sending height will not go below this value.
|
|
1185
|
+
*/
|
|
1186
|
+
minDownscaleHeight?: number;
|
|
1149
1187
|
/**
|
|
1150
1188
|
* @自从
|
|
1151
1189
|
* <br>   *4.2.0*
|
|
@@ -1786,11 +1824,15 @@ export declare function getNewVideoBitrate(width: number, height: number, fps: n
|
|
|
1786
1824
|
* ⚠️:理论上不存在没有分辨率的情况,如果出现不足任何处理
|
|
1787
1825
|
*/
|
|
1788
1826
|
export declare const getOriginSenderConfig: (track: LocalVideoTrack) => {
|
|
1827
|
+
width: number;
|
|
1828
|
+
height: number;
|
|
1789
1829
|
frameRate: number;
|
|
1790
1830
|
bitrateMax: number;
|
|
1791
1831
|
bitrateMin: number;
|
|
1792
1832
|
scaleResolutionDownBy: number;
|
|
1793
1833
|
scale: number;
|
|
1834
|
+
minDownscaleWidth: number;
|
|
1835
|
+
minDownscaleHeight: number;
|
|
1794
1836
|
};
|
|
1795
1837
|
|
|
1796
1838
|
export declare function getScalabilityConfiguration(profile: SVCConfiguration | SVCConfigurationPreset): SVCConfiguration;
|
|
@@ -2320,6 +2362,56 @@ export declare interface ILocalAudioTrack extends ILocalTrack {
|
|
|
2320
2362
|
* The destination of the current processing pipeline on the local audio track.
|
|
2321
2363
|
*/
|
|
2322
2364
|
processorDestination: IAudioProcessor;
|
|
2365
|
+
/**
|
|
2366
|
+
* 使用类构造器在当前音频轨道上创建或复用一个音频插件实例。
|
|
2367
|
+
*
|
|
2368
|
+
* @param extensionCtor 音频插件类构造器。
|
|
2369
|
+
* @param extensionOptions 可选的插件初始化参数。
|
|
2370
|
+
*/
|
|
2371
|
+
/** @en
|
|
2372
|
+
* Creates or reuses an audio extension instance on the current audio track using a class constructor.
|
|
2373
|
+
*
|
|
2374
|
+
* @param extensionCtor The audio extension class constructor.
|
|
2375
|
+
* @param extensionOptions Optional extension initialization parameters.
|
|
2376
|
+
*/
|
|
2377
|
+
useExtension<T extends IAudioExtension>(extensionCtor: AudioExtensionConstructor<T>, extensionOptions?: Record<string, unknown>): T;
|
|
2378
|
+
/**
|
|
2379
|
+
* 从本地音频轨道移除音频插件。
|
|
2380
|
+
*
|
|
2381
|
+
* @param extension 音频插件实例。
|
|
2382
|
+
* @returns 是否成功移除。
|
|
2383
|
+
*/
|
|
2384
|
+
/** @en
|
|
2385
|
+
* Removes an audio extension from the local audio track.
|
|
2386
|
+
*
|
|
2387
|
+
* @param extension The audio extension instance.
|
|
2388
|
+
* @returns Whether the removal succeeded.
|
|
2389
|
+
*/
|
|
2390
|
+
removeExtension(extension: IAudioExtension): boolean;
|
|
2391
|
+
/**
|
|
2392
|
+
* 向当前音频扩展链路添加参考音轨。
|
|
2393
|
+
*
|
|
2394
|
+
* @param track 作为参考输入的本地或远端音频轨道。
|
|
2395
|
+
*/
|
|
2396
|
+
/** @en
|
|
2397
|
+
* Adds a reference track to the current audio extension pipeline.
|
|
2398
|
+
*
|
|
2399
|
+
* @param track The local or remote audio track used as the reference input.
|
|
2400
|
+
*/
|
|
2401
|
+
addReferenceTrack(track: ILocalAudioTrack | IRemoteAudioTrack): void;
|
|
2402
|
+
/**
|
|
2403
|
+
* 从当前音频扩展链路移除参考音轨。
|
|
2404
|
+
*
|
|
2405
|
+
* @param track 要移除的参考输入轨道。
|
|
2406
|
+
* @returns 是否成功移除。
|
|
2407
|
+
*/
|
|
2408
|
+
/** @en
|
|
2409
|
+
* Removes a reference track from the current audio extension pipeline.
|
|
2410
|
+
*
|
|
2411
|
+
* @param track The reference input track to remove.
|
|
2412
|
+
* @returns Whether the removal succeeded.
|
|
2413
|
+
*/
|
|
2414
|
+
removeReferenceTrack(track: ILocalAudioTrack | IRemoteAudioTrack): boolean;
|
|
2323
2415
|
}
|
|
2324
2416
|
|
|
2325
2417
|
/** @ignore */
|
|
@@ -2762,12 +2854,16 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
|
|
|
2762
2854
|
* @自从
|
|
2763
2855
|
* <br>   *4.10.0*
|
|
2764
2856
|
*
|
|
2857
|
+
* @deprecated 旧版 v1 pipe 模式 API。新插件请使用 `useExtension` 和 `removeExtension`。
|
|
2858
|
+
*
|
|
2765
2859
|
* 取消本地视频轨道上注入的 `Processor`。
|
|
2766
2860
|
*/
|
|
2767
2861
|
/** @en
|
|
2768
2862
|
* @since
|
|
2769
2863
|
* <br>   *4.10.0*
|
|
2770
2864
|
*
|
|
2865
|
+
* @deprecated Legacy v1 pipe-mode API. For new extensions, use `useExtension` and `removeExtension`.
|
|
2866
|
+
*
|
|
2771
2867
|
* Removes the `Processor` inserted to the local video track.
|
|
2772
2868
|
*/
|
|
2773
2869
|
unpipe(): void;
|
|
@@ -2775,15 +2871,53 @@ export declare interface ILocalVideoTrack extends ILocalTrack {
|
|
|
2775
2871
|
* @自从
|
|
2776
2872
|
* <br>   *4.10.0*
|
|
2777
2873
|
*
|
|
2874
|
+
* @deprecated 旧版 v1 pipe 模式 API。新插件请使用 `useExtension` 和 `removeExtension`。
|
|
2875
|
+
*
|
|
2778
2876
|
* 本地视频轨道上当前媒体处理链路的最终节点。
|
|
2779
2877
|
*/
|
|
2780
2878
|
/** @en
|
|
2781
2879
|
* @since
|
|
2782
2880
|
* <br>   *4.10.0*
|
|
2783
2881
|
*
|
|
2882
|
+
* @deprecated Legacy v1 pipe-mode API. For new extensions, use `useExtension` and `removeExtension`.
|
|
2883
|
+
*
|
|
2784
2884
|
* The destination of the current processing pipeline on the local video track.
|
|
2785
2885
|
*/
|
|
2786
2886
|
processorDestination: IBaseProcessor;
|
|
2887
|
+
/**
|
|
2888
|
+
* 使用类构造器在当前视频轨道上创建或复用一个视频插件代理。
|
|
2889
|
+
*
|
|
2890
|
+
* 同一个插件构造器在 destroy 前会始终返回同一个实例代理。
|
|
2891
|
+
*
|
|
2892
|
+
* @param extensionCtor 视频插件类构造器。
|
|
2893
|
+
* @param options 可选的插件初始化参数。
|
|
2894
|
+
*/
|
|
2895
|
+
/** @en
|
|
2896
|
+
* Creates or reuses a video extension proxy on the current video track using a class constructor.
|
|
2897
|
+
*
|
|
2898
|
+
* The same extension constructor always returns the same instance proxy until it is destroyed.
|
|
2899
|
+
*
|
|
2900
|
+
* @param extensionCtor The video extension class constructor.
|
|
2901
|
+
* @param options Optional extension initialization parameters.
|
|
2902
|
+
*/
|
|
2903
|
+
useExtension<T extends VideoExtensionConstructor>(extensionCtor: T, options?: {
|
|
2904
|
+
extensionOptions?: Record<string, unknown>;
|
|
2905
|
+
moduleURL?: string;
|
|
2906
|
+
registrationName?: string;
|
|
2907
|
+
}): InstanceType<T>;
|
|
2908
|
+
/**
|
|
2909
|
+
* 从本地视频轨道移除视频插件。
|
|
2910
|
+
*
|
|
2911
|
+
* @param extension 视频插件实例。
|
|
2912
|
+
* @returns 是否成功移除。
|
|
2913
|
+
*/
|
|
2914
|
+
/** @en
|
|
2915
|
+
* Removes a video extension from the local video track.
|
|
2916
|
+
*
|
|
2917
|
+
* @param extension The video extension instance.
|
|
2918
|
+
* @returns Whether the removal succeeded.
|
|
2919
|
+
*/
|
|
2920
|
+
removeExtension(extension: IVideoExtension): boolean;
|
|
2787
2921
|
/**
|
|
2788
2922
|
* @自从
|
|
2789
2923
|
* <br>   *4.17.0*
|
|
@@ -3148,6 +3282,54 @@ export declare interface IRemoteAudioTrack extends IRemoteTrack {
|
|
|
3148
3282
|
* The destination of the current processing pipeline on the remote audio track.
|
|
3149
3283
|
*/
|
|
3150
3284
|
processorDestination: IAudioProcessor;
|
|
3285
|
+
/**
|
|
3286
|
+
* 使用类构造器在当前远端音频轨道上创建或复用一个音频插件实例。
|
|
3287
|
+
*
|
|
3288
|
+
* @param extensionCtor 音频插件类构造器。
|
|
3289
|
+
*/
|
|
3290
|
+
/** @en
|
|
3291
|
+
* Creates or reuses an audio extension instance on the current remote audio track using a class constructor.
|
|
3292
|
+
*
|
|
3293
|
+
* @param extensionCtor The audio extension class constructor.
|
|
3294
|
+
*/
|
|
3295
|
+
useExtension<T extends IAudioExtension>(extensionCtor: AudioExtensionConstructor<T>): T;
|
|
3296
|
+
/**
|
|
3297
|
+
* 从远端音频轨道移除音频插件。
|
|
3298
|
+
*
|
|
3299
|
+
* @param extension 音频插件实例。
|
|
3300
|
+
* @returns 是否成功移除。
|
|
3301
|
+
*/
|
|
3302
|
+
/** @en
|
|
3303
|
+
* Removes an audio extension from the remote audio track.
|
|
3304
|
+
*
|
|
3305
|
+
* @param extension The audio extension instance.
|
|
3306
|
+
* @returns Whether the removal succeeded.
|
|
3307
|
+
*/
|
|
3308
|
+
removeExtension(extension: IAudioExtension): boolean;
|
|
3309
|
+
/**
|
|
3310
|
+
* 向当前音频扩展链路添加参考音轨。
|
|
3311
|
+
*
|
|
3312
|
+
* @param track 作为参考输入的本地或远端音频轨道。
|
|
3313
|
+
*/
|
|
3314
|
+
/** @en
|
|
3315
|
+
* Adds a reference track to the current audio extension pipeline.
|
|
3316
|
+
*
|
|
3317
|
+
* @param track The local or remote audio track used as the reference input.
|
|
3318
|
+
*/
|
|
3319
|
+
addReferenceTrack(track: ILocalAudioTrack | IRemoteAudioTrack): void;
|
|
3320
|
+
/**
|
|
3321
|
+
* 从当前音频扩展链路移除参考音轨。
|
|
3322
|
+
*
|
|
3323
|
+
* @param track 要移除的参考输入轨道。
|
|
3324
|
+
* @returns 是否成功移除。
|
|
3325
|
+
*/
|
|
3326
|
+
/** @en
|
|
3327
|
+
* Removes a reference track from the current audio extension pipeline.
|
|
3328
|
+
*
|
|
3329
|
+
* @param track The reference input track to remove.
|
|
3330
|
+
* @returns Whether the removal succeeded.
|
|
3331
|
+
*/
|
|
3332
|
+
removeReferenceTrack(track: ILocalAudioTrack | IRemoteAudioTrack): boolean;
|
|
3151
3333
|
}
|
|
3152
3334
|
|
|
3153
3335
|
/** @ignore */
|
|
@@ -3422,6 +3604,36 @@ export declare interface IRemoteVideoTrack extends IRemoteTrack {
|
|
|
3422
3604
|
* The destination of the current processing pipeline on the remote video track.
|
|
3423
3605
|
*/
|
|
3424
3606
|
processorDestination: IBaseProcessor;
|
|
3607
|
+
/**
|
|
3608
|
+
* 使用类构造器在当前视频轨道上创建或复用一个视频插件代理。
|
|
3609
|
+
*
|
|
3610
|
+
* @param extensionCtor 视频插件类构造器。
|
|
3611
|
+
* @param options 可选的插件初始化参数。
|
|
3612
|
+
*/
|
|
3613
|
+
/** @en
|
|
3614
|
+
* Creates or reuses a video extension proxy on the current video track using a class constructor.
|
|
3615
|
+
*
|
|
3616
|
+
* @param extensionCtor The video extension class constructor.
|
|
3617
|
+
* @param options Optional extension initialization parameters.
|
|
3618
|
+
*/
|
|
3619
|
+
useExtension<T extends VideoExtensionConstructor>(extensionCtor: T, options?: {
|
|
3620
|
+
extensionOptions?: Record<string, unknown>;
|
|
3621
|
+
moduleURL?: string;
|
|
3622
|
+
registrationName?: string;
|
|
3623
|
+
}): InstanceType<T>;
|
|
3624
|
+
/**
|
|
3625
|
+
* 从远端视频轨道移除视频插件。
|
|
3626
|
+
*
|
|
3627
|
+
* @param extension 视频插件实例。
|
|
3628
|
+
* @returns 是否成功移除。
|
|
3629
|
+
*/
|
|
3630
|
+
/** @en
|
|
3631
|
+
* Removes a video extension from the remote video track.
|
|
3632
|
+
*
|
|
3633
|
+
* @param extension The video extension instance.
|
|
3634
|
+
* @returns Whether the removal succeeded.
|
|
3635
|
+
*/
|
|
3636
|
+
removeExtension(extension: IVideoExtension): boolean;
|
|
3425
3637
|
/**
|
|
3426
3638
|
* 停止播放。
|
|
3427
3639
|
* @param isKeepLastFrame 是否保留最后一帧。
|
|
@@ -3576,6 +3788,10 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
|
|
|
3576
3788
|
_processorDestination: AudioProcessorDestination | undefined;
|
|
3577
3789
|
get processorDestination(): AudioProcessorDestination;
|
|
3578
3790
|
protected _getOriginVolumeLevel: boolean;
|
|
3791
|
+
/** Tracks whether this track is using the new UseExtension mode vs the old pipe mode */
|
|
3792
|
+
private _usePipeMode;
|
|
3793
|
+
private _useExtensionMode;
|
|
3794
|
+
private _extensionManager?;
|
|
3579
3795
|
get isPlaying(): boolean;
|
|
3580
3796
|
get __className__(): string;
|
|
3581
3797
|
constructor(track: MediaStreamTrack, encoderConfig?: AudioEncoderConfiguration, trackId?: string, getOriginVolumeLevel?: boolean);
|
|
@@ -3593,6 +3809,11 @@ export declare class LocalAudioTrack extends LocalTrack implements ILocalAudioTr
|
|
|
3593
3809
|
protected _updatePlayerSource(updateWebAudioSource?: boolean): void;
|
|
3594
3810
|
protected _updateOriginMediaStreamTrack(track: MediaStreamTrack, stopOldTrack: boolean): Promise<void>;
|
|
3595
3811
|
renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
|
|
3812
|
+
private _ensureExtensionManager;
|
|
3813
|
+
useExtension<T extends IAudioExtension>(ctor: AudioExtensionConstructor<T>, extensionOptions?: Record<string, unknown>): T;
|
|
3814
|
+
removeExtension(extension: IAudioExtension): boolean;
|
|
3815
|
+
addReferenceTrack(track: LocalAudioTrack | RemoteAudioTrack): void;
|
|
3816
|
+
removeReferenceTrack(track: LocalAudioTrack | RemoteAudioTrack): boolean;
|
|
3596
3817
|
pipe(processor: IAudioProcessor): IAudioProcessor;
|
|
3597
3818
|
unpipe(): void;
|
|
3598
3819
|
private bindProcessorDestinationEvents;
|
|
@@ -3772,6 +3993,10 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
3772
3993
|
protected _processorDestination: VideoProcessorDestination;
|
|
3773
3994
|
get processorDestination(): VideoProcessorDestination;
|
|
3774
3995
|
protected _processorContext: VideoProcessorContext;
|
|
3996
|
+
/** Tracks whether this track is using the new UseExtension mode vs the old pipe mode */
|
|
3997
|
+
private _usePipeMode;
|
|
3998
|
+
private _useExtensionMode;
|
|
3999
|
+
private _extensionManager?;
|
|
3775
4000
|
protected get processorContext(): VideoProcessorContext;
|
|
3776
4001
|
protected set processorContext(ctx: VideoProcessorContext);
|
|
3777
4002
|
get __className__(): string;
|
|
@@ -3800,6 +4025,13 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
3800
4025
|
updateBitrateFromProfile(): void;
|
|
3801
4026
|
getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
|
|
3802
4027
|
renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
|
|
4028
|
+
private _ensureVideoExtensionManager;
|
|
4029
|
+
useExtension<T extends VideoExtensionConstructor>(extensionCtor: T, options?: {
|
|
4030
|
+
extensionOptions?: Record<string, unknown>;
|
|
4031
|
+
moduleURL?: string;
|
|
4032
|
+
registrationName?: string;
|
|
4033
|
+
}): InstanceType<T>;
|
|
4034
|
+
removeExtension(extension: IVideoExtension): boolean;
|
|
3803
4035
|
pipe(processor: IBaseProcessor): IBaseProcessor;
|
|
3804
4036
|
unpipe(): void;
|
|
3805
4037
|
close(): void;
|
|
@@ -4214,6 +4446,10 @@ export declare class RemoteAudioTrack extends RemoteTrack implements IRemoteAudi
|
|
|
4214
4446
|
private _volume;
|
|
4215
4447
|
protected processorContext: AudioProcessorContext;
|
|
4216
4448
|
processorDestination: AudioProcessorDestination;
|
|
4449
|
+
/** Tracks whether this track is using the new UseExtension mode vs the old pipe mode */
|
|
4450
|
+
private _usePipeMode;
|
|
4451
|
+
private _useExtensionMode;
|
|
4452
|
+
private _extensionManager?;
|
|
4217
4453
|
private _played;
|
|
4218
4454
|
private _bypassWebAudio;
|
|
4219
4455
|
get isPlaying(): boolean;
|
|
@@ -4228,9 +4464,22 @@ export declare class RemoteAudioTrack extends RemoteTrack implements IRemoteAudi
|
|
|
4228
4464
|
getStats(): RemoteAudioTrackStats;
|
|
4229
4465
|
play(): void;
|
|
4230
4466
|
stop(): void;
|
|
4467
|
+
/**
|
|
4468
|
+
* 预渲染移交:join 时(UID 未知)音频已用临时 id 起播,这里把渲染层交给正式构造出来的 track。
|
|
4469
|
+
* 必须按后端分两路——预渲染恒走 <audio>,但本 track 可能配置成 WebAudio:
|
|
4470
|
+
* - <audio> 后端:把预渲染那个元素 re-key 到 getTrackId(),track 之后一律用自己的 id。
|
|
4471
|
+
* - WebAudio 后端:预渲染的 <audio> 是「错的后端」,拆掉它、改由 WebAudio source 接管
|
|
4472
|
+
* (参照 setAmplifiedVolume 的 audio-element→WebAudio 适配:stop 元素 + 启 _source)。
|
|
4473
|
+
*/
|
|
4474
|
+
_reusePreAudioElement(tempId: string, isPlaying: boolean): void;
|
|
4231
4475
|
_destroy(): void;
|
|
4232
4476
|
_isFreeze(): boolean;
|
|
4233
4477
|
protected _updatePlayerSource(updateWebAudioSource?: boolean): void;
|
|
4478
|
+
private _ensureAudioExtensionManager;
|
|
4479
|
+
useExtension<T extends IAudioExtension>(ctor: AudioExtensionConstructor<T>): T;
|
|
4480
|
+
removeExtension(extension: IAudioExtension): boolean;
|
|
4481
|
+
addReferenceTrack(track: LocalAudioTrack | RemoteAudioTrack): void;
|
|
4482
|
+
removeReferenceTrack(track: LocalAudioTrack | RemoteAudioTrack): boolean;
|
|
4234
4483
|
pipe(processor: IAudioProcessor): IAudioProcessor;
|
|
4235
4484
|
unpipe(): void;
|
|
4236
4485
|
private bindProcessorDestinationEvents;
|
|
@@ -4508,6 +4757,10 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
|
|
|
4508
4757
|
private _prePlayer?;
|
|
4509
4758
|
processorDestination: VideoProcessorDestination;
|
|
4510
4759
|
protected processorContext: VideoProcessorContext;
|
|
4760
|
+
/** Tracks whether this track is using the new UseExtension mode vs the old pipe mode */
|
|
4761
|
+
private _usePipeMode;
|
|
4762
|
+
private _useExtensionMode;
|
|
4763
|
+
private _extensionManager?;
|
|
4511
4764
|
get isPlaying(): boolean;
|
|
4512
4765
|
get __className__(): string;
|
|
4513
4766
|
constructor(track: MediaStreamTrack, userId: UID, uintId: number, store: SDKStore, player?: AgoraRTCPlayer | VideoPlayer);
|
|
@@ -4518,6 +4771,13 @@ export declare class RemoteVideoTrack extends RemoteTrack implements IRemoteVide
|
|
|
4518
4771
|
updateMediaStreamTrackResolution(): void;
|
|
4519
4772
|
protected _updatePlayerSource(): void;
|
|
4520
4773
|
getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
|
|
4774
|
+
private _ensureVideoExtensionManager;
|
|
4775
|
+
useExtension<T extends VideoExtensionConstructor>(extensionCtor: T, options?: {
|
|
4776
|
+
extensionOptions?: Record<string, unknown>;
|
|
4777
|
+
moduleURL?: string;
|
|
4778
|
+
registrationName?: string;
|
|
4779
|
+
}): InstanceType<T>;
|
|
4780
|
+
removeExtension(extension: IVideoExtension): boolean;
|
|
4521
4781
|
pipe(processor: IBaseProcessor): IBaseProcessor;
|
|
4522
4782
|
unpipe(): void;
|
|
4523
4783
|
private bindProcessorDestinationEvents;
|
|
@@ -5509,6 +5769,28 @@ export declare interface VideoEncoderConfiguration {
|
|
|
5509
5769
|
* @ignore
|
|
5510
5770
|
*/
|
|
5511
5771
|
scaleResolutionDownBy?: number;
|
|
5772
|
+
/**
|
|
5773
|
+
* 自动降分辨率时允许降到的最小宽度。
|
|
5774
|
+
*
|
|
5775
|
+
* 当 SDK 接管分辨率降档时,发送宽度不会低于这个值。
|
|
5776
|
+
*/
|
|
5777
|
+
/** @en
|
|
5778
|
+
* The minimum width allowed during automatic downscaling.
|
|
5779
|
+
*
|
|
5780
|
+
* When the SDK takes over resolution downscaling, the sending width will not go below this value.
|
|
5781
|
+
*/
|
|
5782
|
+
minDownscaleWidth?: number;
|
|
5783
|
+
/**
|
|
5784
|
+
* 自动降分辨率时允许降到的最小高度。
|
|
5785
|
+
*
|
|
5786
|
+
* 当 SDK 接管分辨率降档时,发送高度不会低于这个值。
|
|
5787
|
+
*/
|
|
5788
|
+
/** @en
|
|
5789
|
+
* The minimum height allowed during automatic downscaling.
|
|
5790
|
+
*
|
|
5791
|
+
* When the SDK takes over resolution downscaling, the sending height will not go below this value.
|
|
5792
|
+
*/
|
|
5793
|
+
minDownscaleHeight?: number;
|
|
5512
5794
|
}
|
|
5513
5795
|
|
|
5514
5796
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agora-js/media",
|
|
3
|
-
"version": "4.24.
|
|
3
|
+
"version": "4.24.6",
|
|
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,11 @@
|
|
|
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.
|
|
26
|
+
"@agora-js/shared": "4.24.6",
|
|
27
|
+
"@agora-js/report": "4.24.6",
|
|
28
28
|
"axios": "^1.16.1",
|
|
29
29
|
"agora-rte-extension": "^1.2.4",
|
|
30
|
+
"agora-rte-extension-ng": "^1.0.3",
|
|
30
31
|
"webrtc-adapter": "8.2.0"
|
|
31
32
|
}
|
|
32
33
|
}
|