@zegocloud/zego-uikit-prebuilt 1.6.0 → 1.6.2

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.
Files changed (64) hide show
  1. package/index.d.ts +255 -42
  2. package/package.json +2 -2
  3. package/zego-uikit-prebuilt.js +15 -15
  4. package/fingerGestureUtil.d.ts +0 -50
  5. package/model/index.d.ts +0 -283
  6. package/modules/index.d.ts +0 -128
  7. package/modules/soundmeter.d.ts +0 -18
  8. package/modules/tools/UserListManager.d.ts +0 -46
  9. package/modules/tools/ZimManager.d.ts +0 -54
  10. package/modules/tools/util.d.ts +0 -12
  11. package/view/components/mobile/zegoConfirm/index.d.ts +0 -17
  12. package/view/components/mobile/zegoToast/index.d.ts +0 -13
  13. package/view/components/zegoLoading/index.d.ts +0 -10
  14. package/view/components/zegoMedia/audio.d.ts +0 -18
  15. package/view/components/zegoMedia/video.d.ts +0 -34
  16. package/view/components/zegoModel/index.d.ts +0 -13
  17. package/view/components/zegoSelect/index.d.ts +0 -32
  18. package/view/components/zegoSetting/index.d.ts +0 -60
  19. package/view/components/zegoSetting/speakerFile.d.ts +0 -1
  20. package/view/components/zegoToast/index.d.ts +0 -13
  21. package/view/index.d.ts +0 -15
  22. package/view/pages/ZegoBrowserCheck/index.d.ts +0 -51
  23. package/view/pages/ZegoBrowserCheckMobile/components/ZegoLoading.d.ts +0 -6
  24. package/view/pages/ZegoBrowserCheckMobile/index.d.ts +0 -38
  25. package/view/pages/ZegoCallInvitation/callInvitationControl.d.ts +0 -16
  26. package/view/pages/ZegoCallInvitation/callInvitationDialog.d.ts +0 -13
  27. package/view/pages/ZegoCallInvitation/callInvitationWaiting.d.ts +0 -14
  28. package/view/pages/ZegoRejoinRoom/index.d.ts +0 -11
  29. package/view/pages/ZegoRoom/components/ZegoScreenSharingLayout.d.ts +0 -13
  30. package/view/pages/ZegoRoom/components/ZegoWhiteboardSharingLayout.d.ts +0 -16
  31. package/view/pages/ZegoRoom/components/zegoGridLayout.d.ts +0 -6
  32. package/view/pages/ZegoRoom/components/zegoMessage.d.ts +0 -21
  33. package/view/pages/ZegoRoom/components/zegoOne2One.d.ts +0 -15
  34. package/view/pages/ZegoRoom/components/zegoOthersVideo.d.ts +0 -8
  35. package/view/pages/ZegoRoom/components/zegoRoomInvite.d.ts +0 -8
  36. package/view/pages/ZegoRoom/components/zegoSidebarLayout.d.ts +0 -6
  37. package/view/pages/ZegoRoom/components/zegoTimer.d.ts +0 -9
  38. package/view/pages/ZegoRoom/components/zegoUserList.d.ts +0 -22
  39. package/view/pages/ZegoRoom/components/zegoVideoPlayer.d.ts +0 -23
  40. package/view/pages/ZegoRoom/components/zegoWhiteboard/ZegoWhiteboardTools.d.ts +0 -21
  41. package/view/pages/ZegoRoom/components/zegoWhiteboard/ZegoWhiteboardToolsGraphicsTooTips.d.ts +0 -19
  42. package/view/pages/ZegoRoom/components/zegoWhiteboard/ZegoWhiteboardToolsPenToolTips.d.ts +0 -18
  43. package/view/pages/ZegoRoom/components/zegoWhiteboard/ZegoWhiteboardToolsTextToolTips.d.ts +0 -20
  44. package/view/pages/ZegoRoom/index.d.ts +0 -109
  45. package/view/pages/ZegoRoomMobile/components/ZegoReconnect.d.ts +0 -6
  46. package/view/pages/ZegoRoomMobile/components/zegoGrid.d.ts +0 -5
  47. package/view/pages/ZegoRoomMobile/components/zegoLayout.d.ts +0 -13
  48. package/view/pages/ZegoRoomMobile/components/zegoManage.d.ts +0 -10
  49. package/view/pages/ZegoRoomMobile/components/zegoMessage.d.ts +0 -38
  50. package/view/pages/ZegoRoomMobile/components/zegoMore.d.ts +0 -10
  51. package/view/pages/ZegoRoomMobile/components/zegoOne2One.d.ts +0 -14
  52. package/view/pages/ZegoRoomMobile/components/zegoRoomInvite.d.ts +0 -8
  53. package/view/pages/ZegoRoomMobile/components/zegoScreen.d.ts +0 -9
  54. package/view/pages/ZegoRoomMobile/components/zegoSidebar.d.ts +0 -8
  55. package/view/pages/ZegoRoomMobile/components/zegoTimer.d.ts +0 -9
  56. package/view/pages/ZegoRoomMobile/components/zegoUserList.d.ts +0 -18
  57. package/view/pages/ZegoRoomMobile/components/zegoUserVideo.d.ts +0 -29
  58. package/view/pages/ZegoRoomMobile/components/zegoWhiteboard/ZegoWhiteboardTools.d.ts +0 -20
  59. package/view/pages/ZegoRoomMobile/components/zegoWhiteboard/ZegoWhiteboardToolsGraphicsTooTips.d.ts +0 -18
  60. package/view/pages/ZegoRoomMobile/components/zegoWhiteboard/ZegoWhiteboardToolsPenToolTips.d.ts +0 -17
  61. package/view/pages/ZegoRoomMobile/components/zegoWhiteboard/ZegoWhiteboardToolsTextToolTips.d.ts +0 -20
  62. package/view/pages/ZegoRoomMobile/components/zegoWhiteboard.d.ts +0 -15
  63. package/view/pages/ZegoRoomMobile/index.d.ts +0 -89
  64. package/view/pages/context/showManage.d.ts +0 -21
