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