trtc-sdk-v5 5.13.0-wasm.5 → 5.13.0-wasm.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/assets/denoiser-wasm-nosimd.js +1 -0
- package/assets/denoiser-wasm.js +1 -17
- package/assets/worker.js +2 -2
- package/index.d.ts +46 -36
- package/package.json +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/chorus/package.json +1 -1
- package/plugins/cross-room/package.json +1 -1
- package/plugins/custom-encryption/package.json +1 -1
- package/plugins/device-detector/package.json +1 -1
- package/plugins/small-stream-auto-switcher/package.json +1 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-effect/basic-beauty/package.json +1 -1
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/video-mixer/package.json +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/plugins/voice-changer/package.json +1 -1
- package/trtc.esm.js +38 -38
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Beauty, BeautyOptions, UpdateBeautyOptions } from './plugins/video-effe
|
|
|
6
6
|
import { BasicBeauty, BasicBeautyOptions } from './plugins/video-effect/basic-beauty';
|
|
7
7
|
import { CrossRoom, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption } from './plugins/cross-room';
|
|
8
8
|
import { CustomEncryption, EncryptionOptions } from './plugins/custom-encryption';
|
|
9
|
-
import { VideoMixerOptions, UpdateVideoMixerOptions, VideoMixer} from './plugins/video-effect/video-mixer'
|
|
9
|
+
import { VideoMixerOptions, UpdateVideoMixerOptions, VideoMixer } from './plugins/video-effect/video-mixer'
|
|
10
10
|
import { SmallStreamAutoSwitcher, SmallStreamAutoSwitcherOptions } from './plugins/small-stream-auto-switcher';
|
|
11
11
|
import { Chorus } from './plugins/chorus';
|
|
12
12
|
|
|
@@ -34,6 +34,7 @@ export declare type PluginStartOptionsMap = {
|
|
|
34
34
|
|
|
35
35
|
export declare type PluginUpdateOptionsMap = {
|
|
36
36
|
'AudioMixer': UpdateAudioMixerOptions;
|
|
37
|
+
'AIDenoiser': UpdateDenoiserOptions;
|
|
37
38
|
'CDNStreaming': CDNStreamingOptions;
|
|
38
39
|
'VirtualBackground': UpdateVirtualBackgroundOptions;
|
|
39
40
|
'Watermark': WatermarkOptions;
|
|
@@ -41,7 +42,7 @@ export declare type PluginUpdateOptionsMap = {
|
|
|
41
42
|
'Beauty': UpdateBeautyOptions;
|
|
42
43
|
'BasicBeauty': BasicBeautyOptions;
|
|
43
44
|
'CrossRoom': UpdateCrossRoomOption;
|
|
44
|
-
|
|
45
|
+
'AudioProcessor': UpdateAudioProcessorOptions;
|
|
45
46
|
'Debug': UpdateDebugOptions;
|
|
46
47
|
};
|
|
47
48
|
|
|
@@ -58,7 +59,7 @@ export declare type PluginStopOptionsMap = {
|
|
|
58
59
|
'Debug': undefined;
|
|
59
60
|
'CrossRoom': StopCrossRoomOption | undefined;
|
|
60
61
|
'SmallStreamAutoSwitcher': undefined;
|
|
61
|
-
|
|
62
|
+
'AudioProcessor': undefined;
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
export declare class RtcError extends Error implements RTCErrorInterface {
|
|
@@ -391,10 +392,10 @@ export interface PlayoutDelay {
|
|
|
391
392
|
}
|
|
392
393
|
|
|
393
394
|
export declare interface SwitchRoomConfig {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
395
|
+
roomId?: number,
|
|
396
|
+
strRoomId?: string;
|
|
397
|
+
privateMapKey?: string;
|
|
398
|
+
userSig: string;
|
|
398
399
|
}
|
|
399
400
|
|
|
400
401
|
export declare interface ScreenShareConfig {
|
|
@@ -649,6 +650,14 @@ export declare interface UpdateAudioMixerOptions {
|
|
|
649
650
|
seekFrom?: number;
|
|
650
651
|
operation?: 'pause' | 'resume' | 'stop';
|
|
651
652
|
}
|
|
653
|
+
export declare enum DenoiserMode {
|
|
654
|
+
NORMAL = 0,
|
|
655
|
+
FAR_FIELD_REDUCTION = 1
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export declare interface UpdateDenoiserOptions {
|
|
659
|
+
mode: DenoiserMode;
|
|
660
|
+
}
|
|
652
661
|
export declare interface StopAudioMixerOptions {
|
|
653
662
|
id: string;
|
|
654
663
|
}
|
|
@@ -657,9 +666,10 @@ export declare interface AIDenoiserOptions {
|
|
|
657
666
|
sdkAppId: number;
|
|
658
667
|
userId: string;
|
|
659
668
|
userSig: string;
|
|
669
|
+
mode?: DenoiserMode;
|
|
660
670
|
}
|
|
661
671
|
|
|
662
|
-
export declare interface InitAudioProcessorOptions {
|
|
672
|
+
export declare interface InitAudioProcessorOptions {
|
|
663
673
|
assetsPath?: string,
|
|
664
674
|
sdkAppId: number,
|
|
665
675
|
userId: string,
|
|
@@ -1320,11 +1330,11 @@ export declare interface TRTCEventTypes {
|
|
|
1320
1330
|
camera: PermissionState;
|
|
1321
1331
|
microphone: PermissionState;
|
|
1322
1332
|
}];
|
|
1323
|
-
[TRTCEvent.VIDEO_SIZE_CHANGED]: [{
|
|
1324
|
-
newWidth: number;
|
|
1325
|
-
newHeight: number;
|
|
1326
|
-
streamType: TRTCStreamType;
|
|
1327
|
-
userId: string;
|
|
1333
|
+
[TRTCEvent.VIDEO_SIZE_CHANGED]: [{
|
|
1334
|
+
newWidth: number;
|
|
1335
|
+
newHeight: number;
|
|
1336
|
+
streamType: TRTCStreamType;
|
|
1337
|
+
userId: string;
|
|
1328
1338
|
}];
|
|
1329
1339
|
[TRTCEvent.FIRST_VIDEO_FRAME]: [{
|
|
1330
1340
|
userId: string;
|
|
@@ -1491,10 +1501,10 @@ export declare class TRTC {
|
|
|
1491
1501
|
* await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR, { privateMapKey: 'your new privateMapKey' });
|
|
1492
1502
|
*/
|
|
1493
1503
|
switchRole(role: UserRole, option?: {
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1504
|
+
privateMapKey?: string;
|
|
1505
|
+
latencyLevel?: number;
|
|
1506
|
+
}): Promise<void>;
|
|
1507
|
+
/**
|
|
1498
1508
|
* Switch a video call room.<br>
|
|
1499
1509
|
* - Switch the video call room that the audience is watching in live scene. It is faster than exit old room and then entering the new room, and can optimize the opening time in live broadcast and other scenarios.
|
|
1500
1510
|
* - [Contact us](https://trtc.io/contact) to enable this API.
|
|
@@ -1530,25 +1540,25 @@ export declare class TRTC {
|
|
|
1530
1540
|
* roomId: 9999
|
|
1531
1541
|
* });
|
|
1532
1542
|
*/
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1543
|
+
switchRoom(params: SwitchRoomConfig): Promise<void>;
|
|
1544
|
+
/**
|
|
1545
|
+
* Destroy the TRTC instance <br/>
|
|
1546
|
+
*
|
|
1547
|
+
* After exiting the room, if the business side no longer needs to use trtc, you need to call this interface to destroy the trtc instance in time and release related resources.
|
|
1548
|
+
*
|
|
1549
|
+
* Note:
|
|
1550
|
+
* - The trtc instance after destruction cannot be used again.
|
|
1551
|
+
* - If you have entered the room, you need to call the {@link TRTC#exitRoom TRTC.exitRoom} interface to exit the room successfully before calling this interface to destroy trtc.
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* // When the call is over
|
|
1555
|
+
* await trtc.exitRoom();
|
|
1556
|
+
* // If the trtc is no longer needed, destroy the trtc and release the reference.
|
|
1557
|
+
* trtc.destroy();
|
|
1558
|
+
* trtc = null;
|
|
1559
|
+
* @throws {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
|
|
1560
|
+
* @memberof TRTC
|
|
1561
|
+
*/
|
|
1552
1562
|
destroy(): void;
|
|
1553
1563
|
/**
|
|
1554
1564
|
* Start collecting audio from the local microphone and publish it to the current room.
|
package/package.json
CHANGED