@100mslive/roomkit-react 0.3.24-alpha.0 → 0.3.24-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/dist/Theme/ThemeProvider.d.ts +1 -0
  2. package/dist/index.cjs.css +2 -2
  3. package/dist/index.cjs.css.map +1 -1
  4. package/dist/index.cjs.js +34109 -37488
  5. package/dist/index.cjs.js.map +4 -4
  6. package/dist/index.css +2 -2
  7. package/dist/index.css.map +1 -1
  8. package/dist/index.js +36389 -73
  9. package/dist/index.js.map +4 -4
  10. package/dist/meta.cjs.json +5568 -5617
  11. package/dist/meta.esbuild.json +6032 -8744
  12. package/package.json +7 -7
  13. package/src/Prebuilt/App.tsx +3 -6
  14. package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
  15. package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +11 -4
  16. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +3 -3
  17. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +3 -0
  18. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -2
  19. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +30 -43
  20. package/src/Prebuilt/layouts/HLSView.jsx +2 -3
  21. package/src/Prebuilt/layouts/SidePane.tsx +6 -12
  22. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +64 -69
  23. package/src/Theme/ThemeProvider.tsx +9 -3
  24. package/dist/ConferenceScreen-CLPW3BGP.css +0 -2780
  25. package/dist/ConferenceScreen-CLPW3BGP.css.map +0 -7
  26. package/dist/ConferenceScreen-M6RBPTAJ.js +0 -1774
  27. package/dist/ConferenceScreen-M6RBPTAJ.js.map +0 -7
  28. package/dist/EmbedView-DDSO7ZCV.js +0 -17
  29. package/dist/EmbedView-DDSO7ZCV.js.map +0 -7
  30. package/dist/EmbedView-HGIUZHKA.css +0 -2780
  31. package/dist/EmbedView-HGIUZHKA.css.map +0 -7
  32. package/dist/EmojiReaction-23JDKJD4.js +0 -11
  33. package/dist/EmojiReaction-23JDKJD4.js.map +0 -7
  34. package/dist/HLSView-OW77EAAO.css +0 -2780
  35. package/dist/HLSView-OW77EAAO.css.map +0 -7
  36. package/dist/HLSView-Q6GEB3UM.js +0 -1666
  37. package/dist/HLSView-Q6GEB3UM.js.map +0 -7
  38. package/dist/LeaveScreen-BYTE73MT.js +0 -556
  39. package/dist/LeaveScreen-BYTE73MT.js.map +0 -7
  40. package/dist/LeaveScreen-P7AATEIF.css +0 -2780
  41. package/dist/LeaveScreen-P7AATEIF.css.map +0 -7
  42. package/dist/MoreSettings-LV5X2U6K.css +0 -2780
  43. package/dist/MoreSettings-LV5X2U6K.css.map +0 -7
  44. package/dist/MoreSettings-WSHMMNOC.js +0 -16
  45. package/dist/MoreSettings-WSHMMNOC.js.map +0 -7
  46. package/dist/PDFView-RIPRIIH6.css +0 -2780
  47. package/dist/PDFView-RIPRIIH6.css.map +0 -7
  48. package/dist/PDFView-ZFSG2ESE.js +0 -84
  49. package/dist/PDFView-ZFSG2ESE.js.map +0 -7
  50. package/dist/Polls-QWW5LTTB.js +0 -1584
  51. package/dist/Polls-QWW5LTTB.js.map +0 -7
  52. package/dist/Polls-ULYGUPPF.css +0 -2780
  53. package/dist/Polls-ULYGUPPF.css.map +0 -7
  54. package/dist/RaiseHand-K7NFLH7H.js +0 -10
  55. package/dist/RaiseHand-K7NFLH7H.js.map +0 -7
  56. package/dist/RoleProminence-235AFT7F.js +0 -116
  57. package/dist/RoleProminence-235AFT7F.js.map +0 -7
  58. package/dist/RoleProminence-6XN3POS5.css +0 -2780
  59. package/dist/RoleProminence-6XN3POS5.css.map +0 -7
  60. package/dist/RoomDetailsPane-O5TFMTPI.css +0 -2780
  61. package/dist/RoomDetailsPane-O5TFMTPI.css.map +0 -7
  62. package/dist/RoomDetailsPane-RF3D3TDR.js +0 -53
  63. package/dist/RoomDetailsPane-RF3D3TDR.js.map +0 -7
  64. package/dist/ScreenshareLayout-KNEB3AJJ.css +0 -2780
  65. package/dist/ScreenshareLayout-KNEB3AJJ.css.map +0 -7
  66. package/dist/ScreenshareLayout-PSQMS3NC.js +0 -358
  67. package/dist/ScreenshareLayout-PSQMS3NC.js.map +0 -7
  68. package/dist/SidePaneTabs-I6DECE5R.css +0 -2780
  69. package/dist/SidePaneTabs-I6DECE5R.css.map +0 -7
  70. package/dist/SidePaneTabs-NXHBI2JB.js +0 -1354
  71. package/dist/SidePaneTabs-NXHBI2JB.js.map +0 -7
  72. package/dist/VBPicker-2CQ3IIO7.js +0 -322
  73. package/dist/VBPicker-2CQ3IIO7.js.map +0 -7
  74. package/dist/VBPicker-DCNYGO23.css +0 -2780
  75. package/dist/VBPicker-DCNYGO23.css.map +0 -7
  76. package/dist/WaitingView-NZIUOXBI.js +0 -10
  77. package/dist/WaitingView-NZIUOXBI.js.map +0 -7
  78. package/dist/WhiteboardLayout-4YLFM3EY.js +0 -96
  79. package/dist/WhiteboardLayout-4YLFM3EY.js.map +0 -7
  80. package/dist/WhiteboardLayout-JUOBDFKY.css +0 -2780
  81. package/dist/WhiteboardLayout-JUOBDFKY.css.map +0 -7
  82. package/dist/chunk-3C7IESSI.js +0 -254
  83. package/dist/chunk-3C7IESSI.js.map +0 -7
  84. package/dist/chunk-7FD3VT6Q.js +0 -114
  85. package/dist/chunk-7FD3VT6Q.js.map +0 -7
  86. package/dist/chunk-AHI4HCY3.js +0 -62
  87. package/dist/chunk-AHI4HCY3.js.map +0 -7
  88. package/dist/chunk-BGSYLCVD.js +0 -6337
  89. package/dist/chunk-BGSYLCVD.js.map +0 -7
  90. package/dist/chunk-DANANDDE.js +0 -418
  91. package/dist/chunk-DANANDDE.js.map +0 -7
  92. package/dist/chunk-ETRNLEWQ.js +0 -2658
  93. package/dist/chunk-ETRNLEWQ.js.map +0 -7
  94. package/dist/chunk-EWPHJFZJ.js +0 -487
  95. package/dist/chunk-EWPHJFZJ.js.map +0 -7
  96. package/dist/chunk-F63YJBI4.js +0 -98
  97. package/dist/chunk-F63YJBI4.js.map +0 -7
  98. package/dist/chunk-GLAJUP3O.js +0 -576
  99. package/dist/chunk-GLAJUP3O.js.map +0 -7
  100. package/dist/chunk-GOXRTCTY.js +0 -90
  101. package/dist/chunk-GOXRTCTY.js.map +0 -7
  102. package/dist/chunk-HMCBZI3A.js +0 -59
  103. package/dist/chunk-HMCBZI3A.js.map +0 -7
  104. package/dist/chunk-HVYTC3PX.js +0 -171
  105. package/dist/chunk-HVYTC3PX.js.map +0 -7
  106. package/dist/chunk-LJVP6AWF.js +0 -262
  107. package/dist/chunk-LJVP6AWF.js.map +0 -7
  108. package/dist/chunk-LXJGCRKM.js +0 -30
  109. package/dist/chunk-LXJGCRKM.js.map +0 -7
  110. package/dist/chunk-MG3UGW66.js +0 -16800
  111. package/dist/chunk-MG3UGW66.js.map +0 -7
  112. package/dist/chunk-MUKUP7JU.js +0 -161
  113. package/dist/chunk-MUKUP7JU.js.map +0 -7
  114. package/dist/chunk-OV6MVDCL.js +0 -41
  115. package/dist/chunk-OV6MVDCL.js.map +0 -7
  116. package/dist/chunk-P6NV2XO4.js +0 -178
  117. package/dist/chunk-P6NV2XO4.js.map +0 -7
  118. package/dist/chunk-REL3HBSD.js +0 -71
  119. package/dist/chunk-REL3HBSD.js.map +0 -7
  120. package/dist/chunk-U4SQBXPZ.js +0 -830
  121. package/dist/chunk-U4SQBXPZ.js.map +0 -7
  122. package/dist/chunk-YEL5ZTFU.js +0 -136
  123. package/dist/chunk-YEL5ZTFU.js.map +0 -7
