trtc-sdk-v5 5.10.2-beta.3 → 5.10.2-beta.5
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/index.d.ts +23 -6
- 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/watermark/package.json +1 -1
- package/plugins/voice-changer/package.json +1 -1
- package/trtc.esm.js +32 -32
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ import { CustomEncryption, EncryptionOptions } from './plugins/custom-encryption
|
|
|
9
9
|
|
|
10
10
|
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption };
|
|
11
11
|
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof CustomEncryption;
|
|
12
|
-
|
|
12
|
+
export declare const enum ExperimentalAPIFunction {
|
|
13
|
+
EnableAudioFrameEvent = 'enableAudioFrameEvent'
|
|
14
|
+
}
|
|
13
15
|
export declare type PluginStartOptionsMap = {
|
|
14
16
|
'AudioMixer': AudioMixerOptions;
|
|
15
17
|
'AIDenoiser': AIDenoiserOptions;
|
|
@@ -101,7 +103,7 @@ export declare class RtcError extends Error implements RTCErrorInterface {
|
|
|
101
103
|
static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
|
|
102
104
|
}
|
|
103
105
|
|
|
104
|
-
export declare enum LOG_LEVEL {
|
|
106
|
+
export declare const enum LOG_LEVEL {
|
|
105
107
|
/**
|
|
106
108
|
* 输出所有日志
|
|
107
109
|
*/
|
|
@@ -446,12 +448,12 @@ export declare const enum TRTCStreamType {
|
|
|
446
448
|
Main = 'main',
|
|
447
449
|
Sub = 'sub'
|
|
448
450
|
}
|
|
449
|
-
export declare enum TRTCDeviceType {
|
|
451
|
+
export declare const enum TRTCDeviceType {
|
|
450
452
|
Camera = 'camera',
|
|
451
453
|
Microphone = 'microphone',
|
|
452
454
|
Speaker = 'speaker'
|
|
453
455
|
}
|
|
454
|
-
export declare enum TRTCDeviceAction {
|
|
456
|
+
export declare const enum TRTCDeviceAction {
|
|
455
457
|
Remove = 'remove',
|
|
456
458
|
Add = 'add',
|
|
457
459
|
Active = 'active'
|
|
@@ -640,7 +642,7 @@ export declare interface LocalStatistic {
|
|
|
640
642
|
videoType: TRTCVideoType;
|
|
641
643
|
}[];
|
|
642
644
|
}
|
|
643
|
-
export declare enum TRTCVideoType {
|
|
645
|
+
export declare const enum TRTCVideoType {
|
|
644
646
|
Big = 'big',
|
|
645
647
|
Small = 'small',
|
|
646
648
|
Sub = 'sub'
|
|
@@ -663,7 +665,7 @@ export declare interface VideoFrameConfig {
|
|
|
663
665
|
userId?: string;
|
|
664
666
|
streamType?: TRTCStreamType;
|
|
665
667
|
}
|
|
666
|
-
export declare enum AutoStartPluginName {
|
|
668
|
+
export declare const enum AutoStartPluginName {
|
|
667
669
|
Debug = 'Debug'
|
|
668
670
|
}
|
|
669
671
|
|
|
@@ -2022,6 +2024,21 @@ export declare class TRTC {
|
|
|
2022
2024
|
* })
|
|
2023
2025
|
*/
|
|
2024
2026
|
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>;
|
|
2025
2042
|
static EVENT: typeof TRTCEvent;
|
|
2026
2043
|
static ERROR_CODE: {
|
|
2027
2044
|
INVALID_PARAMETER: number;
|
package/package.json
CHANGED