trtc-sdk-v5 5.10.2-beta.15 → 5.10.2-beta.16
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/audioProcessor-wasm.js +1 -0
- package/assets/debug-dialog.js +2 -2
- package/index.d.ts +21 -38
- package/package.json +1 -1
- package/plugins/cdn-streaming/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/small-stream-auto-switcher/small-stream-auto-switcher.esm.js +1 -1
- package/plugins/small-stream-auto-switcher/small-stream-auto-switcher.umd.js +1 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-decoder/video-decoder.esm.js +1 -1
- package/plugins/video-decoder/video-decoder.umd.js +1 -1
- package/plugins/video-effect/basic-beauty/basic-beauty.esm.js +1 -1
- package/plugins/video-effect/basic-beauty/basic-beauty.umd.js +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/virtual-background/package.json +1 -1
- package/plugins/video-effect/virtual-background/virtual-background.esm.js +1 -1
- package/plugins/video-effect/virtual-background/virtual-background.umd.js +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/plugins/voice-changer/package.json +1 -1
- package/trtc.esm.js +59 -34
- package/trtc.js +17 -1
- package/assets/face_detection/blaze_face_short_range.tflite +0 -0
- package/assets/face_detection/vision_wasm_internal.gz +0 -0
- package/assets/face_detection/vision_wasm_internal.js +0 -20
- package/assets/face_detection/vision_wasm_nosimd_internal.gz +0 -0
- package/assets/face_detection/vision_wasm_nosimd_internal.js +0 -20
package/index.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ 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 { InitAudioProcessorOptions, UpdateAudioProcessorOptions } from 'trtc-js-sdk-core';
|
|
10
|
+
import { SmallStreamAutoSwitcher, SmallStreamAutoSwitcherOptions } from './plugins/small-stream-auto-switcher';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption, SmallStreamAutoSwitcherOptions };
|
|
14
|
+
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof CustomEncryption | typeof SmallStreamAutoSwitcher;
|
|
12
15
|
export declare const enum ExperimentalAPIFunction {
|
|
13
16
|
EnableAudioFrameEvent = 'enableAudioFrameEvent'
|
|
14
17
|
}
|
|
@@ -24,15 +27,18 @@ export declare type PluginStartOptionsMap = {
|
|
|
24
27
|
'Debug': undefined;
|
|
25
28
|
'CrossRoom': StartCrossRoomOption;
|
|
26
29
|
'CustomEncryption': EncryptionOptions;
|
|
30
|
+
'AudioProcessor': InitAudioProcessorOptions;
|
|
31
|
+
'SmallStreamAutoSwitcher': SmallStreamAutoSwitcherOptions;
|
|
27
32
|
};
|
|
28
33
|
|
|
29
34
|
export declare type PluginUpdateOptionsMap = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
'AudioMixer': UpdateAudioMixerOptions;
|
|
36
|
+
'CDNStreaming': CDNStreamingOptions;
|
|
37
|
+
'VirtualBackground': UpdateVirtualBackgroundOptions;
|
|
38
|
+
'Beauty': UpdateBeautyOptions;
|
|
39
|
+
'BasicBeauty': BasicBeautyOptions;
|
|
40
|
+
'CrossRoom': UpdateCrossRoomOption;
|
|
41
|
+
'AudioProcessor': UpdateAudioProcessorOptions;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
export declare type PluginStopOptionsMap = {
|
|
@@ -44,8 +50,9 @@ export declare type PluginStopOptionsMap = {
|
|
|
44
50
|
'Beauty': undefined;
|
|
45
51
|
'BasicBeauty': undefined;
|
|
46
52
|
'DeviceDetector': undefined;
|
|
47
|
-
'Debug': undefined;
|
|
48
53
|
'CrossRoom': StopCrossRoomOption | undefined;
|
|
54
|
+
'SmallStreamAutoSwitcher': undefined;
|
|
55
|
+
'AudioProcessor': undefined;
|
|
49
56
|
};
|
|
50
57
|
|
|
51
58
|
export declare class RtcError extends Error implements RTCErrorInterface {
|
|
@@ -103,7 +110,7 @@ export declare class RtcError extends Error implements RTCErrorInterface {
|
|
|
103
110
|
static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
|
|
104
111
|
}
|
|
105
112
|
|
|
106
|
-
export declare
|
|
113
|
+
export declare enum LOG_LEVEL {
|
|
107
114
|
/**
|
|
108
115
|
* 输出所有日志
|
|
109
116
|
*/
|
|
@@ -448,12 +455,12 @@ export declare const enum TRTCStreamType {
|
|
|
448
455
|
Main = 'main',
|
|
449
456
|
Sub = 'sub'
|
|
450
457
|
}
|
|
451
|
-
export declare
|
|
458
|
+
export declare enum TRTCDeviceType {
|
|
452
459
|
Camera = 'camera',
|
|
453
460
|
Microphone = 'microphone',
|
|
454
461
|
Speaker = 'speaker'
|
|
455
462
|
}
|
|
456
|
-
export declare
|
|
463
|
+
export declare enum TRTCDeviceAction {
|
|
457
464
|
Remove = 'remove',
|
|
458
465
|
Add = 'add',
|
|
459
466
|
Active = 'active'
|
|
@@ -642,7 +649,7 @@ export declare interface LocalStatistic {
|
|
|
642
649
|
videoType: TRTCVideoType;
|
|
643
650
|
}[];
|
|
644
651
|
}
|
|
645
|
-
export declare
|
|
652
|
+
export declare enum TRTCVideoType {
|
|
646
653
|
Big = 'big',
|
|
647
654
|
Small = 'small',
|
|
648
655
|
Sub = 'sub'
|
|
@@ -665,7 +672,7 @@ export declare interface VideoFrameConfig {
|
|
|
665
672
|
userId?: string;
|
|
666
673
|
streamType?: TRTCStreamType;
|
|
667
674
|
}
|
|
668
|
-
export declare
|
|
675
|
+
export declare enum AutoStartPluginName {
|
|
669
676
|
Debug = 'Debug'
|
|
670
677
|
}
|
|
671
678
|
|
|
@@ -1137,7 +1144,6 @@ export declare interface TRTCEventTypes {
|
|
|
1137
1144
|
[TRTCEvent.ERROR]: [RtcError];
|
|
1138
1145
|
[TRTCEvent.AUTOPLAY_FAILED]: [{
|
|
1139
1146
|
userId: string;
|
|
1140
|
-
mediaType: 'audio' | 'video' | 'screen';
|
|
1141
1147
|
resume: () => Promise<void>;
|
|
1142
1148
|
}];
|
|
1143
1149
|
[TRTCEvent.KICKED_OUT]: [{
|
|
@@ -1233,14 +1239,6 @@ export declare class TRTC {
|
|
|
1233
1239
|
*
|
|
1234
1240
|
* **Note:**
|
|
1235
1241
|
* - You must create a TRTC object first and call its methods and listen to its events to implement various functions required by the business.
|
|
1236
|
-
* @param {Array=} options.plugins List of registered plugins (optional).
|
|
1237
|
-
* @param {boolean=} [options.enableSEI=false] Whether to enable SEI sending and receiving function (optional). [Reference document](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#sendSEIMessage)
|
|
1238
|
-
* @param {string=} options.assetsPath The address of the static resource file that the plugin depends on (optional).
|
|
1239
|
-
* - Publish the node_modules/trtc-sdk-v5/assets directory to CDN or static resource server.
|
|
1240
|
-
* - Set the assetsPath parameter to the CDN address, for example: `TRTC.create({ assetsPath: 'https://xxx/assets' })`, the SDK will load the relevant resource files on demand.
|
|
1241
|
-
* @param {string=} options.userDefineRecordId is used to set the userDefineRecordId of cloud recording (optional).
|
|
1242
|
-
* - [Recommended value] The length is limited to 64 bytes, and only uppercase and lowercase English letters (a-zA-Z), numbers (0-9), underscores, and hyphens are allowed.
|
|
1243
|
-
* - [Reference document] [Cloud recording](https://trtc.io/document/45169?product=rtcengine&menulabel=serverfeaturesapis).
|
|
1244
1242
|
* @example
|
|
1245
1243
|
* // Create a TRTC object
|
|
1246
1244
|
* const trtc = TRTC.create();
|
|
@@ -2033,21 +2031,6 @@ export declare class TRTC {
|
|
|
2033
2031
|
* })
|
|
2034
2032
|
*/
|
|
2035
2033
|
sendCustomMessage(message: CustomMessageData): void;
|
|
2036
|
-
/**
|
|
2037
|
-
* call experimental API
|
|
2038
|
-
*
|
|
2039
|
-
* | API name | options | description |
|
|
2040
|
-
* | ------------------- | ----------------------------------------------- | ------------------------------------------------------------ |
|
|
2041
|
-
* | enableAudioFrameEvent | - enable type: `boolean` <br></br> - userId type: `string` <br></br> - sampleRate type: `number` <br></br> - channelCount type: `number` <br></br>| Configure the callback data of {@link module:EVENT.AUDIO_FRAME AUDIO_FRAME} event |
|
|
2042
|
-
* @private
|
|
2043
|
-
* @param {string} name
|
|
2044
|
-
* @param {object} options
|
|
2045
|
-
* @example
|
|
2046
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: true, userId: 'user_A'}) // 监听远端用户 user_A 的音频数据,默认 pcm 数据为 48kHZ,单声道
|
|
2047
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: true, userId: '*', sampleRate: 16000, channelCount: 2 }) // 监听所有远端音频数据,设置 pcm 数据为 16kHZ,双声道
|
|
2048
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: false, userId: '', sampleRate: 48000, channelCount: 1 }) // 取消监听本地麦克风数据
|
|
2049
|
-
*/
|
|
2050
|
-
callExperimentalAPI(name: ExperimentalAPIFunction, options: any): Promise<void>;
|
|
2051
2034
|
static EVENT: typeof TRTCEvent;
|
|
2052
2035
|
static ERROR_CODE: {
|
|
2053
2036
|
INVALID_PARAMETER: number;
|
package/package.json
CHANGED