trtc-sdk-v5 5.11.2-beta.2 → 5.11.2-beta.4
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/index.d.ts +4 -0
- 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/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/video-mixer/package.json +1 -1
- package/plugins/video-effect/video-mixer/video-mixer.esm.d.ts +13 -71
- package/plugins/video-effect/video-mixer/video-mixer.esm.js +1 -1
- package/plugins/video-effect/video-mixer/video-mixer.umd.js +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 +26 -27
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -340,6 +340,8 @@ export declare interface LocalVideoConfig {
|
|
|
340
340
|
videoTrack?: MediaStreamTrack;
|
|
341
341
|
avoidCropping?: boolean;
|
|
342
342
|
rotation?: 0 | 90 | 180 | 270;
|
|
343
|
+
|
|
344
|
+
enableAutoSwitchWhenRecapturing?: boolean;
|
|
343
345
|
};
|
|
344
346
|
}
|
|
345
347
|
export interface TurnServerOptions {
|
|
@@ -441,6 +443,8 @@ export declare interface LocalAudioConfig {
|
|
|
441
443
|
echoCancellation?: boolean;
|
|
442
444
|
autoGainControl?: boolean;
|
|
443
445
|
noiseSuppression?: boolean;
|
|
446
|
+
|
|
447
|
+
enableAutoSwitchWhenRecapturing?: boolean;
|
|
444
448
|
};
|
|
445
449
|
}
|
|
446
450
|
export declare interface UpdateLocalAudioConfig extends LocalAudioConfig {
|
package/package.json
CHANGED
|
@@ -1,81 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
screenProfileMap,
|
|
3
|
-
VideoProfile,
|
|
4
|
-
videoProfileMap,
|
|
5
|
-
} from 'trtc-sdk-v5';
|
|
6
|
-
|
|
7
1
|
export interface VideoMixerOptions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
frameRate?: number; // 合流帧率
|
|
15
|
-
};
|
|
16
|
-
camera?: CameraSource[];
|
|
17
|
-
screen?: ScreenSource[];
|
|
18
|
-
text?: TextSource[];
|
|
19
|
-
video?: VideoSource[];
|
|
20
|
-
image?: ImageSource[];
|
|
2
|
+
camera?: LayerOption;
|
|
3
|
+
screen?: LayerOption;
|
|
4
|
+
container?: {
|
|
5
|
+
width: number,
|
|
6
|
+
height: number
|
|
7
|
+
}
|
|
21
8
|
}
|
|
22
|
-
// 更新时画布配置变为可选
|
|
23
|
-
export type UpdateVideoMixerOptions = VideoMixerOptions & {
|
|
24
|
-
canvasInfo?: {
|
|
25
|
-
canvasColor?: string;
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
frameRate?: number;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
9
|
|
|
32
|
-
export interface CameraSource {
|
|
33
|
-
// 参数与 startLocalVideo 对齐
|
|
34
|
-
id: string;
|
|
35
|
-
cameraId?: string;
|
|
36
|
-
videoTrack?: MediaStreamTrack;
|
|
37
|
-
profile?: keyof typeof videoProfileMap | VideoProfile;
|
|
38
|
-
layout: LayerOption;
|
|
39
|
-
}
|
|
40
|
-
export interface ScreenSource {
|
|
41
|
-
// 参数与 startScreenShare 对齐
|
|
42
|
-
id: string;
|
|
43
|
-
profile?: keyof typeof screenProfileMap | VideoProfile;
|
|
44
|
-
captureElement?: HTMLElement;
|
|
45
|
-
preferDisplaySurface?: 'current-tab' | 'tab' | 'window' | 'monitor';
|
|
46
|
-
layout: LayerOption;
|
|
47
|
-
}
|
|
48
|
-
export interface TextSource {
|
|
49
|
-
id: string;
|
|
50
|
-
content: string;
|
|
51
|
-
font?: string;
|
|
52
|
-
color?: string | CanvasGradient | CanvasPattern;
|
|
53
|
-
layout: LayerOption;
|
|
54
|
-
}
|
|
55
|
-
export interface VideoSource {
|
|
56
|
-
id: string;
|
|
57
|
-
url: string;
|
|
58
|
-
layout: LayerOption;
|
|
59
|
-
}
|
|
60
|
-
export interface ImageSource {
|
|
61
|
-
id: string;
|
|
62
|
-
url: string;
|
|
63
|
-
layout: LayerOption;
|
|
64
|
-
}
|
|
65
10
|
export interface LayerOption {
|
|
66
|
-
x
|
|
67
|
-
y
|
|
68
|
-
width
|
|
69
|
-
height
|
|
70
|
-
|
|
71
|
-
fillMode?: 'contain' | 'cover' | 'fill';
|
|
72
|
-
mirror?: boolean;
|
|
73
|
-
rotation?: 0 | 90 | 180 | 270;
|
|
11
|
+
x?: number;
|
|
12
|
+
y?: number;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
// hidden?: boolean
|
|
74
16
|
}
|
|
75
17
|
|
|
76
18
|
export declare class VideoMixer {
|
|
77
|
-
start(options: VideoMixerOptions):
|
|
78
|
-
update(options:
|
|
19
|
+
start(options: VideoMixerOptions): void;
|
|
20
|
+
update(options: VideoMixerOptions): void;
|
|
79
21
|
stop(): void;
|
|
80
22
|
}
|
|
81
23
|
|