package/index.d.ts CHANGED
@@ -1,44 +1,257 @@
1
- import { Root } from "react-dom/client";
2
- import { ZegoSuperBoardManager } from "zego-superboard-web";
3
- import ZIM from "zego-zim-web";
4
- import { LiveRole, LiveStreamingMode, ScenarioModel, VideoResolution, ZegoCallInvitationConfig, ZegoCloudRoomConfig, ZegoInvitationType, ZegoSignalingPluginNotificationConfig, ZegoUser } from "./model/index";
5
- import { ZegoCloudRTCCore } from "./modules/index";
1
+ declare type ZegoCloudRTCCore = {};
2
+ declare interface ZegoUser {
3
+ userID: string;
4
+ userName?: string;
5
+ setUserAvatar?: (avatar: string) => void;
6
+ }
7
+ declare enum LiveRole {
8
+ Host = "Host",
9
+ Cohost = "Cohost",
10
+ Audience = "Audience",
11
+ }
12
+ declare enum ScenarioModel {
13
+ OneONoneCall = "OneONoneCall",
14
+ GroupCall = "GroupCall",
15
+ VideoConference = "VideoConference",
16
+ LiveStreaming = "LiveStreaming",
17
+ }
18
+ declare enum VideoResolution {
19
+ _180P = "180p",
20
+ _360P = "360p",
21
+ _480P = "480p",
22
+ _720P = "720p",
23
+ }
24
+
25
+ declare interface ScenarioConfig {
26
+ [ScenarioModel.LiveStreaming]: {
27
+ role: LiveRole;
28
+ liveStreamingMode: LiveStreamingMode;
29
+ };
30
+ [ScenarioModel.OneONoneCall]: {
31
+ role: LiveRole;
32
+ };
33
+ [ScenarioModel.GroupCall]: {
34
+ role: LiveRole;
35
+ };
36
+ [ScenarioModel.VideoConference]: {
37
+ role: LiveRole;
38
+ };
39
+ }
40
+ declare enum LiveStreamingMode {
41
+ /**
42
+ * @Deprecated StanderLive will be removed, please use LiveStreaming instead
43
+ */
44
+ StanderLive = "LiveStreaming",
45
+ /**
46
+ * @Deprecated PremiumLive will be removed, please use InteractiveLiveStreaming instead
47
+ */
48
+ PremiumLive = "InteractiveLiveStreaming",
49
+ LiveStreaming = "LiveStreaming", // CDN
50
+ InteractiveLiveStreaming = "InteractiveLiveStreaming", // L3
51
+ RealTimeLive = "RealTimeLive", //RTC
52
+ }
53
+ declare interface ZegoCloudRoomConfig {
54
+ container?: HTMLElement | undefined | null; // mount container
55
+ preJoinViewConfig?: {
56
+ title?: string; // Title setting, default enter Room
57
+ invitationLink?: string;
58
+ };
59
+ showPreJoinView?: boolean; // Whether to display the preview detection page, the default display
60
+ turnOnMicrophoneWhenJoining?: boolean; // Whether to turn on your own microphone, by default
61
+ turnOnCameraWhenJoining?: boolean; // Whether to turn on your own camera or not, it is turned on by default
62
+ showMyCameraToggleButton?: boolean; // Whether to display the button to control your own microphone, the default display
63
+ showMyMicrophoneToggleButton?: boolean; // Whether to display the button to control your own camera, the default display
64
+ showAudioVideoSettingsButton?: boolean; // Whether to display the audio and video settings button, the default display
65
+
66
+ showTextChat?: boolean; // Whether to enable chat, default enabled
67
+ showUserList?: boolean; //Whether to display the member list or not by default
68
+ lowerLeftNotification?: {
69
+ showUserJoinAndLeave?: boolean; //Whether to display members entering and leaving, default is not displayed
70
+ showTextChat?: boolean; // Whether to display unread messages or not by default
71
+ };
72
+ branding?: {
73
+ logoURL?: string; // call page logo
74
+ };
75
+ showLeavingView?: boolean; // The page after leaving the room, by default
76
+
77
+ maxUsers?: number; // The number of people in the room is 2 to 20, the default is 2
78
+ layout?: "Sidebar" | "Grid" | "Auto"; // Default Default
79
+
80
+ showNonVideoUser?: boolean; // whether to display users without video, default display
81
+ showOnlyAudioUser?: boolean; // Whether to display audio-only users, the default display
82
+
83
+ useFrontFacingCamera?: boolean;
84
+ onJoinRoom?: () => void; // User enters call page callback
85
+ onLeaveRoom?: () => void; // User exit call page callback
86
+ onUserJoin?: (user: ZegoUser[]) => void; // other users enter the callback
87
+ onUserLeave?: (user: ZegoUser[]) => void; // Other users leave the callback
88
+ sharedLinks?: { name?: string; url?: string }[]; // product link description
89
+ showScreenSharingButton?: boolean; // Whether to display the screen sharing button
90
+ scenario?: {
91
+ mode?: ScenarioModel; // Scenario selection
92
+ config?: ScenarioConfig[ScenarioModel]; // Corresponding scenario-specific configuration
93
+ };
94
+
95
+ showLayoutButton?: boolean; // Whether to display the layout switch button
96
+ showPinButton?: boolean; // Whether to display the pin button
97
+ onUserAvatarSetter?: (user: ZegoUser[]) => void; //Is it possible to set the user avatar callback
98
+ videoResolutionList?: VideoResolution[]; // video resolution list (the first one is used by default)
99
+ videoResolutionDefault?: VideoResolution; // Default video resolution
100
+ onLiveStart?: (user: ZegoUser) => void; //Live start callback
101
+ onLiveEnd?: (user: ZegoUser) => void; //Callback for live broadcast end
102
+ /**
103
+ * @deprecated facingMode will be removed
104
+ * */
105
+ facingMode?: "user" | "environment"; // front camera mode
106
+ /**
107
+ * @deprecated joinRoomCallback will be removed
108
+ * */
109
+ joinRoomCallback?: () => void; // join room success callback
110
+ /**
111
+ * @deprecated leaveRoomCallback will be removed
112
+ * */
113
+ leaveRoomCallback?: () => void; // exit room callback
114
+ /**
115
+ * @deprecated userUpdateCallback will be removed
116
+ * */
117
+ userUpdateCallback?: (
118
+ updateType: "DELETE" | "ADD",
119
+ userList: ZegoUser[]
120
+ ) => void; // user add/exit callback
121
+ /**
122
+ * @deprecated roomTimerDisplayed will be removed
123
+ * */
124
+ roomTimerDisplayed?: boolean; // Whether to display the countdown
125
+
126
+ whiteboardConfig?: {
127
+ showAddImageButton?: boolean; // The default is false, the file sharing function is enabled and the plug-in is introduced before it will take effect; otherwise, an error message will appear: "Failed to add image, this feature is not supported."
128
+ showCreateAndCloseButton?: boolean;
129
+ };
130
+ autoLeaveRoomWhenOnlySelfInRoom?: boolean; // When there is only one person left in the room, automatically exit the room
131
+ }
132
+
133
+ declare enum ZegoInvitationType {
134
+ VoiceCall = 0,
135
+ VideoCall,
136
+ }
137
+ declare interface ZegoCallInvitationConfig {
138
+ enableCustomCallInvitationWaitingPage?: boolean; // Whether to customize the call invitation waiting page, default false
139
+ enableCustomCallInvitationDialog?: boolean; // Whether to customize the call invitation pop-up window, the default is false
140
+ enableNotifyWhenAppRunningInBackgroundOrQuit?: boolean; // Notify users when the app is running in the background or the app is killed, default false
141
+ ringtoneConfig?: {
142
+ incomingCallUrl?: string; // ringtone when receiving
143
+ outgoingCallUrl?: string; // Outgoing ringtone
144
+ };
145
+ // Callback when entering the call waiting page, return the cancel method, if called, you can cancel the invitation
146
+ onWaitingPageWhenSending?: (
147
+ callType: ZegoInvitationType,
148
+ callees: ZegoUser[],
149
+ cancel: CancelCallInvitationFunc
150
+ ) => void;
151
+
152
+ // When the callee receives the invitation, the invitation pop-up window displays the callback, and returns the accept and refuse methods to bind the UI to the user
153
+ onConfirmDialogWhenReceiving?: (
154
+ callType: ZegoInvitationType,
155
+ caller: ZegoUser,
156
+ refuse: RefuseCallInvitationFunc,
157
+ accept: AcceptCallInvitationFunc,
158
+ data: string
159
+ ) => void;
160
+
161
+ // Callback before entering the room after accepting the invitation, used to set the room configuration, automatically join the room internally, and the room configuration is based on the default ZegoInvitationType
162
+ onSetRoomConfigBeforeJoining?: (
163
+ callType: ZegoInvitationType
164
+ ) => ZegoCloudRoomConfig;
165
+
166
+ // Call invitation end callback (call rejected, timeout, busy, user exits the room where the call was invited, etc.)
167
+ onCallInvitationEnded?: (
168
+ reason: CallInvitationEndReason,
169
+ data: string
170
+ ) => void;
171
+
172
+ // After Prebuilt receives the call invitation, it converts the internal data into corresponding data and throws
173
+ onIncomingCallReceived?: (
174
+ callID: string,
175
+ caller: ZegoUser,
176
+ callType: ZegoInvitationType,
177
+ callees: ZegoUser[]
178
+ ) => void;
179
+ // When the caller cancels the call, convert the internal data to the corresponding data and throw it.
180
+ onIncomingCallCanceled?: (callID: string, caller: ZegoUser) => void;
181
+ // After the callee accepts the invitation, the caller will receive the callback, convert the internal data into corresponding data and throw it.
182
+ onOutgoingCallAccepted?: (callID: string, callee: ZegoUser) => void;
183
+ // When the callee is in a call and rejects the invitation, the caller will receive this callback, convert the internal data into corresponding data and throw it.
184
+ onOutgoingCallRejected?: (callID: string, callee: ZegoUser) => void;
185
+ // When the callee voluntarily refuses the call, the caller will receive this callback, convert the internal data into corresponding data and throw it.
186
+ onOutgoingCallDeclined?: (callID: string, callee: ZegoUser) => void;
187
+ //When the callee fails to respond to the invitation after a timeout, the callee will receive the callback, convert the internal data into corresponding data and throw it.
188
+ onIncomingCallTimeout?: (callID: string, caller: ZegoUser) => void;
189
+ //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.
190
+ onOutgoingCallTimeout?: (callID: string, callees: ZegoUser[]) => void;
191
+ }
192
+
193
+ declare interface ZegoSignalingPluginNotificationConfig {
194
+ resourcesID?: string;
195
+ title?: string;
196
+ message?: string;
197
+ }
198
+
199
+ declare enum CallInvitationEndReason {
200
+ Declined = "Declined",
201
+ Timeout = "Timeout",
202
+ Canceled = "Canceled",
203
+ Busy = "Busy",
204
+ LeaveRoom = "LeaveRoom",
205
+ }
206
+ declare type CancelCallInvitationFunc = (data?: string) => void; // cancel invitation
207
+ declare type AcceptCallInvitationFunc = (data?: string) => void; // accept invitation
208
+ declare type RefuseCallInvitationFunc = (data?: string) => void; // reject invitation
209
+
6
210
  export declare class ZegoUIKitPrebuilt {
7
- static core: ZegoCloudRTCCore | undefined;
8
- static _instance: ZegoUIKitPrebuilt;
9
- static Host: LiveRole;
10
- static Cohost: LiveRole;
11
- static Audience: LiveRole;
12
- static OneONoneCall: ScenarioModel;
13
- static GroupCall: ScenarioModel;
14
- static LiveStreaming: ScenarioModel;
15
- static VideoConference: ScenarioModel;
16
- static VideoResolution_180P: VideoResolution;
17
- static VideoResolution_360P: VideoResolution;
18
- static VideoResolution_480P: VideoResolution;
19
- static VideoResolution_720P: VideoResolution;
20
- static LiveStreamingMode: typeof LiveStreamingMode;
21
- static InvitationTypeVoiceCall: ZegoInvitationType;
22
- static InvitationTypeVideoCall: ZegoInvitationType;
23
- private hasJoinedRoom;
24
- root: Root | undefined;
25
- static generateKitTokenForTest(appID: number, serverSecret: string, roomID: string, userID: string, userName?: string, ExpirationSeconds?: number): string;
26
- static generateKitTokenForProduction(appID: number, token: string, roomID: string, userID: string, userName?: string): string;
27
- static create(kitToken: string): ZegoUIKitPrebuilt;
28
- addPlugins(plugins?: {
29
- ZegoSuperBoardManager?: typeof ZegoSuperBoardManager;
30
- ZIM?: typeof ZIM;
31
- }): void;
32
- joinRoom(roomConfig?: ZegoCloudRoomConfig): void;
33
- destroy(): void;
34
- setCallInvitationConfig(config?: ZegoCallInvitationConfig): void;
35
- sendCallInvitation(params: {
36
- callees: ZegoUser[];
37
- callType: ZegoInvitationType;
38
- timeout?: number;
39
- data?: string;
40
- notificationConfig?: ZegoSignalingPluginNotificationConfig;
41
- }): Promise<{
42
- errorInvitees: ZegoUser[];
43
- }>;
211
+ static core: ZegoCloudRTCCore | undefined;
212
+ static _instance: ZegoUIKitPrebuilt;
213
+ static Host: LiveRole;
214
+ static Cohost: LiveRole;
215
+ static Audience: LiveRole;
216
+ static OneONoneCall: ScenarioModel;
217
+ static GroupCall: ScenarioModel;
218
+ static LiveStreaming: ScenarioModel;
219
+ static VideoConference: ScenarioModel;
220
+ static VideoResolution_180P: VideoResolution;
221
+ static VideoResolution_360P: VideoResolution;
222
+ static VideoResolution_480P: VideoResolution;
223
+ static VideoResolution_720P: VideoResolution;
224
+ static LiveStreamingMode: typeof LiveStreamingMode;
225
+ static InvitationTypeVoiceCall: ZegoInvitationType;
226
+ static InvitationTypeVideoCall: ZegoInvitationType;
227
+ private hasJoinedRoom;
228
+ static generateKitTokenForTest(
229
+ appID: number,
230
+ serverSecret: string,
231
+ roomID: string,
232
+ userID: string,
233
+ userName?: string,
234
+ ExpirationSeconds?: number
235
+ ): string;
236
+ static generateKitTokenForProduction(
237
+ appID: number,
238
+ token: string,
239
+ roomID: string,
240
+ userID: string,
241
+ userName?: string
242
+ ): string;
243
+ static create(kitToken: string): ZegoUIKitPrebuilt;
244
+ addPlugins(plugins?: { ZegoSuperBoardManager?: any; ZIM?: any }): void;
245
+ joinRoom(roomConfig?: ZegoCloudRoomConfig): void;
246
+ destroy(): void;
247
+ setCallInvitationConfig(config?: ZegoCallInvitationConfig): void;
248
+ sendCallInvitation(params: {
249
+ callees: ZegoUser[];
250
+ callType: ZegoInvitationType;
251
+ timeout?: number;
252
+ data?: string;
253
+ notificationConfig?: ZegoSignalingPluginNotificationConfig;
254
+ }): Promise<{
255
+ errorInvitees: ZegoUser[];
256
+ }>;
44
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zegocloud/zego-uikit-prebuilt",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
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": "./sdk/index.d.ts",
17
17
  "access": "public"
18
- }
18
+ }