@zegocloud/zego-uikit-prebuilt 2.0.1 → 2.2.0

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
@@ -1,75 +1,75 @@
1
1
  declare type ZegoCloudRTCCore = {};
2
2
  declare type ZegoExpressEngine = {};
3
3
  declare interface ZegoUser {
4
- userID: string;
5
- userName?: string;
6
- setUserAvatar?: (avatar: string) => void;
4
+ userID: string;
5
+ userName?: string;
6
+ setUserAvatar?: (avatar: string) => void;
7
7
  }
8
8
  declare enum LiveRole {
9
- Host = "Host",
10
- Cohost = "Cohost",
11
- Audience = "Audience",
9
+ Host = "Host",
10
+ Cohost = "Cohost",
11
+ Audience = "Audience",
12
12
  }
13
13
  declare enum ScenarioModel {
14
- OneONoneCall = "OneONoneCall",
15
- GroupCall = "GroupCall",
16
- VideoConference = "VideoConference",
17
- LiveStreaming = "LiveStreaming",
14
+ OneONoneCall = "OneONoneCall",
15
+ GroupCall = "GroupCall",
16
+ VideoConference = "VideoConference",
17
+ LiveStreaming = "LiveStreaming",
18
18
  }
19
19
  declare enum VideoResolution {
20
- _180P = "180p",
21
- _360P = "360p",
22
- _480P = "480p",
23
- _720P = "720p",
20
+ _180P = "180p",
21
+ _360P = "360p",
22
+ _480P = "480p",
23
+ _720P = "720p",
24
24
  }
25
25
  export enum VideoMixinLayoutType {
26
- AutoLayout = 0,
26
+ AutoLayout = 0,
27
27
  }
28
28
  export enum VideoMixinOutputResolution {
29
- _180P = "180p",
30
- _360P = "360p",
31
- _540P = "540p",
32
- _720P = "720p",
33
- _1080P = "1080p",
29
+ _180P = "180p",
30
+ _360P = "360p",
31
+ _540P = "540p",
32
+ _720P = "720p",
33
+ _1080P = "1080p",
34
34
  }
35
35
  declare interface ScenarioConfig {
36
- [ScenarioModel.LiveStreaming]: {
37
- role: LiveRole;
38
- liveStreamingMode: LiveStreamingMode;
39
- enableVideoMixing?: boolean;
40
- // videoMixingLayout?: VideoMixinLayoutType;
41
- videoMixingOutputResolution?: VideoMixinOutputResolution;
42
- };
43
- [ScenarioModel.OneONoneCall]: {
44
- role: LiveRole;
45
- };
46
- [ScenarioModel.GroupCall]: {
47
- role: LiveRole;
48
- };
49
- [ScenarioModel.VideoConference]: {
50
- role: LiveRole;
51
- };
36
+ [ScenarioModel.LiveStreaming]: {
37
+ role: LiveRole;
38
+ liveStreamingMode: LiveStreamingMode;
39
+ enableVideoMixing?: boolean;
40
+ // videoMixingLayout?: VideoMixinLayoutType;
41
+ videoMixingOutputResolution?: VideoMixinOutputResolution;
42
+ };
43
+ [ScenarioModel.OneONoneCall]: {
44
+ role: LiveRole;
45
+ };
46
+ [ScenarioModel.GroupCall]: {
47
+ role: LiveRole;
48
+ };
49
+ [ScenarioModel.VideoConference]: {
50
+ role: LiveRole;
51
+ };
52
52
  }
53
53
  declare enum LiveStreamingMode {
54
- /**
55
- * @Deprecated StanderLive will be removed, please use LiveStreaming instead
56
- */
57
- StanderLive = "LiveStreaming",
58
- /**
59
- * @Deprecated PremiumLive will be removed, please use InteractiveLiveStreaming instead
60
- */
61
- PremiumLive = "InteractiveLiveStreaming",
62
- LiveStreaming = "LiveStreaming", // CDN
63
- InteractiveLiveStreaming = "InteractiveLiveStreaming", // L3
64
- RealTimeLive = "RealTimeLive", //RTC
54
+ /**
55
+ * @Deprecated StanderLive will be removed, please use LiveStreaming instead
56
+ */
57
+ StanderLive = "LiveStreaming",
58
+ /**
59
+ * @Deprecated PremiumLive will be removed, please use InteractiveLiveStreaming instead
60
+ */
61
+ PremiumLive = "InteractiveLiveStreaming",
62
+ LiveStreaming = "LiveStreaming", // CDN
63
+ InteractiveLiveStreaming = "InteractiveLiveStreaming", // L3
64
+ RealTimeLive = "RealTimeLive", //RTC
65
65
  }
