trtc-sdk-v5 5.10.2-beta.7 → 5.10.2-beta.8
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/debug-dialog.js +2 -2
- 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 +20 -0
- package/assets/face_detection/vision_wasm_nosimd_internal.gz +0 -0
- package/assets/face_detection/vision_wasm_nosimd_internal.js +20 -0
- package/index.d.ts +48 -25
- 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/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 +36 -61
- package/trtc.js +1 -17
- package/assets/audioProcessor-wasm.js +0 -1
package/index.d.ts
CHANGED
|
@@ -6,11 +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
9
|
|
|
11
10
|
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption };
|
|
12
11
|
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof CustomEncryption;
|
|
13
|
-
|
|
12
|
+
export declare const enum ExperimentalAPIFunction {
|
|
13
|
+
EnableAudioFrameEvent = 'enableAudioFrameEvent'
|
|
14
|
+
}
|
|
14
15
|
export declare type PluginStartOptionsMap = {
|
|
15
16
|
'AudioMixer': AudioMixerOptions;
|
|
16
17
|
'AIDenoiser': AIDenoiserOptions;
|
|
@@ -23,30 +24,28 @@ export declare type PluginStartOptionsMap = {
|
|
|
23
24
|
'Debug': undefined;
|
|
24
25
|
'CrossRoom': StartCrossRoomOption;
|
|
25
26
|
'CustomEncryption': EncryptionOptions;
|
|
26
|
-
'AudioProcessor': InitAudioProcessorOptions;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export declare type PluginUpdateOptionsMap = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'AudioProcessor': UpdateAudioProcessorOptions;
|
|
30
|
+
'AudioMixer': UpdateAudioMixerOptions;
|
|
31
|
+
'CDNStreaming': CDNStreamingOptions;
|
|
32
|
+
'VirtualBackground': UpdateVirtualBackgroundOptions;
|
|
33
|
+
'Beauty': UpdateBeautyOptions;
|
|
34
|
+
'BasicBeauty': BasicBeautyOptions;
|
|
35
|
+
'CrossRoom': UpdateCrossRoomOption;
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
export declare type PluginStopOptionsMap = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
'AudioMixer': StopAudioMixerOptions;
|
|
40
|
+
'AIDenoiser': undefined;
|
|
41
|
+
'CDNStreaming': CDNStreamingOptions;
|
|
42
|
+
'VirtualBackground': undefined;
|
|
43
|
+
'Watermark': undefined;
|
|
44
|
+
'Beauty': undefined;
|
|
45
|
+
'BasicBeauty': undefined;
|
|
46
|
+
'DeviceDetector': undefined;
|
|
47
|
+
'Debug': undefined;
|
|
48
|
+
'CrossRoom': StopCrossRoomOption | undefined;
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
export declare class RtcError extends Error implements RTCErrorInterface {
|
|
@@ -104,7 +103,7 @@ export declare class RtcError extends Error implements RTCErrorInterface {
|
|
|
104
103
|
static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
|
-
export declare enum LOG_LEVEL {
|
|
106
|
+
export declare const enum LOG_LEVEL {
|
|
108
107
|
/**
|
|
109
108
|
* 输出所有日志
|
|
110
109
|
*/
|
|
@@ -449,12 +448,12 @@ export declare const enum TRTCStreamType {
|
|
|
449
448
|
Main = 'main',
|
|
450
449
|
Sub = 'sub'
|
|
451
450
|
}
|
|
452
|
-
export declare enum TRTCDeviceType {
|
|
451
|
+
export declare const enum TRTCDeviceType {
|
|
453
452
|
Camera = 'camera',
|
|
454
453
|
Microphone = 'microphone',
|
|
455
454
|
Speaker = 'speaker'
|
|
456
455
|
}
|
|
457
|
-
export declare enum TRTCDeviceAction {
|
|
456
|
+
export declare const enum TRTCDeviceAction {
|
|
458
457
|
Remove = 'remove',
|
|
459
458
|
Add = 'add',
|
|
460
459
|
Active = 'active'
|
|
@@ -643,7 +642,7 @@ export declare interface LocalStatistic {
|
|
|
643
642
|
videoType: TRTCVideoType;
|
|
644
643
|
}[];
|
|
645
644
|
}
|
|
646
|
-
export declare enum TRTCVideoType {
|
|
645
|
+
export declare const enum TRTCVideoType {
|
|
647
646
|
Big = 'big',
|
|
648
647
|
Small = 'small',
|
|
649
648
|
Sub = 'sub'
|
|
@@ -666,7 +665,7 @@ export declare interface VideoFrameConfig {
|
|
|
666
665
|
userId?: string;
|
|
667
666
|
streamType?: TRTCStreamType;
|
|
668
667
|
}
|
|
669
|
-
export declare enum AutoStartPluginName {
|
|
668
|
+
export declare const enum AutoStartPluginName {
|
|
670
669
|
Debug = 'Debug'
|
|
671
670
|
}
|
|
672
671
|
|
|
@@ -1138,6 +1137,7 @@ export declare interface TRTCEventTypes {
|
|
|
1138
1137
|
[TRTCEvent.ERROR]: [RtcError];
|
|
1139
1138
|
[TRTCEvent.AUTOPLAY_FAILED]: [{
|
|
1140
1139
|
userId: string;
|
|
1140
|
+
mediaType: 'audio' | 'video' | 'screen';
|
|
1141
1141
|
resume: () => Promise<void>;
|
|
1142
1142
|
}];
|
|
1143
1143
|
[TRTCEvent.KICKED_OUT]: [{
|
|
@@ -1233,6 +1233,14 @@ export declare class TRTC {
|
|
|
1233
1233
|
*
|
|
1234
1234
|
* **Note:**
|
|
1235
1235
|
* - 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).
|
|
1236
1244
|
* @example
|
|
1237
1245
|
* // Create a TRTC object
|
|
1238
1246
|
* const trtc = TRTC.create();
|
|
@@ -2025,6 +2033,21 @@ export declare class TRTC {
|
|
|
2025
2033
|
* })
|
|
2026
2034
|
*/
|
|
2027
2035
|
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>;
|
|
2028
2051
|
static EVENT: typeof TRTCEvent;
|
|
2029
2052
|
static ERROR_CODE: {
|
|
2030
2053
|
INVALID_PARAMETER: number;
|
package/package.json
CHANGED