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 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,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cdn-streaming",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x CDN streaming plugin",
5
5
  "main": "./cdn-streaming.esm.js",
6
6
  "module": "./cdn-streaming.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cross-room",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x Cross Room plugin",
5
5
  "main": "./cross-room.esm.js",
6
6
  "module": "./cross-room.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/custom-encryption",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "main": "./custom-encryption.esm.js",
5
5
  "module": "./custom-encryption.esm.js",
6
6
  "types": "./custom-encryption.esm.d.ts"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/device-detector",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x device detector plugin",
5
5
  "main": "./device-detector.esm.js",
6
6
  "module": "./device-detector.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/small-stream-auto-switcher",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "",
5
5
  "main": "./small-stream-auto-switcher.esm.js",
6
6
  "keywords": [],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/video-decoder",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "Video decoder plugin for TRTC",
5
5
  "main": "./video-decoder.esm.js",
6
6
  "module": "./video-decoder.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/basic-beauty",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x basic-beauty plugin",
5
5
  "main": "./basic-beauty.esm.js",
6
6
  "module": "./basic-beauty.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/beauty",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x beauty plugin",
5
5
  "main": "./beauty.esm.js",
6
6
  "module": "./beauty.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/video-mixer",
3
- "version": "5.11.2-beta.4",
3
+ "version": "5.11.2-beta.5",
4
4
  "description": "TRTC Web SDK 5.x videoMixer plugin",
5
5
  "main": "./video-mixer.esm.js",
6
6
  "module": "./video-mixer.esm.js",
@@ -1,23 +1,83 @@
1
+ import {
2
+ screenProfileMap,
3
+ VideoProfile,
4
+ videoProfileMap,
5
+ } from 'trtc-sdk-v5';
6
+
1
7
  export interface VideoMixerOptions {
2
- camera?: LayerOption;
3
- screen?: LayerOption;
4
- container?: {
5
- width: number,
6
- height: number
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?: number;
12
- y?: number;
13
- width?: number;
14
- height?: number;
15
- // hidden?: boolean
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): void;
20
- update(options: VideoMixerOptions): void;
79
+ start(options: VideoMixerOptions): Promise<MediaStreamVideoTrack>;
80
+ update(options: UpdateVideoMixerOptions): Promise<MediaStreamVideoTrack>;
21
81
  stop(): void;
22
82
  }
23
83