trtc-sdk-v5 5.10.2-beta.5 → 5.10.2-beta.7
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 +25 -39
- 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-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 -32
- package/trtc.js +17 -1
package/index.d.ts
CHANGED
|
@@ -6,12 +6,11 @@ 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';
|
|
9
10
|
|
|
10
11
|
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption };
|
|
11
12
|
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof CustomEncryption;
|
|
12
|
-
|
|
13
|
-
EnableAudioFrameEvent = 'enableAudioFrameEvent'
|
|
14
|
-
}
|
|
13
|
+
|
|
15
14
|
export declare type PluginStartOptionsMap = {
|
|
16
15
|
'AudioMixer': AudioMixerOptions;
|
|
17
16
|
'AIDenoiser': AIDenoiserOptions;
|
|
@@ -24,28 +23,30 @@ export declare type PluginStartOptionsMap = {
|
|
|
24
23
|
'Debug': undefined;
|
|
25
24
|
'CrossRoom': StartCrossRoomOption;
|
|
26
25
|
'CustomEncryption': EncryptionOptions;
|
|
26
|
+
'AudioProcessor': InitAudioProcessorOptions;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export declare type PluginUpdateOptionsMap = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
'AudioMixer': UpdateAudioMixerOptions;
|
|
31
|
+
'CDNStreaming': CDNStreamingOptions;
|
|
32
|
+
'VirtualBackground': UpdateVirtualBackgroundOptions;
|
|
33
|
+
'Beauty': UpdateBeautyOptions;
|
|
34
|
+
'BasicBeauty': BasicBeautyOptions;
|
|
35
|
+
'CrossRoom': UpdateCrossRoomOption;
|
|
36
|
+
'AudioProcessor': UpdateAudioProcessorOptions;
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export declare type PluginStopOptionsMap = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
'AudioMixer': StopAudioMixerOptions;
|
|
41
|
+
'AIDenoiser': undefined;
|
|
42
|
+
'CDNStreaming': CDNStreamingOptions;
|
|
43
|
+
'VirtualBackground': undefined;
|
|
44
|
+
'Watermark': undefined;
|
|
45
|
+
'Beauty': undefined;
|
|
46
|
+
'BasicBeauty': undefined;
|
|
47
|
+
'DeviceDetector': undefined;
|
|
48
|
+
'CrossRoom': StopCrossRoomOption | undefined;
|
|
49
|
+
'AudioProcessor': undefined;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
export declare class RtcError extends Error implements RTCErrorInterface {
|
|
@@ -103,7 +104,7 @@ export declare class RtcError extends Error implements RTCErrorInterface {
|
|
|
103
104
|
static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
export declare
|
|
107
|
+
export declare enum LOG_LEVEL {
|
|
107
108
|
/**
|
|
108
109
|
* 输出所有日志
|
|
109
110
|
*/
|
|
@@ -448,12 +449,12 @@ export declare const enum TRTCStreamType {
|
|
|
448
449
|
Main = 'main',
|
|
449
450
|
Sub = 'sub'
|
|
450
451
|
}
|
|
451
|
-
export declare
|
|
452
|
+
export declare enum TRTCDeviceType {
|
|
452
453
|
Camera = 'camera',
|
|
453
454
|
Microphone = 'microphone',
|
|
454
455
|
Speaker = 'speaker'
|
|
455
456
|
}
|
|
456
|
-
export declare
|
|
457
|
+
export declare enum TRTCDeviceAction {
|
|
457
458
|
Remove = 'remove',
|
|
458
459
|
Add = 'add',
|
|
459
460
|
Active = 'active'
|
|
@@ -642,7 +643,7 @@ export declare interface LocalStatistic {
|
|
|
642
643
|
videoType: TRTCVideoType;
|
|
643
644
|
}[];
|
|
644
645
|
}
|
|
645
|
-
export declare
|
|
646
|
+
export declare enum TRTCVideoType {
|
|
646
647
|
Big = 'big',
|
|
647
648
|
Small = 'small',
|
|
648
649
|
Sub = 'sub'
|
|
@@ -665,7 +666,7 @@ export declare interface VideoFrameConfig {
|
|
|
665
666
|
userId?: string;
|
|
666
667
|
streamType?: TRTCStreamType;
|
|
667
668
|
}
|
|
668
|
-
export declare
|
|
669
|
+
export declare enum AutoStartPluginName {
|
|
669
670
|
Debug = 'Debug'
|
|
670
671
|
}
|
|
671
672
|
|
|
@@ -2024,21 +2025,6 @@ export declare class TRTC {
|
|
|
2024
2025
|
* })
|
|
2025
2026
|
*/
|
|
2026
2027
|
sendCustomMessage(message: CustomMessageData): void;
|
|
2027
|
-
/**
|
|
2028
|
-
* call experimental API
|
|
2029
|
-
*
|
|
2030
|
-
* | API name | options | description |
|
|
2031
|
-
* | ------------------- | ----------------------------------------------- | ------------------------------------------------------------ |
|
|
2032
|
-
* | 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 |
|
|
2033
|
-
* @private
|
|
2034
|
-
* @param {string} name
|
|
2035
|
-
* @param {object} options
|
|
2036
|
-
* @example
|
|
2037
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: true, userId: 'user_A'}) // 监听远端用户 user_A 的音频数据,默认 pcm 数据为 48kHZ,单声道
|
|
2038
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: true, userId: '*', sampleRate: 16000, channelCount: 2 }) // 监听所有远端音频数据,设置 pcm 数据为 16kHZ,双声道
|
|
2039
|
-
* await trtc.callExperimentalAPI('enableAudioFrameEvent', { enable: false, userId: '', sampleRate: 48000, channelCount: 1 }) // 取消监听本地麦克风数据
|
|
2040
|
-
*/
|
|
2041
|
-
callExperimentalAPI(name: ExperimentalAPIFunction, options: any): Promise<void>;
|
|
2042
2028
|
static EVENT: typeof TRTCEvent;
|
|
2043
2029
|
static ERROR_CODE: {
|
|
2044
2030
|
INVALID_PARAMETER: number;
|
package/package.json
CHANGED