@@ -1,418 +0,0 @@
1
- import {
2
- isScreenshareSupported,
3
- useRoomLayout,
4
- useRoomLayoutConferencingScreen,
5
- useSetAppDataByKey
6
- } from "./chunk-BGSYLCVD.js";
7
- import {
8
- APP_DATA,
9
- CHAT_SELECTOR,
10
- RTMP_RECORD_DEFAULT_RESOLUTION,
11
- __async,
12
- __spreadProps,
13
- __spreadValues,
14
- config,
15
- init_define_process_env,
16
- styled
17
- } from "./chunk-GLAJUP3O.js";
18
-
19
- // src/Dropdown/Dropdown.tsx
20
- init_define_process_env();
21
- import {
22
- CheckboxItem,
23
- Content,
24
- Group,
25
- Item,
26
- ItemIndicator,
27
- Label,
28
- Portal,
29
- Root,
30
- Separator,
31
- Sub,
32
- SubContent,
33
- SubTrigger,
34
- Trigger
35
- } from "@radix-ui/react-dropdown-menu";
36
- var DropdownRoot = styled(Root, {});
37
- var DropdownTrigger = styled(Trigger, {
38
- cursor: "pointer",
39
- appearance: "none !important",
40
- '&[data-state="open"]': {
41
- backgroundColor: "$surface_bright"
42
- },
43
- "&:focus": {
44
- outline: "none"
45
- },
46
- "&:focus-visible": {
47
- boxShadow: "0 0 0 3px $colors$primary_default"
48
- }
49
- });
50
- var DropdownTriggerItem = styled(SubTrigger, {
51
- w: "100%",
52
- color: "$on_surface_high",
53
- p: "$8",
54
- display: "flex",
55
- alignItems: "center",
56
- "&:hover": {
57
- cursor: "pointer",
58
- bg: "$surface_brighter"
59
- },
60
- "&:focus-visible": {
61
- bg: "$surface_brighter",
62
- outline: "none"
63
- }
64
- });
65
- var DropdownItem = styled(Item, {
66
- color: "$on_surface_high",
67
- p: "$8",
68
- display: "flex",
69
- alignItems: "center",
70
- outline: "none",
71
- backgroundColor: "$surface_dim",
72
- "&:hover": {
73
- cursor: "pointer",
74
- bg: "$surface_bright"
75
- },
76
- "&:focus-visible": {
77
- bg: "$surface_bright"
78
- }
79
- });
80
- var DropdownItemSeparator = styled(Separator, {
81
- h: 1,
82
- backgroundColor: "$border_bright",
83
- m: "$4 $8"
84
- });
85
- var DropdownContent = styled(Content, {
86
- w: "$80",
87
- maxHeight: "$64",
88
- r: "$1",
89
- py: "$4",
90
- backgroundColor: "$surface_dim",
91
- overflowY: "auto",
92
- boxShadow: "0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)",
93
- zIndex: 20,
94
- fontFamily: "$sans"
95
- });
96
- var DropdownLabel = styled(Label, {
97
- display: "flex",
98
- alignItems: "center",
99
- h: "$12",
100
- w: "100%",
101
- p: "$8 $4"
102
- });
103
- var DropdownGroup = styled(Group, {});
104
- var DropdownSubMenu = styled(Sub, {});
105
- var DropdownSubMenuContent = styled(SubContent, {
106
- w: "$80",
107
- maxHeight: "$64",
108
- r: "$1",
109
- py: "$4",
110
- backgroundColor: "$surface_bright",
111
- overflowY: "auto",
112
- boxShadow: "0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)",
113
- zIndex: 20
114
- });
115
- var DropdownCheckboxItem = styled(CheckboxItem, {
116
- color: "$on_surface_high",
117
- p: "$8",
118
- display: "flex",
119
- alignItems: "center",
120
- outline: "none",
121
- "&:hover": {
122
- cursor: "pointer",
123
- bg: "$surface_brighter"
124
- },
125
- "&:focus-visible": {
126
- bg: "$surface_brighter"
127
- },
128
- gap: "$2"
129
- });
130
- var DropdownItemIndicator = styled(ItemIndicator, {
131
- w: "$10",
132
- display: "inline-flex",
133
- alignItems: "center",
134
- justifyContent: "center"
135
- });
136
- var Dropdown = {
137
- Root: DropdownRoot,
138
- Trigger: DropdownTrigger,
139
- TriggerItem: DropdownTriggerItem,
140
- Content: DropdownContent,
141
- Portal,
142
- SubMenu: DropdownSubMenu,
143
- SubMenuContent: DropdownSubMenuContent,
144
- Item: DropdownItem,
145
- Label: DropdownLabel,
146
- Group: DropdownGroup,
147
- ItemSeparator: DropdownItemSeparator,
148
- CheckboxItem: DropdownCheckboxItem,
149
- ItemIndicator: DropdownItemIndicator
150
- };
151
-
152
- // src/Prebuilt/components/Toast/ToastManager.js
153
- init_define_process_env();
154
- import { v4 } from "uuid";
155
- var ToastManager = {
156
- toasts: /* @__PURE__ */ new Map(),
157
- listeners: /* @__PURE__ */ new Map(),
158
- addToast(toast) {
159
- const id = toast.id ? toast.id : v4();
160
- this.toasts.set(id, __spreadProps(__spreadValues({}, toast), { id }));
161
- this.onChange();
162
- return id;
163
- },
164
- clearAllToast() {
165
- this.toasts.clear();
166
- this.onChange();
167
- },
168
- removeToast(id) {
169
- this.toasts.delete(id);
170
- this.onChange();
171
- },
172
- replaceToast(id, toast) {
173
- if (this.isActive(id)) {
174
- this.toasts.set(id, __spreadValues(__spreadValues({}, this.toasts.get(id)), toast));
175
- this.onChange();
176
- return id;
177
- } else {
178
- return this.addToast(toast);
179
- }
180
- },
181
- addListener(cb) {
182
- this.listeners.set(cb, cb);
183
- },
184
- removeListener(cb) {
185
- this.listeners.delete(cb);
186
- },
187
- isActive(id) {
188
- return this.toasts.has(id);
189
- },
190
- onChange() {
191
- const toasts = Array.from(this.toasts.values());
192
- this.listeners.forEach((listener) => listener(toasts));
193
- }
194
- };
195
-
196
- // src/Prebuilt/common/hooks.ts
197
- init_define_process_env();
198
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
199
- import { useMedia } from "react-use";
200
- import { JoinForm_JoinBtnType } from "@100mslive/types-prebuilt/elements/join_form";
201
- import {
202
- parsedUserAgent,
203
- selectAvailableRoleNames,
204
- selectIsAllowedToPublish,
205
- selectIsConnectedToRoom,
206
- selectLocalPeerRole,
207
- selectPeerCount,
208
- selectPeerMetadata,
209
- selectPeers,
210
- selectPeersByRoles,
211
- selectRecordingState,
212
- selectRemotePeers,
213
- selectRolesMap,
214
- useHMSActions,
215
- useHMSStore,
216
- useHMSVanillaStore
217
- } from "@100mslive/react-sdk";
218
- var useFilteredRoles = () => {
219
- var _a;
220
- const { elements } = useRoomLayoutConferencingScreen();
221
- return ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.roles_whitelist) || [];
222
- };
223
- var useDefaultChatSelection = () => {
224
- var _a;
225
- const { elements } = useRoomLayoutConferencingScreen();
226
- const roles = useFilteredRoles();
227
- if ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.public_chat_enabled) {
228
- return CHAT_SELECTOR.EVERYONE;
229
- }
230
- if (roles.length > 0) {
231
- return roles[0];
232
- }
233
- return "";
234
- };
235
- var useShowStreamingUI = () => {
236
- var _a, _b, _c;
237
- const layout = useRoomLayout();
238
- const { join_form } = ((_c = (_b = (_a = layout == null ? void 0 : layout.screens) == null ? void 0 : _a.preview) == null ? void 0 : _b.default) == null ? void 0 : _c.elements) || {};
239
- return (join_form == null ? void 0 : join_form.join_btn_type) === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE;
240
- };
241
- var useParticipants = (params) => {
242
- var _a;
243
- const isConnected = useHMSStore(selectIsConnectedToRoom);
244
- const peerCount = useHMSStore(selectPeerCount);
245
- const availableRoles = useHMSStore(selectAvailableRoleNames);
246
- let participantList = useHMSStore(isConnected ? selectPeers : selectRemotePeers);
247
- const rolesWithParticipants = Array.from(new Set(participantList.map((peer) => peer.roleName)));
248
- const vanillaStore = useHMSVanillaStore();
249
- if ((_a = params == null ? void 0 : params.metadata) == null ? void 0 : _a.isHandRaised) {
250
- participantList = participantList.filter((peer) => {
251
- return vanillaStore.getState(selectPeerMetadata(peer.id)).isHandRaised;
252
- });
253
- }
254
- if ((params == null ? void 0 : params.role) && availableRoles.includes(params.role)) {
255
- participantList = participantList.filter((peer) => peer.roleName === params.role);
256
- }
257
- if (params == null ? void 0 : params.search) {
258
- const search = params.search;
259
- participantList = participantList.filter((peer) => peer.name.toLowerCase().includes(search));
260
- }
261
- return { participants: participantList, isConnected, peerCount, rolesWithParticipants };
262
- };
263
- var useIsLandscape = () => {
264
- const isMobile = parsedUserAgent.getDevice().type === "mobile";
265
- const isLandscape = useMedia(config.media.ls);
266
- return isMobile && isLandscape;
267
- };
268
- var useLandscapeHLSStream = () => {
269
- const isLandscape = useIsLandscape();
270
- const { screenType } = useRoomLayoutConferencingScreen();
271
- return isLandscape && screenType === "hls_live_streaming";
272
- };
273
- var useMobileHLSStream = () => {
274
- const isMobile = useMedia(config.media.md);
275
- const { screenType } = useRoomLayoutConferencingScreen();
276
- return isMobile && screenType === "hls_live_streaming";
277
- };
278
- var useKeyboardHandler = (isPaused, hlsPlayer) => {
279
- const handleKeyEvent = useCallback(
280
- (event) => __async(void 0, null, function* () {
281
- switch (event.key) {
282
- case " ":
283
- if (isPaused) {
284
- yield hlsPlayer == null ? void 0 : hlsPlayer.play();
285
- } else {
286
- hlsPlayer == null ? void 0 : hlsPlayer.pause();
287
- }
288
- break;
289
- case "ArrowRight":
290
- hlsPlayer == null ? void 0 : hlsPlayer.seekTo((hlsPlayer == null ? void 0 : hlsPlayer.getVideoElement().currentTime) + 10);
291
- break;
292
- case "ArrowLeft":
293
- hlsPlayer == null ? void 0 : hlsPlayer.seekTo((hlsPlayer == null ? void 0 : hlsPlayer.getVideoElement().currentTime) - 10);
294
- break;
295
- }
296
- }),
297
- [hlsPlayer, isPaused]
298
- );
299
- return handleKeyEvent;
300
- };
301
- var useRecordingHandler = () => {
302
- const hmsActions = useHMSActions();
303
- const recordingState = useHMSStore(selectRecordingState);
304
- const [isRecordingLoading, setIsRecordingLoading] = useState(false);
305
- const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);
306
- useEffect(() => {
307
- if (recordingState.browser.error && recordingStarted) {
308
- setRecordingState(false);
309
- }
310
- }, [recordingStarted, recordingState.browser.error, setRecordingState]);
311
- const startRecording = useCallback(
312
- (resolution = null) => __async(void 0, null, function* () {
313
- try {
314
- setRecordingState(true);
315
- setIsRecordingLoading(true);
316
- yield hmsActions.startRTMPOrRecording({
317
- resolution: getResolution(resolution),
318
- record: true
319
- });
320
- } catch (error) {
321
- const err = error;
322
- if (err.message.includes("stream already running")) {
323
- ToastManager.addToast({
324
- title: "Recording already running",
325
- variant: "error"
326
- });
327
- } else {
328
- ToastManager.addToast({
329
- title: err.message,
330
- variant: "error"
331
- });
332
- }
333
- setRecordingState(false);
334
- }
335
- setIsRecordingLoading(false);
336
- }),
337
- [hmsActions, setRecordingState]
338
- );
339
- return {
340
- recordingStarted,
341
- startRecording,
342
- isRecordingLoading
343
- };
344
- };
345
- function getResolution(recordingResolution) {
346
- if (!recordingResolution) {
347
- return void 0;
348
- }
349
- const resolution = RTMP_RECORD_DEFAULT_RESOLUTION;
350
- if (recordingResolution.width) {
351
- resolution.width = recordingResolution.width;
352
- }
353
- if (recordingResolution.height) {
354
- resolution.height = recordingResolution.height;
355
- }
356
- return resolution;
357
- }
358
- function useWaitingRoomInfo() {
359
- const localPeerRole = useHMSStore(selectLocalPeerRole);
360
- const { video, audio, screen } = useHMSStore(selectIsAllowedToPublish);
361
- const isScreenShareAllowed = isScreenshareSupported();
362
- const roles = useHMSStore(selectRolesMap);
363
- const peersByRoles = useHMSStore(selectPeersByRoles((localPeerRole == null ? void 0 : localPeerRole.subscribeParams.subscribeToRoles) || []));
364
- const isNotAllowedToPublish = !(video || audio || screen && isScreenShareAllowed);
365
- const isScreenOnlyPublishParams = screen && !(video || audio);
366
- const hasSubscribedRolePublishing = useMemo(() => {
367
- return peersByRoles.some((peer) => {
368
- var _a;
369
- if (peer.roleName && roles[peer.roleName] && !peer.isLocal) {
370
- return !!((_a = roles[peer.roleName].publishParams) == null ? void 0 : _a.allowed.length);
371
- }
372
- return false;
373
- });
374
- }, [peersByRoles, roles]);
375
- return {
376
- isNotAllowedToPublish,
377
- isScreenOnlyPublishParams,
378
- hasSubscribedRolePublishing
379
- };
380
- }
381
-
382
- // src/Prebuilt/components/hooks/useDropdownList.ts
383
- init_define_process_env();
384
- import { useEffect as useEffect2 } from "react";
385
- var useDropdownList = ({ name, open }) => {
386
- const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);
387
- useEffect2(() => {
388
- if (open) {
389
- if (!dropdownList.includes(name)) {
390
- setDropdownList([...dropdownList, name]);
391
- }
392
- } else {
393
- const index = dropdownList.indexOf(name);
394
- if (index >= 0) {
395
- const newDropdownList = [...dropdownList];
396
- newDropdownList.splice(index, 1);
397
- setDropdownList(newDropdownList);
398
- }
399
- }
400
- }, [open, name]);
401
- };
402
-
403
- export {
404
- Dropdown,
405
- ToastManager,
406
- useFilteredRoles,
407
- useDefaultChatSelection,
408
- useShowStreamingUI,
409
- useParticipants,
410
- useIsLandscape,
411
- useLandscapeHLSStream,
412
- useMobileHLSStream,
413
- useKeyboardHandler,
414
- useRecordingHandler,
415
- useWaitingRoomInfo,
416
- useDropdownList
417
- };
418
- //# sourceMappingURL=chunk-DANANDDE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/Dropdown/Dropdown.tsx", "../src/Prebuilt/components/Toast/ToastManager.js", "../src/Prebuilt/common/hooks.ts", "../src/Prebuilt/components/hooks/useDropdownList.ts"],
4
- "sourcesContent": ["import {\n CheckboxItem,\n Content,\n Group,\n Item,\n ItemIndicator,\n Label,\n Portal,\n Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n Trigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { styled } from '../Theme';\n\nconst DropdownRoot = styled(Root, {});\n\nconst DropdownTrigger = styled(Trigger, {\n cursor: 'pointer',\n appearance: 'none !important',\n '&[data-state=\"open\"]': {\n backgroundColor: '$surface_bright',\n },\n '&:focus': {\n outline: 'none',\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n});\n\nconst DropdownTriggerItem = styled(SubTrigger, {\n w: '100%',\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n outline: 'none',\n },\n});\n\nconst DropdownItem = styled(Item, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n backgroundColor: '$surface_dim',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_bright',\n },\n '&:focus-visible': {\n bg: '$surface_bright',\n },\n});\n\nconst DropdownItemSeparator = styled(Separator, {\n h: 1,\n backgroundColor: '$border_bright',\n m: '$4 $8',\n});\n\nconst DropdownContent = styled(Content, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_dim',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n fontFamily: '$sans',\n});\n\nconst DropdownLabel = styled(Label, {\n display: 'flex',\n alignItems: 'center',\n h: '$12',\n w: '100%',\n p: '$8 $4',\n});\n\nconst DropdownGroup = styled(Group, {});\n\nconst DropdownSubMenu = styled(Sub, {});\n\nconst DropdownSubMenuContent = styled(SubContent, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_bright',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n});\n\nconst DropdownCheckboxItem = styled(CheckboxItem, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n },\n gap: '$2',\n});\n\nconst DropdownItemIndicator = styled(ItemIndicator, {\n w: '$10',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n});\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: DropdownTrigger,\n TriggerItem: DropdownTriggerItem,\n Content: DropdownContent,\n Portal: Portal,\n SubMenu: DropdownSubMenu,\n SubMenuContent: DropdownSubMenuContent,\n Item: DropdownItem,\n Label: DropdownLabel,\n Group: DropdownGroup,\n ItemSeparator: DropdownItemSeparator,\n CheckboxItem: DropdownCheckboxItem,\n ItemIndicator: DropdownItemIndicator,\n};\n", "import { v4 } from 'uuid';\n\nexport const ToastManager = {\n toasts: new Map(),\n listeners: new Map(),\n addToast(toast) {\n const id = toast.id ? toast.id : v4();\n this.toasts.set(id, { ...toast, id });\n this.onChange();\n return id;\n },\n\n clearAllToast() {\n this.toasts.clear();\n this.onChange();\n },\n\n removeToast(id) {\n this.toasts.delete(id);\n this.onChange();\n },\n replaceToast(id, toast) {\n if (this.isActive(id)) {\n this.toasts.set(id, { ...this.toasts.get(id), ...toast });\n this.onChange();\n return id;\n } else {\n return this.addToast(toast);\n }\n },\n addListener(cb) {\n this.listeners.set(cb, cb);\n },\n removeListener(cb) {\n this.listeners.delete(cb);\n },\n isActive(id) {\n return this.toasts.has(id);\n },\n onChange() {\n const toasts = Array.from(this.toasts.values());\n this.listeners.forEach(listener => listener(toasts));\n },\n};\n", "import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSHLSPlayer } from '@100mslive/hls-player';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\nimport {\n HMSPeer,\n HMSRecording,\n parsedUserAgent,\n selectAvailableRoleNames,\n selectIsAllowedToPublish,\n selectIsConnectedToRoom,\n selectLocalPeerRole,\n selectPeerCount,\n selectPeerMetadata,\n selectPeers,\n selectPeersByRoles,\n selectRecordingState,\n selectRemotePeers,\n selectRolesMap,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit any\nimport { ToastManager } from '../components/Toast/ToastManager';\nimport { config } from '../../Theme';\nimport { useRoomLayout } from '../provider/roomLayoutProvider';\n// @ts-ignore\nimport { useSetAppDataByKey } from '../components/AppData/useUISettings';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit any\nimport { isScreenshareSupported } from '../common/utils';\nimport { APP_DATA, CHAT_SELECTOR, RTMP_RECORD_DEFAULT_RESOLUTION } from './constants';\n/**\n * Hook to execute a callback when alone in room(after a certain 5d of time)\n * @param {number} thresholdMs The threshold(in ms) after which the callback is executed,\n * starting from the instant when alone in room.\n * note: the cb is not called when another peer joins during this period.\n */\nexport const useWhenAloneInRoom = (thresholdMs = 5 * 60 * 1000) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const [aloneForLong, setAloneForLong] = useState(false);\n const cbTimeout = useRef(null);\n const alone = isConnected && peerCount === 1;\n\n useEffect(() => {\n if (alone && !cbTimeout.current) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n cbTimeout.current = setTimeout(() => {\n setAloneForLong(true);\n }, thresholdMs);\n } else if (!alone) {\n cbTimeout.current && clearTimeout(cbTimeout.current);\n cbTimeout.current = null;\n setAloneForLong(false);\n }\n }, [alone, thresholdMs]);\n\n useEffect(() => {\n return () => {\n if (cbTimeout.current) {\n clearTimeout(cbTimeout.current);\n }\n };\n }, []);\n\n return { alone, aloneForLong };\n};\n\nexport const useFilteredRoles = () => {\n const { elements } = useRoomLayoutConferencingScreen();\n return elements?.chat?.roles_whitelist || [];\n};\n\nexport const useDefaultChatSelection = () => {\n const { elements } = useRoomLayoutConferencingScreen();\n const roles = useFilteredRoles();\n // default is everyone for public chat\n if (elements?.chat?.public_chat_enabled) {\n return CHAT_SELECTOR.EVERYONE;\n }\n // sending first role as default\n if (roles.length > 0) {\n return roles[0];\n }\n // sending empty\n return '';\n};\n\nexport const useShowStreamingUI = () => {\n const layout = useRoomLayout();\n const { join_form } = layout?.screens?.preview?.default?.elements || {};\n return join_form?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE;\n};\n\n// The search results should not have role name matches\nexport const useParticipants = (params?: { metadata?: { isHandRaised?: boolean }; role?: string; search?: string }) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const availableRoles = useHMSStore(selectAvailableRoleNames);\n let participantList = useHMSStore(isConnected ? selectPeers : selectRemotePeers);\n const rolesWithParticipants = Array.from(new Set(participantList.map(peer => peer.roleName)));\n const vanillaStore = useHMSVanillaStore();\n if (params?.metadata?.isHandRaised) {\n participantList = participantList.filter(peer => {\n return vanillaStore.getState(selectPeerMetadata(peer.id)).isHandRaised;\n });\n }\n if (params?.role && availableRoles.includes(params.role)) {\n participantList = participantList.filter(peer => peer.roleName === params.role);\n }\n if (params?.search) {\n const search = params.search;\n // Removed peer.roleName?.toLowerCase().includes(search)\n participantList = participantList.filter(peer => peer.name.toLowerCase().includes(search));\n }\n return { participants: participantList, isConnected, peerCount, rolesWithParticipants };\n};\n\nexport const useIsLandscape = () => {\n const isMobile = parsedUserAgent.getDevice().type === 'mobile';\n const isLandscape = useMedia(config.media.ls);\n return isMobile && isLandscape;\n};\n\nexport const useLandscapeHLSStream = () => {\n const isLandscape = useIsLandscape();\n const { screenType } = useRoomLayoutConferencingScreen();\n return isLandscape && screenType === 'hls_live_streaming';\n};\n\nexport const useMobileHLSStream = () => {\n const isMobile = useMedia(config.media.md);\n const { screenType } = useRoomLayoutConferencingScreen();\n return isMobile && screenType === 'hls_live_streaming';\n};\n\nexport const useKeyboardHandler = (isPaused: boolean, hlsPlayer: HMSHLSPlayer) => {\n const handleKeyEvent = useCallback(\n async (event: KeyboardEvent) => {\n switch (event.key) {\n case ' ':\n if (isPaused) {\n await hlsPlayer?.play();\n } else {\n hlsPlayer?.pause();\n }\n break;\n case 'ArrowRight':\n hlsPlayer?.seekTo(hlsPlayer?.getVideoElement().currentTime + 10);\n break;\n case 'ArrowLeft':\n hlsPlayer?.seekTo(hlsPlayer?.getVideoElement().currentTime - 10);\n break;\n }\n },\n [hlsPlayer, isPaused],\n );\n\n return handleKeyEvent;\n};\nexport interface RTMPRecordingResolution {\n width: number;\n height: number;\n}\nexport const useRecordingHandler = () => {\n const hmsActions = useHMSActions();\n const recordingState: HMSRecording = useHMSStore(selectRecordingState);\n const [isRecordingLoading, setIsRecordingLoading] = useState(false);\n const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);\n useEffect(() => {\n if (recordingState.browser.error && recordingStarted) {\n setRecordingState(false);\n }\n }, [recordingStarted, recordingState.browser.error, setRecordingState]);\n const startRecording = useCallback(\n async (resolution: RTMPRecordingResolution | null = null) => {\n try {\n setRecordingState(true);\n setIsRecordingLoading(true);\n await hmsActions.startRTMPOrRecording({\n resolution: getResolution(resolution),\n record: true,\n });\n } catch (error) {\n const err = error as Error;\n if (err.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setRecordingState(false);\n }\n setIsRecordingLoading(false);\n },\n [hmsActions, setRecordingState],\n );\n return {\n recordingStarted,\n startRecording,\n isRecordingLoading,\n };\n};\n\nexport function getResolution(\n recordingResolution: RTMPRecordingResolution | null,\n): RTMPRecordingResolution | undefined {\n if (!recordingResolution) {\n return undefined;\n }\n const resolution: RTMPRecordingResolution = RTMP_RECORD_DEFAULT_RESOLUTION;\n if (recordingResolution.width) {\n resolution.width = recordingResolution.width;\n }\n if (recordingResolution.height) {\n resolution.height = recordingResolution.height;\n }\n return resolution;\n}\n\nexport interface WaitingRoomInfo {\n isNotAllowedToPublish: boolean;\n isScreenOnlyPublishParams: boolean;\n hasSubscribedRolePublishing: boolean;\n}\nexport function useWaitingRoomInfo(): WaitingRoomInfo {\n const localPeerRole = useHMSStore(selectLocalPeerRole);\n const { video, audio, screen } = useHMSStore(selectIsAllowedToPublish);\n const isScreenShareAllowed = isScreenshareSupported();\n const roles = useHMSStore(selectRolesMap);\n const peersByRoles = useHMSStore(selectPeersByRoles(localPeerRole?.subscribeParams.subscribeToRoles || []));\n // show no publish as screenshare in mweb is not possible\n const isNotAllowedToPublish = !(video || audio || (screen && isScreenShareAllowed));\n const isScreenOnlyPublishParams: boolean = screen && !(video || audio);\n const hasSubscribedRolePublishing: boolean = useMemo(() => {\n return peersByRoles.some((peer: HMSPeer) => {\n if (peer.roleName && roles[peer.roleName] && !peer.isLocal) {\n return !!roles[peer.roleName].publishParams?.allowed.length;\n }\n return false;\n });\n }, [peersByRoles, roles]);\n\n return {\n isNotAllowedToPublish,\n isScreenOnlyPublishParams,\n hasSubscribedRolePublishing,\n };\n}\n", "import { useEffect } from 'react';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useDropdownList = ({ name, open }: { name: string; open: boolean }) => {\n const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);\n\n useEffect(() => {\n if (open) {\n if (!dropdownList.includes(name)) {\n setDropdownList([...dropdownList, name]);\n }\n } else {\n const index = dropdownList.indexOf(name);\n if (index >= 0) {\n const newDropdownList = [...dropdownList];\n newDropdownList.splice(index, 1);\n setDropdownList(newDropdownList);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, name]);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,eAAe,OAAO,MAAM,CAAC,CAAC;AAEpC,IAAM,kBAAkB,OAAO,SAAS;AAAA,EACtC,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,wBAAwB;AAAA,IACtB,iBAAiB;AAAA,EACnB;AAAA,EACA,WAAW;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,mBAAmB;AAAA,IACjB,WAAW;AAAA,EACb;AACF,CAAC;AAED,IAAM,sBAAsB,OAAO,YAAY;AAAA,EAC7C,GAAG;AAAA,EACH,OAAO;AAAA,EACP,GAAG;AAAA,EACH,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,EACN;AAAA,EACA,mBAAmB;AAAA,IACjB,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AACF,CAAC;AAED,IAAM,eAAe,OAAO,MAAM;AAAA,EAChC,OAAO;AAAA,EACP,GAAG;AAAA,EACH,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,iBAAiB;AAAA,EAC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