66
66
 
67
67
  declare enum ConsoleLevel {
68
- Debug = "Debug",
69
- Info = "Info",
70
- Warning = "Warning",
71
- Error = "Error",
72
- None = "None",
68
+ Debug = "Debug",
69
+ Info = "Info",
70
+ Warning = "Warning",
71
+ Error = "Error",
72
+ None = "None",
73
73
  }
74
74
  declare interface InRoomMessageInfo {
75
75
  fromUser: ZegoUser
@@ -105,6 +105,8 @@ declare interface ZegoCloudRoomConfig {
105
105
  height?: number
106
106
  frameRate?: number
107
107
  maxBitRate?: number
108
+ // 2.2.0
109
+ onError?: (errorCode: number) => string | undefined // custom screen sharing failure pop-up text or pop-up
108
110
  } // Screen sharing settings, resolution settings
109
111
 
110
112
  // 1.2 Prejoin view
@@ -173,6 +175,13 @@ declare interface ZegoCloudRoomConfig {
173
175
  onReturnToHomeScreenClicked?: () => void // Callback for click return to home screen button.
174
176
  addInRoomMessageMessageAttributes?: () => any // add in room message message attribute. return custom message attribute.
175
177
  customMessageUI?: (msg: InRoomMessageInfo) => Element // Custom message UI. need return Element.
178
+ // 2.1.0
179
+ language?: ZegoUIKitLanguage // set language
180
+ // 2.2.0
181
+ leaveRoomDialogConfig?: {
182
+ titleText?: string, // custom leave room confrim dialog title
183
+ descriptionText?: string, // // custom leave room confrim dialog desctiption
184
+ }
176
185
  }
177
186
 
178
187
  export enum RightPanelExpandedType {
@@ -249,6 +258,8 @@ declare interface ZegoCallInvitationConfig {
249
258
  onIncomingCallTimeout?: (callID: string, caller: ZegoUser) => void;
250
259
  //When the call exceeds the fixed time, if there are still callees who do not respond, the caller will receive the callback, convert the internal data into corresponding data and throw it.
251
260
  onOutgoingCallTimeout?: (callID: string, callees: ZegoUser[]) => void;
261
+ // 2.1.0
262
+ language?: ZegoUIKitLanguage // set language
252
263
  }
253
264
 
254
265
  declare interface ZegoSignalingPluginNotificationConfig {
@@ -272,6 +283,11 @@ declare enum MessagePriority {
272
283
  Medium = 2,
273
284
  High = 3,
274
285
  }
286
+
287
+ export enum ZegoUIKitLanguage {
288
+ CHS = "zh-CN", // 中文
289
+ ENGLISH = "en-US", // 英文
290
+ }
275
291
  export declare class ZegoUIKitPrebuilt {
276
292
  static core: ZegoCloudRTCCore | undefined;
277
293
  static _instance: ZegoUIKitPrebuilt;
@@ -329,4 +345,5 @@ export declare class ZegoUIKitPrebuilt {
329
345
  sendInRoomCommand(command: string, toUserIDs: string[]): Promise<boolean>;
330
346
  sendInRoomCustomCommand(command: object, priority?: MessagePriority): Promise<ZegoSignalingInRoomCommandMessage>;
331
347
  hangUp(): void;
348
+ setLanguage(language: ZegoUIKitLanguage): void;
332
349
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zegocloud/zego-uikit-prebuilt",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "description": "zegocloud prebuilt meeting webrtc sdk",
5
5
  "keywords": [
6
6
  "sdk",
@@ -15,4 +15,4 @@
15
15
  "main": "./zego-uikit-prebuilt.js",
16
16
  "typings": "./index.d.ts",
17
17
  "access": "public"
18
- }
18
+ }