trtc-sdk-v5 5.10.0-wasm.1 → 5.10.0-wasm.3
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.js +1 -1
- package/assets/worker.js +8 -8
- package/index.d.ts +32 -7
- 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/device-detector.esm.js +8 -8
- package/plugins/device-detector/device-detector.umd.js +2 -2
- package/plugins/device-detector/package.json +1 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-decoder/video-decoder.esm.d.ts +20 -20
- 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/package.json +1 -1
- package/plugins/video-effect/beauty/beauty.esm.js +1 -1
- package/plugins/video-effect/beauty/beauty.umd.js +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/plugins/voice-changer/voice-changer.esm.js +1 -1
- package/plugins/voice-changer/voice-changer.umd.js +1 -1
- package/trtc.esm.js +44 -44
package/index.d.ts
CHANGED
|
@@ -6,10 +6,9 @@ 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 { EncryptionOptions } from './plugins/custom-encryption';
|
|
9
|
-
import { Debug, DebugOptions } from './plugins/debug';
|
|
10
9
|
|
|
11
|
-
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption
|
|
12
|
-
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty
|
|
10
|
+
export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption };
|
|
11
|
+
type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty;
|
|
13
12
|
|
|
14
13
|
export declare type PluginStartOptionsMap = {
|
|
15
14
|
'AudioMixer': AudioMixerOptions;
|
|
@@ -325,6 +324,7 @@ export declare interface LocalVideoConfig {
|
|
|
325
324
|
small?: keyof typeof videoProfileMap | VideoProfile | boolean;
|
|
326
325
|
qosPreference?: typeof TRTCType.QOS_PREFERENCE_SMOOTH | typeof TRTCType.QOS_PREFERENCE_CLEAR;
|
|
327
326
|
videoTrack?: MediaStreamTrack;
|
|
327
|
+
avoidCrop?: boolean;
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
export interface TurnServerOptions {
|
|
@@ -358,7 +358,14 @@ export declare interface EnterRoomConfig {
|
|
|
358
358
|
proxy?: ProxyServer | string;
|
|
359
359
|
scene?: Scene;
|
|
360
360
|
userDefineRecordId?: string;
|
|
361
|
+
playoutDelay?: PlayoutDelay;
|
|
361
362
|
}
|
|
363
|
+
|
|
364
|
+
export interface PlayoutDelay {
|
|
365
|
+
min: number;
|
|
366
|
+
max: number;
|
|
367
|
+
}
|
|
368
|
+
|
|
362
369
|
export declare interface ScreenShareConfig {
|
|
363
370
|
view?: string | HTMLElement | HTMLElement[] | null;
|
|
364
371
|
publish?: boolean;
|
|
@@ -393,6 +400,7 @@ export declare interface RemoteVideoConfig {
|
|
|
393
400
|
receiveWhenViewVisible?: boolean;
|
|
394
401
|
viewRoot?: HTMLElement;
|
|
395
402
|
canvasRender?: boolean;
|
|
403
|
+
poster?: string;
|
|
396
404
|
};
|
|
397
405
|
}
|
|
398
406
|
export declare interface StopRemoteVideoConfig {
|
|
@@ -869,6 +877,20 @@ export declare const TRTCEvent: {
|
|
|
869
877
|
* trtc.enableAudioVolumeEvaluation(1000);
|
|
870
878
|
*/
|
|
871
879
|
readonly AUDIO_VOLUME: 'audio-volume';
|
|
880
|
+
/**
|
|
881
|
+
* @since v5.8.3
|
|
882
|
+
* @description Microphone pcm event, the pcm data can be used to do ASR.<br>
|
|
883
|
+
* **Note**
|
|
884
|
+
* - When start listen this event, will get 40ms pcm(float32) from microphone every time.
|
|
885
|
+
* @default 'audio-frame'
|
|
886
|
+
* @memberof module:EVENT
|
|
887
|
+
* @example
|
|
888
|
+
* trtc.on(TRTC.EVENT.AUDIO_FRAME, event => {
|
|
889
|
+
* console.log(event.data)
|
|
890
|
+
* });
|
|
891
|
+
*
|
|
892
|
+
*/
|
|
893
|
+
readonly AUDIO_FRAME: 'audio-frame';
|
|
872
894
|
/**
|
|
873
895
|
* @description Network quality statistics data event, which starts to be counted after entering the room and triggers every two seconds. This data reflects the network quality of your local uplink and downlink.
|
|
874
896
|
* - The uplink network quality (uplinkNetworkQuality) refers to the network situation of uploading local streams (uplink connection network quality from SDK to Tencent Cloud)
|
|
@@ -1144,6 +1166,9 @@ export declare interface TRTCEventTypes {
|
|
|
1144
1166
|
volume: number;
|
|
1145
1167
|
}[];
|
|
1146
1168
|
}];
|
|
1169
|
+
[TRTCEvent.AUDIO_FRAME]: [{
|
|
1170
|
+
data: Float32Array;
|
|
1171
|
+
}];
|
|
1147
1172
|
[TRTCEvent.NETWORK_QUALITY]: [NetworkQuality];
|
|
1148
1173
|
[TRTCEvent.CONNECTION_STATE_CHANGED]: [{
|
|
1149
1174
|
prevState: ConnectionState;
|
|
@@ -1214,7 +1239,7 @@ export declare class TRTC {
|
|
|
1214
1239
|
static create(options?: TRTCOptions): TRTC;
|
|
1215
1240
|
/**
|
|
1216
1241
|
* @private
|
|
1217
|
-
*
|
|
1242
|
+
* register plugin <br>
|
|
1218
1243
|
*
|
|
1219
1244
|
* @example
|
|
1220
1245
|
* import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
|
|
@@ -1621,7 +1646,7 @@ export declare class TRTC {
|
|
|
1621
1646
|
* @param {QOS_PREFERENCE_SMOOTH|QOS_PREFERENCE_CLEAR} [config.option.qosPreference] - Set the video encoding strategy for weak networks. Smooth first ({@link module:TYPE.QOS_PREFERENCE_SMOOTH QOS_PREFERENCE_SMOOTH}) or Clear first(default) ({@link module:TYPE.QOS_PREFERENCE_CLEAR QOS_ PREFERENCE_SMOOTH})
|
|
1622
1647
|
* @param {HTMLElement} [config.option.captureElement] - Capture screen from the specified element of current tab. Available on Chrome 104+.
|
|
1623
1648
|
* @param {'current-tab' | 'tab' | 'window' | 'monitor'} [config.option.preferDisplaySurface='monitor'] - The prefer display surface for screen sharing. Available on Chrome 94+.
|
|
1624
|
-
* - The default is monitor, which means that monitor capture will be displayed first in the Screen Sharing Capture pre-checkbox
|
|
1649
|
+
* - The default is monitor, which means that monitor capture will be displayed first in the Screen Sharing Capture pre-checkbox.
|
|
1625
1650
|
* - If you fill in 'current-tab', the pre-checkbox will only show the current page.
|
|
1626
1651
|
* @throws
|
|
1627
1652
|
* - {@link module:ERROR_CODE.ENV_NOT_SUPPORTED ENV_NOT_SUPPORTED}
|
|
@@ -1848,7 +1873,7 @@ export declare class TRTC {
|
|
|
1848
1873
|
* @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
|
|
1849
1874
|
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's microphone)(default)
|
|
1850
1875
|
* - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing audio). Only works for local screen sharing audio because there is only one remote audioTrack, and there is no distinction between Main and Sub for remote audioTrack.
|
|
1851
|
-
* @param {boolean} [config.processed=false] - Whether to get the processed audioTrack. The processed audioTrack is the audioTrack after the SDK processes the audio frame, such as
|
|
1876
|
+
* @param {boolean} [config.processed=false] - Whether to get the processed audioTrack. The processed audioTrack is the audioTrack after the SDK processes the audio frame, such as AI Denoiser, gain, mix. The default value is false.
|
|
1852
1877
|
* @memberof TRTC
|
|
1853
1878
|
* @example
|
|
1854
1879
|
* // Version before v5.4.3
|
|
@@ -1874,7 +1899,7 @@ export declare class TRTC {
|
|
|
1874
1899
|
* @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
|
|
1875
1900
|
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's camera)(default)
|
|
1876
1901
|
* - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing)
|
|
1877
|
-
* @param {boolean} [config.processed=false] - Whether to get the processed videoTrack. The processed videoTrack is the videoTrack after the SDK processes the video frame, such as
|
|
1902
|
+
* @param {boolean} [config.processed=false] - Whether to get the processed videoTrack. The processed videoTrack is the videoTrack after the SDK processes the video frame, such as virtual background, mirror, watermark. The default value is false.
|
|
1878
1903
|
* @returns {MediaStreamTrack|null} Video track
|
|
1879
1904
|
* @memberof TRTC
|
|
1880
1905
|
* @example
|
package/package.json
CHANGED