@100mslive/roomkit-react 0.1.7-alpha.0 → 0.1.7
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/dist/{HLSView-F5BDZVT2.js → HLSView-3S74KF3A.js} +6 -5
- package/dist/{HLSView-F5BDZVT2.js.map → HLSView-3S74KF3A.js.map} +2 -2
- package/dist/Prebuilt/components/RoleChangeRequest/RequestPrompt.d.ts +9 -0
- package/dist/VideoTile/StyledVideoTile.d.ts +445 -3
- package/dist/{VirtualBackground-THDRYDRA.js → VirtualBackground-3TI5NA4V.js} +3 -3
- package/dist/{chunk-JSH7SKEH.js → chunk-36X4ZCLC.js} +2 -2
- package/dist/{chunk-U3G743OY.js → chunk-5DQ3WTED.js} +2 -2
- package/dist/{chunk-U3G743OY.js.map → chunk-5DQ3WTED.js.map} +1 -1
- package/dist/{chunk-CDYRVICT.js → chunk-Z7P5WITU.js} +40 -32
- package/dist/chunk-Z7P5WITU.js.map +7 -0
- package/dist/{conference-6IVZHILI.js → conference-JNABIZBG.js} +506 -490
- package/dist/conference-JNABIZBG.js.map +7 -0
- package/dist/index.cjs.js +826 -790
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +185 -126
- package/dist/meta.esbuild.json +221 -162
- package/package.json +6 -6
- package/src/Input/Input.tsx +1 -1
- package/src/Prebuilt/common/utils.js +7 -0
- package/src/Prebuilt/components/Chat/ChatBody.jsx +125 -106
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +1 -1
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +36 -44
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +23 -35
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +5 -3
- package/src/Prebuilt/components/RaiseHand.jsx +4 -11
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +66 -0
- package/src/Prebuilt/components/{RoleChangeRequestModal.tsx → RoleChangeRequest/RoleChangeRequestModal.tsx} +18 -50
- package/src/Prebuilt/components/VideoTile.jsx +18 -12
- package/src/Prebuilt/components/conference.jsx +1 -1
- package/src/Prebuilt/components/hooks/useMetadata.jsx +2 -1
- package/src/Prebuilt/layouts/HLSView.jsx +3 -2
- package/src/Prebuilt/layouts/SidePane.tsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +10 -14
- package/dist/chunk-CDYRVICT.js.map +0 -7
- package/dist/conference-6IVZHILI.js.map +0 -7
- /package/dist/Prebuilt/components/{RoleChangeRequestModal.d.ts → RoleChangeRequest/RoleChangeRequestModal.d.ts} +0 -0
- /package/dist/{VirtualBackground-THDRYDRA.js.map → VirtualBackground-3TI5NA4V.js.map} +0 -0
- /package/dist/{chunk-JSH7SKEH.js.map → chunk-36X4ZCLC.js.map} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
ActionTile
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-36X4ZCLC.js";
|
4
4
|
import {
|
5
5
|
APP_DATA,
|
6
6
|
Accordion,
|
@@ -83,7 +83,7 @@ import {
|
|
83
83
|
useUrlToEmbed,
|
84
84
|
useUserPreferences,
|
85
85
|
useWaitingViewerRole
|
86
|
-
} from "./chunk-
|
86
|
+
} from "./chunk-Z7P5WITU.js";
|
87
87
|
import {
|
88
88
|
Box,
|
89
89
|
Flex,
|
@@ -102,10 +102,10 @@ import {
|
|
102
102
|
slideLeftAndFade,
|
103
103
|
styled,
|
104
104
|
textEllipsis
|
105
|
-
} from "./chunk-
|
105
|
+
} from "./chunk-5DQ3WTED.js";
|
106
106
|
|
107
107
|
// src/Prebuilt/components/conference.jsx
|
108
|
-
import
|
108
|
+
import React63, { useEffect as useEffect25, useRef as useRef14, useState as useState35 } from "react";
|
109
109
|
import { useNavigate, useParams } from "react-router-dom";
|
110
110
|
import { usePrevious } from "react-use";
|
111
111
|
import {
|
@@ -113,8 +113,8 @@ import {
|
|
113
113
|
selectAppData as selectAppData4,
|
114
114
|
selectIsConnectedToRoom as selectIsConnectedToRoom7,
|
115
115
|
selectRoomState,
|
116
|
-
useHMSActions as
|
117
|
-
useHMSStore as
|
116
|
+
useHMSActions as useHMSActions22,
|
117
|
+
useHMSStore as useHMSStore35
|
118
118
|
} from "@100mslive/react-sdk";
|
119
119
|
|
120
120
|
// src/Prebuilt/components/Footer/Footer.tsx
|
@@ -345,11 +345,12 @@ var DesktopLeaveRoom = ({
|
|
345
345
|
const permissions = useHMSStore2(selectPermissions);
|
346
346
|
const { isStreamingOn } = useRecordingStreaming();
|
347
347
|
const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
|
348
|
+
const showLeaveOptions = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn || (permissions == null ? void 0 : permissions.endRoom);
|
348
349
|
useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: "LeaveRoom" });
|
349
350
|
if (!permissions || !isConnected) {
|
350
351
|
return null;
|
351
352
|
}
|
352
|
-
return /* @__PURE__ */ React6.createElement(Fragment2, null,
|
353
|
+
return /* @__PURE__ */ React6.createElement(Fragment2, null, showLeaveOptions ? /* @__PURE__ */ React6.createElement(Flex, null, /* @__PURE__ */ React6.createElement(
|
353
354
|
LeaveIconButton,
|
354
355
|
{
|
355
356
|
key: "LeaveRoom",
|
@@ -358,9 +359,7 @@ var DesktopLeaveRoom = ({
|
|
358
359
|
borderTopRightRadius: 0,
|
359
360
|
borderBottomRightRadius: 0
|
360
361
|
},
|
361
|
-
onClick: () =>
|
362
|
-
leaveRoom({ endstream: false });
|
363
|
-
}
|
362
|
+
onClick: () => setShowLeaveRoomAlert(true)
|
364
363
|
},
|
365
364
|
/* @__PURE__ */ React6.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ React6.createElement(Box, null, /* @__PURE__ */ React6.createElement(ExitIcon, { style: { transform: "rotate(180deg)" } })))
|
366
365
|
), /* @__PURE__ */ React6.createElement(Dropdown.Root, { open, onOpenChange: setOpen, modal: false }, /* @__PURE__ */ React6.createElement(
|
@@ -379,7 +378,7 @@ var DesktopLeaveRoom = ({
|
|
379
378
|
{
|
380
379
|
css: {
|
381
380
|
bg: "$surface_dim",
|
382
|
-
color: "$
|
381
|
+
color: "$on_surface_medium",
|
383
382
|
"&:hover": { bg: "$surface_default", color: "$on_surface_high" }
|
384
383
|
},
|
385
384
|
onClick: () => leaveRoom({ endstream: false }),
|
@@ -397,7 +396,7 @@ var DesktopLeaveRoom = ({
|
|
397
396
|
css: { p: 0 }
|
398
397
|
}
|
399
398
|
)
|
400
|
-
),
|
399
|
+
), /* @__PURE__ */ React6.createElement(
|
401
400
|
Dropdown.Item,
|
402
401
|
{
|
403
402
|
css: {
|
@@ -422,15 +421,11 @@ var DesktopLeaveRoom = ({
|
|
422
421
|
css: { p: 0 }
|
423
422
|
}
|
424
423
|
)
|
425
|
-
)
|
424
|
+
)))) : /* @__PURE__ */ React6.createElement(
|
426
425
|
LeaveIconButton,
|
427
426
|
{
|
428
427
|
onClick: () => {
|
429
|
-
|
430
|
-
setShowLeaveRoomAlert(true);
|
431
|
-
} else {
|
432
|
-
leaveRoom({ endstream: false });
|
433
|
-
}
|
428
|
+
setShowLeaveRoomAlert(true);
|
434
429
|
},
|
435
430
|
key: "LeaveRoom",
|
436
431
|
"data-testid": "leave_room_btn"
|
@@ -444,7 +439,7 @@ var DesktopLeaveRoom = ({
|
|
444
439
|
isStreamingOn,
|
445
440
|
isModal: true
|
446
441
|
}
|
447
|
-
)))),
|
442
|
+
)))), /* @__PURE__ */ React6.createElement(Dialog.Root, { open: showLeaveRoomAlert, modal: false }, /* @__PURE__ */ React6.createElement(Dialog.Portal, null, /* @__PURE__ */ React6.createElement(Dialog.Overlay, null), /* @__PURE__ */ React6.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ React6.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom, isModal: true })))));
|
448
443
|
};
|
449
444
|
|
450
445
|
// src/Prebuilt/components/Leave/MwebLeaveRoom.tsx
|
@@ -463,11 +458,12 @@ var MwebLeaveRoom = ({
|
|
463
458
|
const permissions = useHMSStore3(selectPermissions2);
|
464
459
|
const { isStreamingOn } = useRecordingStreaming2();
|
465
460
|
const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
|
461
|
+
const showLeaveOptions = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn || (permissions == null ? void 0 : permissions.endRoom);
|
466
462
|
useDropdownList({ open, name: "LeaveRoom" });
|
467
463
|
if (!permissions || !isConnected) {
|
468
464
|
return null;
|
469
465
|
}
|
470
|
-
return /* @__PURE__ */ React7.createElement(Fragment3, null,
|
466
|
+
return /* @__PURE__ */ React7.createElement(Fragment3, null, showLeaveOptions ? /* @__PURE__ */ React7.createElement(Sheet.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React7.createElement(Sheet.Trigger, { asChild: true }, /* @__PURE__ */ React7.createElement(
|
471
467
|
LeaveIconButton,
|
472
468
|
{
|
473
469
|
key: "LeaveRoom",
|
@@ -489,7 +485,7 @@ var MwebLeaveRoom = ({
|
|
489
485
|
onClick: () => leaveRoom({ endstream: false }),
|
490
486
|
css: { pt: 0, mt: "$10", color: "$on_surface_low", "&:hover": { color: "$on_surface_high" } }
|
491
487
|
}
|
492
|
-
),
|
488
|
+
), /* @__PURE__ */ React7.createElement(
|
493
489
|
LeaveCard,
|
494
490
|
{
|
495
491
|
title: showStream ? "End Stream" : "End Session",
|
@@ -503,28 +499,14 @@ var MwebLeaveRoom = ({
|
|
503
499
|
setShowEndStreamAlert(true);
|
504
500
|
}
|
505
501
|
}
|
506
|
-
) : null)) : /* @__PURE__ */ React7.createElement(
|
507
|
-
LeaveIconButton,
|
508
|
-
{
|
509
|
-
key: "LeaveRoom",
|
510
|
-
"data-testid": "leave_room_btn",
|
511
|
-
onClick: () => {
|
512
|
-
if (screenType === "hls_live_streaming") {
|
513
|
-
setShowLeaveRoomAlert(true);
|
514
|
-
} else {
|
515
|
-
leaveRoom({ endstream: false });
|
516
|
-
}
|
517
|
-
}
|
518
|
-
},
|
519
|
-
/* @__PURE__ */ React7.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ React7.createElement(Box, null, /* @__PURE__ */ React7.createElement(ExitIcon2, { style: { transform: "rotate(180deg)" } })))
|
520
|
-
), /* @__PURE__ */ React7.createElement(Sheet.Root, { open: showEndStreamAlert, onOpenChange: setShowEndStreamAlert }, /* @__PURE__ */ React7.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ React7.createElement(
|
502
|
+
))) : /* @__PURE__ */ React7.createElement(LeaveIconButton, { key: "LeaveRoom", "data-testid": "leave_room_btn", onClick: () => setShowLeaveRoomAlert(true) }, /* @__PURE__ */ React7.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ React7.createElement(Box, null, /* @__PURE__ */ React7.createElement(ExitIcon2, { style: { transform: "rotate(180deg)" } })))), /* @__PURE__ */ React7.createElement(Sheet.Root, { open: showEndStreamAlert, onOpenChange: setShowEndStreamAlert }, /* @__PURE__ */ React7.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ React7.createElement(
|
521
503
|
EndSessionContent,
|
522
504
|
{
|
523
505
|
setShowEndStreamAlert,
|
524
506
|
leaveRoom: isStreamingOn ? leaveRoom : endRoom,
|
525
507
|
isStreamingOn
|
526
508
|
}
|
527
|
-
))),
|
509
|
+
))), /* @__PURE__ */ React7.createElement(Sheet.Root, { open: showLeaveRoomAlert, onOpenChange: setShowLeaveRoomAlert }, /* @__PURE__ */ React7.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ React7.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom }))));
|
528
510
|
};
|
529
511
|
|
530
512
|
// src/Prebuilt/components/Leave/LeaveRoom.tsx
|
@@ -2130,27 +2112,17 @@ var MoreSettings = ({
|
|
2130
2112
|
|
2131
2113
|
// src/Prebuilt/components/RaiseHand.jsx
|
2132
2114
|
import React24 from "react";
|
2133
|
-
import { selectHasPeerHandRaised, selectLocalPeerID as selectLocalPeerID4, useHMSActions as useHMSActions10, useHMSStore as useHMSStore12 } from "@100mslive/react-sdk";
|
2134
2115
|
import { HandIcon as HandIcon2 } from "@100mslive/react-icons";
|
2135
2116
|
var RaiseHand = () => {
|
2136
|
-
const
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
IconButton_default,
|
2141
|
-
{
|
2142
|
-
active: !isHandRaised,
|
2143
|
-
onClick: () => {
|
2144
|
-
isHandRaised ? actions.lowerLocalPeerHand() : actions.raiseLocalPeerHand();
|
2145
|
-
}
|
2146
|
-
},
|
2147
|
-
/* @__PURE__ */ React24.createElement(HandIcon2, null)
|
2148
|
-
));
|
2117
|
+
const { isHandRaised, toggleHandRaise } = useMyMetadata();
|
2118
|
+
return /* @__PURE__ */ React24.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ React24.createElement(IconButton_default, { active: !isHandRaised, onClick: () => __async(void 0, null, function* () {
|
2119
|
+
return yield toggleHandRaise();
|
2120
|
+
}) }, /* @__PURE__ */ React24.createElement(HandIcon2, null)));
|
2149
2121
|
};
|
2150
2122
|
|
2151
2123
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
2152
2124
|
import React31, { Fragment as Fragment6 } from "react";
|
2153
|
-
import { selectIsAllowedToPublish, useHMSStore as
|
2125
|
+
import { selectIsAllowedToPublish, useHMSStore as useHMSStore12, useScreenShare as useScreenShare2 } from "@100mslive/react-sdk";
|
2154
2126
|
import { ShareScreenIcon } from "@100mslive/react-icons";
|
2155
2127
|
|
2156
2128
|
// src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
|
@@ -2632,7 +2604,7 @@ function ShareScreenOptions() {
|
|
2632
2604
|
|
2633
2605
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
2634
2606
|
var ScreenshareToggle = ({ css = {} }) => {
|
2635
|
-
const isAllowedToPublish =
|
2607
|
+
const isAllowedToPublish = useHMSStore12(selectIsAllowedToPublish);
|
2636
2608
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
2637
2609
|
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare2();
|
2638
2610
|
const isVideoScreenshare = amIScreenSharing && !!video;
|
@@ -2657,10 +2629,10 @@ var ScreenshareToggle = ({ css = {} }) => {
|
|
2657
2629
|
|
2658
2630
|
// src/Prebuilt/components/Footer/ChatToggle.tsx
|
2659
2631
|
import React32 from "react";
|
2660
|
-
import { selectUnreadHMSMessagesCount, useHMSStore as
|
2632
|
+
import { selectUnreadHMSMessagesCount, useHMSStore as useHMSStore13 } from "@100mslive/react-sdk";
|
2661
2633
|
import { ChatIcon, ChatUnreadIcon } from "@100mslive/react-icons";
|
2662
2634
|
var ChatToggle = () => {
|
2663
|
-
const countUnreadMessages =
|
2635
|
+
const countUnreadMessages = useHMSStore13(selectUnreadHMSMessagesCount);
|
2664
2636
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
2665
2637
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
2666
2638
|
return /* @__PURE__ */ React32.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React32.createElement(IconButton_default, { onClick: toggleChat, active: !isChatOpen, "data-testid": "chat_btn" }, countUnreadMessages === 0 ? /* @__PURE__ */ React32.createElement(ChatIcon, null) : /* @__PURE__ */ React32.createElement(ChatUnreadIcon, { "data-testid": "chat_unread_btn" })));
|
@@ -2671,14 +2643,14 @@ import React35, { Fragment as Fragment7, useCallback as useCallback6, useEffect
|
|
2671
2643
|
import { useDebounce, useMedia as useMedia4 } from "react-use";
|
2672
2644
|
import {
|
2673
2645
|
selectHandRaisedPeers,
|
2674
|
-
selectHasPeerHandRaised
|
2646
|
+
selectHasPeerHandRaised,
|
2675
2647
|
selectIsPeerAudioEnabled,
|
2676
|
-
selectLocalPeerID as
|
2648
|
+
selectLocalPeerID as selectLocalPeerID4,
|
2677
2649
|
selectPeerCount as selectPeerCount2,
|
2678
2650
|
selectPeerMetadata,
|
2679
2651
|
selectPermissions as selectPermissions8,
|
2680
|
-
useHMSActions as
|
2681
|
-
useHMSStore as
|
2652
|
+
useHMSActions as useHMSActions11,
|
2653
|
+
useHMSStore as useHMSStore15
|
2682
2654
|
} from "@100mslive/react-sdk";
|
2683
2655
|
import {
|
2684
2656
|
ChangeRoleIcon as ChangeRoleIcon2,
|
@@ -2697,7 +2669,7 @@ import { FixedSizeList } from "react-window";
|
|
2697
2669
|
|
2698
2670
|
// src/Prebuilt/components/Footer/RoleOptions.tsx
|
2699
2671
|
import React33, { useState as useState17 } from "react";
|
2700
|
-
import { selectPermissions as selectPermissions7, useHMSActions as
|
2672
|
+
import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions10, useHMSStore as useHMSStore14, useHMSVanillaStore as useHMSVanillaStore2 } from "@100mslive/react-sdk";
|
2701
2673
|
import {
|
2702
2674
|
MicOffIcon as MicOffIcon2,
|
2703
2675
|
MicOnIcon,
|
@@ -2711,8 +2683,8 @@ var dropdownItemCSS = { backgroundColor: "$surface_default", gap: "$4", p: "$8"
|
|
2711
2683
|
var optionTextCSS = { fontWeight: "$semiBold", color: "$on_surface_high", textTransform: "none" };
|
2712
2684
|
var RoleOptions = ({ roleName, peerList }) => {
|
2713
2685
|
const [openOptions, setOpenOptions] = useState17(false);
|
2714
|
-
const permissions =
|
2715
|
-
const hmsActions =
|
2686
|
+
const permissions = useHMSStore14(selectPermissions7);
|
2687
|
+
const hmsActions = useHMSActions10();
|
2716
2688
|
const { elements } = useRoomLayoutConferencingScreen();
|
2717
2689
|
const { on_stage_role, off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
|
2718
2690
|
const vanillaStore = useHMSVanillaStore2();
|
@@ -2884,7 +2856,7 @@ var ParticipantList = () => {
|
|
2884
2856
|
const [filter, setFilter] = useState18();
|
2885
2857
|
const { participants, isConnected, peerCount } = useParticipants(filter);
|
2886
2858
|
const peersOrderedByRoles = {};
|
2887
|
-
const handRaisedPeers =
|
2859
|
+
const handRaisedPeers = useHMSStore15(selectHandRaisedPeers);
|
2888
2860
|
participants.forEach((participant) => {
|
2889
2861
|
if (peersOrderedByRoles[participant.roleName] === void 0) {
|
2890
2862
|
peersOrderedByRoles[participant.roleName] = [];
|
@@ -2914,7 +2886,7 @@ var ParticipantList = () => {
|
|
2914
2886
|
)));
|
2915
2887
|
};
|
2916
2888
|
var ParticipantCount = () => {
|
2917
|
-
const peerCount =
|
2889
|
+
const peerCount = useHMSStore15(selectPeerCount2);
|
2918
2890
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
2919
2891
|
const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
2920
2892
|
useEffect5(() => {
|
@@ -2982,7 +2954,7 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
2982
2954
|
);
|
2983
2955
|
};
|
2984
2956
|
var Participant = ({ peer, isConnected }) => {
|
2985
|
-
const localPeerId =
|
2957
|
+
const localPeerId = useHMSStore15(selectLocalPeerID4);
|
2986
2958
|
return /* @__PURE__ */ React35.createElement(
|
2987
2959
|
Flex,
|
2988
2960
|
{
|
@@ -3004,10 +2976,10 @@ var Participant = ({ peer, isConnected }) => {
|
|
3004
2976
|
};
|
3005
2977
|
var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
|
3006
2978
|
var _a;
|
3007
|
-
const isHandRaised =
|
3008
|
-
const canChangeRole = (_a =
|
2979
|
+
const isHandRaised = useHMSStore15(selectHasPeerHandRaised(peerId));
|
2980
|
+
const canChangeRole = (_a = useHMSStore15(selectPermissions8)) == null ? void 0 : _a.changeRole;
|
3009
2981
|
const shouldShowMoreActions = canChangeRole;
|
3010
|
-
const isAudioMuted = !
|
2982
|
+
const isAudioMuted = !useHMSStore15(selectIsPeerAudioEnabled(peerId));
|
3011
2983
|
return /* @__PURE__ */ React35.createElement(
|
3012
2984
|
Flex,
|
3013
2985
|
{
|
@@ -3041,8 +3013,8 @@ var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
|
|
3041
3013
|
});
|
3042
3014
|
var ParticipantMoreActions = ({ peerId, role }) => {
|
3043
3015
|
var _a;
|
3044
|
-
const hmsActions =
|
3045
|
-
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } =
|
3016
|
+
const hmsActions = useHMSActions11();
|
3017
|
+
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = useHMSStore15(selectPermissions8);
|
3046
3018
|
const { elements } = useRoomLayoutConferencingScreen();
|
3047
3019
|
const {
|
3048
3020
|
bring_to_stage_label,
|
@@ -3052,8 +3024,8 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3052
3024
|
} = elements.on_stage_exp || {};
|
3053
3025
|
const isInStage = role === on_stage_role;
|
3054
3026
|
const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
|
3055
|
-
const prevRole = (_a =
|
3056
|
-
const localPeerId =
|
3027
|
+
const prevRole = (_a = useHMSStore15(selectPeerMetadata(peerId))) == null ? void 0 : _a.prevRole;
|
3028
|
+
const localPeerId = useHMSStore15(selectLocalPeerID4);
|
3057
3029
|
const isLocal = localPeerId === peerId;
|
3058
3030
|
const [open, setOpen] = useState18(false);
|
3059
3031
|
const handleStageAction = () => __async(void 0, null, function* () {
|
@@ -3129,7 +3101,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3129
3101
|
{
|
3130
3102
|
type: "text",
|
3131
3103
|
placeholder: placeholder || "Search for participants",
|
3132
|
-
css: { w: "100%", p: "$6", pl: "$
|
3104
|
+
css: { w: "100%", p: "$6", pl: "$16", mr: "$4", bg: inSidePane ? "$surface_default" : "$surface_dim" },
|
3133
3105
|
value,
|
3134
3106
|
onKeyDown: (event) => {
|
3135
3107
|
event.stopPropagation();
|
@@ -3145,7 +3117,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3145
3117
|
};
|
3146
3118
|
|
3147
3119
|
// src/Prebuilt/components/Footer/Footer.tsx
|
3148
|
-
var VirtualBackground = React36.lazy(() => import("./VirtualBackground-
|
3120
|
+
var VirtualBackground = React36.lazy(() => import("./VirtualBackground-3TI5NA4V.js"));
|
3149
3121
|
var Footer2 = ({
|
3150
3122
|
screenType,
|
3151
3123
|
elements
|
@@ -3210,11 +3182,11 @@ var Footer2 = ({
|
|
3210
3182
|
|
3211
3183
|
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
3212
3184
|
import React37, { useCallback as useCallback7, useState as useState19 } from "react";
|
3213
|
-
import { selectHLSState as selectHLSState2, useHMSActions as
|
3185
|
+
import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions12, useHMSStore as useHMSStore16 } from "@100mslive/react-sdk";
|
3214
3186
|
function HLSFailureModal() {
|
3215
|
-
const { hlsError } =
|
3187
|
+
const { hlsError } = useHMSStore16(selectHLSState2).error || false;
|
3216
3188
|
const [openModal, setOpenModal] = useState19(!!hlsError);
|
3217
|
-
const hmsActions =
|
3189
|
+
const hmsActions = useHMSActions12();
|
3218
3190
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
3219
3191
|
const startHLS = useCallback7(() => __async(this, null, function* () {
|
3220
3192
|
try {
|
@@ -3257,29 +3229,128 @@ function HLSFailureModal() {
|
|
3257
3229
|
) : null;
|
3258
3230
|
}
|
3259
3231
|
|
3232
|
+
// src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
|
3233
|
+
import React39, { useEffect as useEffect7 } from "react";
|
3234
|
+
import {
|
3235
|
+
selectLocalPeerName,
|
3236
|
+
selectLocalPeerRoleName,
|
3237
|
+
selectRoleChangeRequest,
|
3238
|
+
useCustomEvent as useCustomEvent2,
|
3239
|
+
useHMSActions as useHMSActions13,
|
3240
|
+
useHMSStore as useHMSStore17
|
3241
|
+
} from "@100mslive/react-sdk";
|
3242
|
+
|
3243
|
+
// src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx
|
3244
|
+
import React38 from "react";
|
3245
|
+
import { useMedia as useMedia6 } from "react-use";
|
3246
|
+
var RequestPrompt = ({
|
3247
|
+
open = true,
|
3248
|
+
onOpenChange,
|
3249
|
+
title,
|
3250
|
+
body,
|
3251
|
+
actionText = "Accept",
|
3252
|
+
onAction
|
3253
|
+
}) => {
|
3254
|
+
const isMobile = useMedia6(config.media.md);
|
3255
|
+
if (isMobile) {
|
3256
|
+
return /* @__PURE__ */ React38.createElement(Sheet.Root, { open, onOpenChange }, /* @__PURE__ */ React38.createElement(Sheet.Content, { css: { py: "$8" } }, /* @__PURE__ */ React38.createElement(Text, { css: { fontWeight: "$semiBold", c: "$on_surface_high", "@md": { px: "$8" } } }, title), body, /* @__PURE__ */ React38.createElement(RequestActions, { actionText, onAction })));
|
3257
|
+
}
|
3258
|
+
return /* @__PURE__ */ React38.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React38.createElement(Dialog.Portal, null, /* @__PURE__ */ React38.createElement(Dialog.Overlay, null), /* @__PURE__ */ React38.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ React38.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ React38.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ React38.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ React38.createElement(RequestActions, { actionText, onAction }))));
|
3259
|
+
};
|
3260
|
+
var RequestActions = ({ onAction, actionText }) => /* @__PURE__ */ React38.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md", "@md": { mt: "$8", px: "$8" } } }, /* @__PURE__ */ React38.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React38.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ React38.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Decline"))), /* @__PURE__ */ React38.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React38.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText)));
|
3261
|
+
|
3262
|
+
// src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
|
3263
|
+
var RoleChangeRequestModal = () => {
|
3264
|
+
const hmsActions = useHMSActions13();
|
3265
|
+
const { updateMetaData } = useMyMetadata();
|
3266
|
+
const currentRole = useHMSStore17(selectLocalPeerRoleName);
|
3267
|
+
const roleChangeRequest = useHMSStore17(selectRoleChangeRequest);
|
3268
|
+
const name = useHMSStore17(selectLocalPeerName);
|
3269
|
+
const { sendEvent } = useCustomEvent2({ type: ROLE_CHANGE_DECLINED });
|
3270
|
+
useEffect7(() => {
|
3271
|
+
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
3272
|
+
return;
|
3273
|
+
}
|
3274
|
+
(() => __async(void 0, null, function* () {
|
3275
|
+
yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
|
3276
|
+
}))();
|
3277
|
+
}, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
|
3278
|
+
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
3279
|
+
return null;
|
3280
|
+
}
|
3281
|
+
const body = /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(
|
3282
|
+
Text,
|
3283
|
+
{
|
3284
|
+
variant: "xs",
|
3285
|
+
css: {
|
3286
|
+
c: "$on_surface_medium",
|
3287
|
+
textAlign: "center",
|
3288
|
+
"@md": { textAlign: "left", borderBottom: "1px solid $border_bright", pb: "$4", px: "$8" }
|
3289
|
+
}
|
3290
|
+
},
|
3291
|
+
"Setup your audio and video before joining"
|
3292
|
+
), /* @__PURE__ */ React39.createElement(
|
3293
|
+
Flex,
|
3294
|
+
{
|
3295
|
+
align: "center",
|
3296
|
+
justify: "center",
|
3297
|
+
css: {
|
3298
|
+
"@sm": { width: "100%" },
|
3299
|
+
flexDirection: "column",
|
3300
|
+
mt: "$6",
|
3301
|
+
"@md": { px: "$8" }
|
3302
|
+
}
|
3303
|
+
},
|
3304
|
+
/* @__PURE__ */ React39.createElement(PreviewTile, { name: name || "" }),
|
3305
|
+
/* @__PURE__ */ React39.createElement(PreviewControls, { hideSettings: true })
|
3306
|
+
));
|
3307
|
+
return /* @__PURE__ */ React39.createElement(
|
3308
|
+
RequestPrompt,
|
3309
|
+
{
|
3310
|
+
title: "You're invited to join the stage",
|
3311
|
+
onOpenChange: (value) => __async(void 0, null, function* () {
|
3312
|
+
var _a;
|
3313
|
+
if (!value) {
|
3314
|
+
hmsActions.rejectChangeRole(roleChangeRequest);
|
3315
|
+
sendEvent(__spreadProps(__spreadValues({}, roleChangeRequest), { peerName: name }), { peerId: (_a = roleChangeRequest.requestedBy) == null ? void 0 : _a.id });
|
3316
|
+
yield hmsActions.cancelMidCallPreview();
|
3317
|
+
yield hmsActions.lowerLocalPeerHand();
|
3318
|
+
}
|
3319
|
+
}),
|
3320
|
+
body,
|
3321
|
+
onAction: () => __async(void 0, null, function* () {
|
3322
|
+
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
3323
|
+
yield updateMetaData({ prevRole: currentRole });
|
3324
|
+
yield hmsActions.lowerLocalPeerHand();
|
3325
|
+
}),
|
3326
|
+
actionText: "Accept"
|
3327
|
+
}
|
3328
|
+
);
|
3329
|
+
};
|
3330
|
+
|
3260
3331
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
3261
|
-
import
|
3262
|
-
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as
|
3332
|
+
import React62, { Suspense as Suspense2, useEffect as useEffect24 } from "react";
|
3333
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName3, useHMSActions as useHMSActions21, useHMSStore as useHMSStore34 } from "@100mslive/react-sdk";
|
3263
3334
|
|
3264
3335
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
3265
|
-
import
|
3336
|
+
import React51, { useEffect as useEffect15, useMemo as useMemo6, useState as useState26 } from "react";
|
3266
3337
|
import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as useHMSStore23, useHMSVanillaStore as useHMSVanillaStore4 } from "@100mslive/react-sdk";
|
3267
3338
|
|
3268
3339
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3269
|
-
import
|
3270
|
-
import { useMedia as
|
3340
|
+
import React44, { useEffect as useEffect11, useMemo as useMemo3, useState as useState21 } from "react";
|
3341
|
+
import { useMedia as useMedia9 } from "react-use";
|
3271
3342
|
import { selectLocalPeer as selectLocalPeer2, useHMSStore as useHMSStore19 } from "@100mslive/react-sdk";
|
3272
3343
|
|
3273
3344
|
// src/Prebuilt/components/InsetTile.tsx
|
3274
|
-
import
|
3345
|
+
import React41, { useEffect as useEffect8, useRef as useRef6 } from "react";
|
3275
3346
|
import Draggable from "react-draggable";
|
3276
|
-
import { useMedia as
|
3347
|
+
import { useMedia as useMedia7 } from "react-use";
|
3277
3348
|
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
3278
3349
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
3279
3350
|
|
3280
3351
|
// src/Prebuilt/components/hooks/useVideoTileLayout.ts
|
3281
|
-
import
|
3282
|
-
var VideoTileContext =
|
3352
|
+
import React40, { useContext } from "react";
|
3353
|
+
var VideoTileContext = React40.createContext({
|
3283
3354
|
enableSpotlightingPeer: true,
|
3284
3355
|
hideParticipantNameOnTile: false,
|
3285
3356
|
roundedVideoTile: true,
|
@@ -3295,14 +3366,14 @@ var useVideoTileContext = () => {
|
|
3295
3366
|
|
3296
3367
|
// src/Prebuilt/components/InsetTile.tsx
|
3297
3368
|
var MinimisedTile = ({ setMinimised }) => {
|
3298
|
-
return /* @__PURE__ */
|
3369
|
+
return /* @__PURE__ */ React41.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ React41.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ React41.createElement(Text, null, "You"), /* @__PURE__ */ React41.createElement(
|
3299
3370
|
IconButton_default,
|
3300
3371
|
{
|
3301
3372
|
className: "__cancel-drag-event",
|
3302
3373
|
onClick: () => setMinimised(false),
|
3303
3374
|
css: { bg: "transparent", border: "transparent" }
|
3304
3375
|
},
|
3305
|
-
/* @__PURE__ */
|
3376
|
+
/* @__PURE__ */ React41.createElement(ExpandIcon2, null)
|
3306
3377
|
));
|
3307
3378
|
};
|
3308
3379
|
var insetHeightPx = 180;
|
@@ -3310,8 +3381,8 @@ var insetMaxWidthPx = 240;
|
|
3310
3381
|
var defaultMobileAspectRatio = 9 / 16;
|
3311
3382
|
var desktopAspectRatio = 1 / defaultMobileAspectRatio;
|
3312
3383
|
var InsetTile = () => {
|
3313
|
-
const isMobile =
|
3314
|
-
const isLandscape =
|
3384
|
+
const isMobile = useMedia7(config.media.md);
|
3385
|
+
const isLandscape = useMedia7(config.media.ls);
|
3315
3386
|
const localPeer = useHMSStore18(selectLocalPeer);
|
3316
3387
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
3317
3388
|
const videoTrack = useHMSStore18(selectVideoTrackByID(localPeer == null ? void 0 : localPeer.videoTrack));
|
@@ -3328,7 +3399,7 @@ var InsetTile = () => {
|
|
3328
3399
|
height = width / aspectRatio;
|
3329
3400
|
}
|
3330
3401
|
const nodeRef = useRef6(null);
|
3331
|
-
|
3402
|
+
useEffect8(() => {
|
3332
3403
|
const node = nodeRef.current;
|
3333
3404
|
if (!node || !window.ResizeObserver) {
|
3334
3405
|
return;
|
@@ -3349,7 +3420,7 @@ var InsetTile = () => {
|
|
3349
3420
|
if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {
|
3350
3421
|
return null;
|
3351
3422
|
}
|
3352
|
-
return /* @__PURE__ */
|
3423
|
+
return /* @__PURE__ */ React41.createElement(Draggable, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ React41.createElement(
|
3353
3424
|
Box,
|
3354
3425
|
{
|
3355
3426
|
ref: nodeRef,
|
@@ -3365,7 +3436,7 @@ var InsetTile = () => {
|
|
3365
3436
|
h: height
|
3366
3437
|
} : {})
|
3367
3438
|
},
|
3368
|
-
minimised ? /* @__PURE__ */
|
3439
|
+
minimised ? /* @__PURE__ */ React41.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ React41.createElement(
|
3369
3440
|
VideoTile_default,
|
3370
3441
|
__spreadProps(__spreadValues({
|
3371
3442
|
peerId: localPeer == null ? void 0 : localPeer.id,
|
@@ -3387,7 +3458,7 @@ var InsetTile = () => {
|
|
3387
3458
|
};
|
3388
3459
|
|
3389
3460
|
// src/Prebuilt/components/Pagination.tsx
|
3390
|
-
import
|
3461
|
+
import React42, { useEffect as useEffect9 } from "react";
|
3391
3462
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@100mslive/react-icons";
|
3392
3463
|
var Pagination = ({
|
3393
3464
|
page,
|
@@ -3404,7 +3475,7 @@ var Pagination = ({
|
|
3404
3475
|
e.stopPropagation();
|
3405
3476
|
onPageChange(Math.max(page - 1, 0));
|
3406
3477
|
};
|
3407
|
-
|
3478
|
+
useEffect9(() => {
|
3408
3479
|
if (page >= numPages) {
|
3409
3480
|
onPageChange(Math.max(0, numPages - 1));
|
3410
3481
|
}
|
@@ -3412,7 +3483,7 @@ var Pagination = ({
|
|
3412
3483
|
if (numPages <= 1) {
|
3413
3484
|
return null;
|
3414
3485
|
}
|
3415
|
-
return /* @__PURE__ */
|
3486
|
+
return /* @__PURE__ */ React42.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React42.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React42.createElement(ChevronLeftIcon2, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React42.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React42.createElement(
|
3416
3487
|
StyledPagination.Dot,
|
3417
3488
|
{
|
3418
3489
|
key: i,
|
@@ -3422,15 +3493,15 @@ var Pagination = ({
|
|
3422
3493
|
onPageChange(i);
|
3423
3494
|
}
|
3424
3495
|
}
|
3425
|
-
))) : null, /* @__PURE__ */
|
3496
|
+
))) : null, /* @__PURE__ */ React42.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React42.createElement(ChevronRightIcon2, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
|
3426
3497
|
};
|
3427
3498
|
|
3428
3499
|
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
3429
|
-
import
|
3430
|
-
var Grid =
|
3500
|
+
import React43 from "react";
|
3501
|
+
var Grid = React43.forwardRef(
|
3431
3502
|
({ tiles, edgeToEdge }, ref) => {
|
3432
3503
|
const videoTileProps = useVideoTileContext();
|
3433
|
-
return /* @__PURE__ */
|
3504
|
+
return /* @__PURE__ */ React43.createElement(
|
3434
3505
|
Box,
|
3435
3506
|
{
|
3436
3507
|
ref,
|
@@ -3448,7 +3519,7 @@ var Grid = React41.forwardRef(
|
|
3448
3519
|
},
|
3449
3520
|
tiles == null ? void 0 : tiles.map((tile) => {
|
3450
3521
|
var _a, _b, _c, _d;
|
3451
|
-
return /* @__PURE__ */
|
3522
|
+
return /* @__PURE__ */ React43.createElement(
|
3452
3523
|
VideoTile_default,
|
3453
3524
|
__spreadValues({
|
3454
3525
|
key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
|
@@ -3466,8 +3537,8 @@ var Grid = React41.forwardRef(
|
|
3466
3537
|
);
|
3467
3538
|
|
3468
3539
|
// src/Prebuilt/components/hooks/useTileLayout.tsx
|
3469
|
-
import { useEffect as
|
3470
|
-
import { useMeasure as useMeasure2, useMedia as
|
3540
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState20 } from "react";
|
3541
|
+
import { useMeasure as useMeasure2, useMedia as useMedia8 } from "react-use";
|
3471
3542
|
import {
|
3472
3543
|
getPeersWithTiles,
|
3473
3544
|
selectTracksMap as selectTracksMap3,
|
@@ -3503,9 +3574,9 @@ var useTileLayout = ({
|
|
3503
3574
|
}) => {
|
3504
3575
|
const vanillaStore = useHMSVanillaStore3();
|
3505
3576
|
const [ref, { width, height }] = useMeasure2();
|
3506
|
-
const isMobile =
|
3577
|
+
const isMobile = useMedia8(config.media.lg);
|
3507
3578
|
const [pagesWithTiles, setPagesWithTiles] = useState20([]);
|
3508
|
-
|
3579
|
+
useEffect10(() => {
|
3509
3580
|
if (width === 0 || height === 0) {
|
3510
3581
|
return;
|
3511
3582
|
}
|
@@ -3573,7 +3644,7 @@ var useTileLayout = ({
|
|
3573
3644
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
3574
3645
|
var _a;
|
3575
3646
|
const localPeer = useHMSStore19(selectLocalPeer2);
|
3576
|
-
const isMobile =
|
3647
|
+
const isMobile = useMedia9(config.media.md);
|
3577
3648
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
3578
3649
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
3579
3650
|
let pageList = usePagesWithTiles({
|
@@ -3595,12 +3666,12 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
3595
3666
|
});
|
3596
3667
|
const [page, setPage] = useState21(0);
|
3597
3668
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3598
|
-
|
3669
|
+
useEffect11(() => {
|
3599
3670
|
if (pageSize > 0) {
|
3600
3671
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3601
3672
|
}
|
3602
3673
|
}, [pageSize, onPageSize]);
|
3603
|
-
return /* @__PURE__ */
|
3674
|
+
return /* @__PURE__ */ React44.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ React44.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ React44.createElement(
|
3604
3675
|
Pagination,
|
3605
3676
|
{
|
3606
3677
|
page,
|
@@ -3610,20 +3681,20 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
3610
3681
|
},
|
3611
3682
|
numPages: pagesWithTiles.length
|
3612
3683
|
}
|
3613
|
-
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */
|
3684
|
+
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */ React44.createElement(InsetTile, null));
|
3614
3685
|
}
|
3615
3686
|
|
3616
3687
|
// src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
|
3617
|
-
import
|
3688
|
+
import React47, { useEffect as useEffect13, useState as useState23 } from "react";
|
3618
3689
|
import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
|
3619
3690
|
|
3620
3691
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
3621
|
-
import
|
3622
|
-
import { useMedia as
|
3692
|
+
import React46, { useEffect as useEffect12, useState as useState22 } from "react";
|
3693
|
+
import { useMedia as useMedia10 } from "react-use";
|
3623
3694
|
|
3624
3695
|
// src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
|
3625
|
-
import
|
3626
|
-
var Root = ({ children, edgeToEdge }) => /* @__PURE__ */
|
3696
|
+
import React45 from "react";
|
3697
|
+
var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React45.createElement(
|
3627
3698
|
Flex,
|
3628
3699
|
{
|
3629
3700
|
direction: "column",
|
@@ -3632,7 +3703,7 @@ var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React43.createElement(
|
|
3632
3703
|
children
|
3633
3704
|
);
|
3634
3705
|
var ProminentSection = ({ children, css = {} }) => {
|
3635
|
-
return /* @__PURE__ */
|
3706
|
+
return /* @__PURE__ */ React45.createElement(Flex, { direction: "column", css: __spreadValues({ flex: "1 1 0", gap: "$2", minHeight: 0 }, css) }, children);
|
3636
3707
|
};
|
3637
3708
|
var SecondarySection = ({
|
3638
3709
|
tiles,
|
@@ -3643,12 +3714,12 @@ var SecondarySection = ({
|
|
3643
3714
|
if (!(tiles == null ? void 0 : tiles.length)) {
|
3644
3715
|
return null;
|
3645
3716
|
}
|
3646
|
-
return /* @__PURE__ */
|
3717
|
+
return /* @__PURE__ */ React45.createElement(
|
3647
3718
|
Box,
|
3648
3719
|
{
|
3649
3720
|
css: {
|
3650
3721
|
display: "grid",
|
3651
|
-
gridTemplateRows:
|
3722
|
+
gridTemplateRows: React45.Children.count(children) > 0 ? "136px auto" : "154px",
|
3652
3723
|
gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,
|
3653
3724
|
margin: "0 auto",
|
3654
3725
|
gap: "$2 $4",
|
@@ -3658,7 +3729,7 @@ var SecondarySection = ({
|
|
3658
3729
|
},
|
3659
3730
|
tiles.map((tile) => {
|
3660
3731
|
var _a, _b, _c, _d;
|
3661
|
-
return /* @__PURE__ */
|
3732
|
+
return /* @__PURE__ */ React45.createElement(
|
3662
3733
|
VideoTile_default,
|
3663
3734
|
__spreadValues({
|
3664
3735
|
key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
|
@@ -3675,7 +3746,7 @@ var SecondarySection = ({
|
|
3675
3746
|
}, tileLayoutProps)
|
3676
3747
|
);
|
3677
3748
|
}),
|
3678
|
-
/* @__PURE__ */
|
3749
|
+
/* @__PURE__ */ React45.createElement(Box, { css: { gridColumn: `1/span ${tiles.length}` } }, children)
|
3679
3750
|
);
|
3680
3751
|
};
|
3681
3752
|
var ProminenceLayout = {
|
@@ -3687,17 +3758,17 @@ var ProminenceLayout = {
|
|
3687
3758
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
3688
3759
|
var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
3689
3760
|
var _a;
|
3690
|
-
const isMobile =
|
3761
|
+
const isMobile = useMedia10(config.media.md);
|
3691
3762
|
const maxTileCount = isMobile ? 2 : 4;
|
3692
3763
|
const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });
|
3693
3764
|
const [page, setPage] = useState22(0);
|
3694
3765
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3695
|
-
|
3766
|
+
useEffect12(() => {
|
3696
3767
|
if (pageSize > 0) {
|
3697
3768
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3698
3769
|
}
|
3699
3770
|
}, [pageSize, onPageSize]);
|
3700
|
-
return /* @__PURE__ */
|
3771
|
+
return /* @__PURE__ */ React46.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge }, !edgeToEdge && /* @__PURE__ */ React46.createElement(
|
3701
3772
|
Pagination,
|
3702
3773
|
{
|
3703
3774
|
page,
|
@@ -3767,12 +3838,12 @@ function RoleProminence({
|
|
3767
3838
|
});
|
3768
3839
|
const [page, setPage] = useState23(0);
|
3769
3840
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3770
|
-
|
3841
|
+
useEffect13(() => {
|
3771
3842
|
if (pageSize > 0) {
|
3772
3843
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3773
3844
|
}
|
3774
3845
|
}, [pageSize, onPageSize]);
|
3775
|
-
return /* @__PURE__ */
|
3846
|
+
return /* @__PURE__ */ React47.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React47.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React47.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ React47.createElement(
|
3776
3847
|
Pagination,
|
3777
3848
|
{
|
3778
3849
|
page,
|
@@ -3782,20 +3853,20 @@ function RoleProminence({
|
|
3782
3853
|
},
|
3783
3854
|
numPages: pagesWithTiles.length
|
3784
3855
|
}
|
3785
|
-
), /* @__PURE__ */
|
3856
|
+
), /* @__PURE__ */ React47.createElement(SecondaryTiles, { peers: secondaryPeers, isInsetEnabled, edgeToEdge }), isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && /* @__PURE__ */ React47.createElement(InsetTile, null));
|
3786
3857
|
}
|
3787
3858
|
|
3788
3859
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
3789
|
-
import
|
3790
|
-
import { useMedia as
|
3860
|
+
import React50, { useEffect as useEffect14, useMemo as useMemo5, useState as useState25 } from "react";
|
3861
|
+
import { useMedia as useMedia11 } from "react-use";
|
3791
3862
|
import { selectPeersScreenSharing, useHMSStore as useHMSStore22 } from "@100mslive/react-sdk";
|
3792
3863
|
|
3793
3864
|
// src/Prebuilt/components/ScreenshareTile.jsx
|
3794
|
-
import
|
3865
|
+
import React49, { useRef as useRef7, useState as useState24 } from "react";
|
3795
3866
|
import { useFullscreen as useFullscreen2 } from "react-use";
|
3796
3867
|
import screenfull2 from "screenfull";
|
3797
3868
|
import {
|
3798
|
-
selectLocalPeerID as
|
3869
|
+
selectLocalPeerID as selectLocalPeerID5,
|
3799
3870
|
selectPeerByID as selectPeerByID2,
|
3800
3871
|
selectScreenShareAudioByPeerID,
|
3801
3872
|
selectScreenShareByPeerID,
|
@@ -3804,12 +3875,12 @@ import {
|
|
3804
3875
|
import { ExpandIcon as ExpandIcon3, ShrinkIcon } from "@100mslive/react-icons";
|
3805
3876
|
|
3806
3877
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
3807
|
-
import
|
3878
|
+
import React48 from "react";
|
3808
3879
|
import { useHMSActions as useHMSActions14 } from "@100mslive/react-sdk";
|
3809
3880
|
import { CrossIcon as CrossIcon5, ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
|
3810
3881
|
var ScreenshareDisplay = () => {
|
3811
3882
|
const hmsActions = useHMSActions14();
|
3812
|
-
return /* @__PURE__ */
|
3883
|
+
return /* @__PURE__ */ React48.createElement(
|
3813
3884
|
Flex,
|
3814
3885
|
{
|
3815
3886
|
direction: "column",
|
@@ -3821,9 +3892,9 @@ var ScreenshareDisplay = () => {
|
|
3821
3892
|
color: "$on_surface_high"
|
3822
3893
|
}
|
3823
3894
|
},
|
3824
|
-
/* @__PURE__ */
|
3825
|
-
/* @__PURE__ */
|
3826
|
-
/* @__PURE__ */
|
3895
|
+
/* @__PURE__ */ React48.createElement(ShareScreenIcon2, { width: 48, height: 48 }),
|
3896
|
+
/* @__PURE__ */ React48.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
|
3897
|
+
/* @__PURE__ */ React48.createElement(
|
3827
3898
|
Button,
|
3828
3899
|
{
|
3829
3900
|
variant: "danger",
|
@@ -3833,7 +3904,7 @@ var ScreenshareDisplay = () => {
|
|
3833
3904
|
}),
|
3834
3905
|
"data-testid": "stop_screen_share_btn"
|
3835
3906
|
},
|
3836
|
-
/* @__PURE__ */
|
3907
|
+
/* @__PURE__ */ React48.createElement(CrossIcon5, { width: 18, height: 18 }),
|
3837
3908
|
"\xA0 Stop screen share"
|
3838
3909
|
)
|
3839
3910
|
);
|
@@ -3849,7 +3920,7 @@ var labelStyles = {
|
|
3849
3920
|
flexShrink: 0
|
3850
3921
|
};
|
3851
3922
|
var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
3852
|
-
const isLocal = useHMSStore21(
|
3923
|
+
const isLocal = useHMSStore21(selectLocalPeerID5) === peerId;
|
3853
3924
|
const track = useHMSStore21(selectScreenShareByPeerID(peerId));
|
3854
3925
|
const peer = useHMSStore21(selectPeerByID2(peerId));
|
3855
3926
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
@@ -3863,7 +3934,7 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3863
3934
|
const isFullScreenSupported = screenfull2.isEnabled;
|
3864
3935
|
const audioTrack = useHMSStore21(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
|
3865
3936
|
if (isLocal && !["browser", "window", "application"].includes(track == null ? void 0 : track.displaySurface)) {
|
3866
|
-
return /* @__PURE__ */
|
3937
|
+
return /* @__PURE__ */ React49.createElement(ScreenshareDisplay, null);
|
3867
3938
|
}
|
3868
3939
|
if (!peer) {
|
3869
3940
|
return null;
|
@@ -3873,7 +3944,7 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3873
3944
|
isLocal: false,
|
3874
3945
|
track
|
3875
3946
|
});
|
3876
|
-
return /* @__PURE__ */
|
3947
|
+
return /* @__PURE__ */ React49.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ React49.createElement(
|
3877
3948
|
StyledVideoTile.Container,
|
3878
3949
|
{
|
3879
3950
|
transparentBg: true,
|
@@ -3884,9 +3955,9 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3884
3955
|
setIsMouseHovered(false);
|
3885
3956
|
}
|
3886
3957
|
},
|
3887
|
-
showStatsOnTiles ? /* @__PURE__ */
|
3888
|
-
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */
|
3889
|
-
track ? /* @__PURE__ */
|
3958
|
+
showStatsOnTiles ? /* @__PURE__ */ React49.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
|
3959
|
+
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ React49.createElement(StyledVideoTile.FullScreenButton, { onClick: () => setFullscreen(!fullscreen) }, isFullscreen ? /* @__PURE__ */ React49.createElement(ShrinkIcon, null) : /* @__PURE__ */ React49.createElement(ExpandIcon3, null)) : null,
|
3960
|
+
track ? /* @__PURE__ */ React49.createElement(
|
3890
3961
|
Video,
|
3891
3962
|
{
|
3892
3963
|
screenShare: true,
|
@@ -3896,8 +3967,8 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3896
3967
|
css: { minHeight: 0 }
|
3897
3968
|
}
|
3898
3969
|
) : null,
|
3899
|
-
/* @__PURE__ */
|
3900
|
-
isMouseHovered && !peer.isLocal ? /* @__PURE__ */
|
3970
|
+
/* @__PURE__ */ React49.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
|
3971
|
+
isMouseHovered && !peer.isLocal ? /* @__PURE__ */ React49.createElement(
|
3901
3972
|
TileMenu_default,
|
3902
3973
|
{
|
3903
3974
|
isScreenshare: true,
|
@@ -3909,7 +3980,7 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3909
3980
|
) : null
|
3910
3981
|
));
|
3911
3982
|
};
|
3912
|
-
var ScreenshareTile =
|
3983
|
+
var ScreenshareTile = React49.memo(Tile);
|
3913
3984
|
var ScreenshareTile_default = ScreenshareTile;
|
3914
3985
|
|
3915
3986
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
@@ -3919,18 +3990,18 @@ var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
3919
3990
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
3920
3991
|
const [page, setPage] = useState25(0);
|
3921
3992
|
const activeSharePeer = peersSharing[page];
|
3922
|
-
const isMobile =
|
3993
|
+
const isMobile = useMedia11(config.media.md);
|
3923
3994
|
const secondaryPeers = useMemo5(
|
3924
3995
|
() => isMobile ? activeSharePeer ? [activeSharePeer, ...peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id))] : peers : peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id)),
|
3925
3996
|
[activeSharePeer, peers, isMobile]
|
3926
3997
|
);
|
3927
|
-
|
3998
|
+
useEffect14(() => {
|
3928
3999
|
setActiveScreenSharePeer(isMobile ? "" : activeSharePeer == null ? void 0 : activeSharePeer.id);
|
3929
4000
|
return () => {
|
3930
4001
|
setActiveScreenSharePeer("");
|
3931
4002
|
};
|
3932
4003
|
}, [activeSharePeer == null ? void 0 : activeSharePeer.id, isMobile, setActiveScreenSharePeer]);
|
3933
|
-
return /* @__PURE__ */
|
4004
|
+
return /* @__PURE__ */ React50.createElement(ProminenceLayout.Root, { edgeToEdge }, /* @__PURE__ */ React50.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React50.createElement(ScreenshareTile_default, { peerId: (_a = peersSharing[page]) == null ? void 0 : _a.id }), !edgeToEdge && /* @__PURE__ */ React50.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ React50.createElement(
|
3934
4005
|
SecondaryTiles,
|
3935
4006
|
{
|
3936
4007
|
peers: secondaryPeers,
|
@@ -4060,7 +4131,7 @@ var GridLayout = ({
|
|
4060
4131
|
hideMetadataOnTile: hide_metadata_on_tile,
|
4061
4132
|
objectFit: video_object_fit
|
4062
4133
|
};
|
4063
|
-
|
4134
|
+
useEffect15(() => {
|
4064
4135
|
if (mainPage !== 0) {
|
4065
4136
|
return;
|
4066
4137
|
}
|
@@ -4071,7 +4142,7 @@ var GridLayout = ({
|
|
4071
4142
|
peersSorter.onUpdate(setSortedPeers);
|
4072
4143
|
}, [mainPage, peersSorter, updatedPeers, pageSize]);
|
4073
4144
|
if (peerSharing) {
|
4074
|
-
return /* @__PURE__ */
|
4145
|
+
return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
|
4075
4146
|
ScreenshareLayout,
|
4076
4147
|
{
|
4077
4148
|
peers: sortedPeers,
|
@@ -4081,7 +4152,7 @@ var GridLayout = ({
|
|
4081
4152
|
}
|
4082
4153
|
));
|
4083
4154
|
} else if (isRoleProminence) {
|
4084
|
-
return /* @__PURE__ */
|
4155
|
+
return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
|
4085
4156
|
RoleProminence,
|
4086
4157
|
{
|
4087
4158
|
peers: sortedPeers,
|
@@ -4093,7 +4164,7 @@ var GridLayout = ({
|
|
4093
4164
|
}
|
4094
4165
|
));
|
4095
4166
|
}
|
4096
|
-
return /* @__PURE__ */
|
4167
|
+
return /* @__PURE__ */ React51.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React51.createElement(
|
4097
4168
|
EqualProminence,
|
4098
4169
|
{
|
4099
4170
|
peers: sortedPeers,
|
@@ -4106,7 +4177,7 @@ var GridLayout = ({
|
|
4106
4177
|
};
|
4107
4178
|
|
4108
4179
|
// src/Prebuilt/layouts/EmbedView.jsx
|
4109
|
-
import
|
4180
|
+
import React52, { useCallback as useCallback8, useEffect as useEffect16, useMemo as useMemo7, useRef as useRef8, useState as useState27 } from "react";
|
4110
4181
|
import {
|
4111
4182
|
selectPeers as selectPeers3,
|
4112
4183
|
selectPeerScreenSharing as selectPeerScreenSharing2,
|
@@ -4115,7 +4186,7 @@ import {
|
|
4115
4186
|
useScreenShare as useScreenShare3
|
4116
4187
|
} from "@100mslive/react-sdk";
|
4117
4188
|
var EmbedView = () => {
|
4118
|
-
return /* @__PURE__ */
|
4189
|
+
return /* @__PURE__ */ React52.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React52.createElement(EmbedComponent, null));
|
4119
4190
|
};
|
4120
4191
|
var EmbebScreenShareView = ({ children }) => {
|
4121
4192
|
const peers = useHMSStore24(selectPeers3);
|
@@ -4125,13 +4196,13 @@ var EmbebScreenShareView = ({ children }) => {
|
|
4125
4196
|
const smallTilePeers2 = peers.filter((peer) => peer.id !== (peerPresenting == null ? void 0 : peerPresenting.id));
|
4126
4197
|
return smallTilePeers2;
|
4127
4198
|
}, [peers, peerPresenting]);
|
4128
|
-
|
4199
|
+
useEffect16(() => {
|
4129
4200
|
setActiveScreenSharePeer(peerPresenting == null ? void 0 : peerPresenting.id);
|
4130
4201
|
return () => {
|
4131
4202
|
setActiveScreenSharePeer("");
|
4132
4203
|
};
|
4133
4204
|
}, [peerPresenting == null ? void 0 : peerPresenting.id, setActiveScreenSharePeer]);
|
4134
|
-
return /* @__PURE__ */
|
4205
|
+
return /* @__PURE__ */ React52.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React52.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ React52.createElement(SecondaryTiles, { peers: smallTilePeers }));
|
4135
4206
|
};
|
4136
4207
|
var EmbedComponent = () => {
|
4137
4208
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare3(throwErrorHandler);
|
@@ -4145,7 +4216,7 @@ var EmbedComponent = () => {
|
|
4145
4216
|
setEmbedConfig({ url: "" });
|
4146
4217
|
}
|
4147
4218
|
}, [src, setEmbedConfig]);
|
4148
|
-
|
4219
|
+
useEffect16(() => {
|
4149
4220
|
if (embedConfig.shareScreen && !amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
|
4150
4221
|
screenShareAttemptInProgress.current = true;
|
4151
4222
|
toggleScreenShare({
|
@@ -4158,7 +4229,7 @@ var EmbedComponent = () => {
|
|
4158
4229
|
});
|
4159
4230
|
}
|
4160
4231
|
}, []);
|
4161
|
-
|
4232
|
+
useEffect16(() => {
|
4162
4233
|
if (wasScreenShared && !amIScreenSharing) {
|
4163
4234
|
resetEmbedConfig();
|
4164
4235
|
}
|
@@ -4169,7 +4240,7 @@ var EmbedComponent = () => {
|
|
4169
4240
|
}
|
4170
4241
|
};
|
4171
4242
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
4172
|
-
return /* @__PURE__ */
|
4243
|
+
return /* @__PURE__ */ React52.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React52.createElement(
|
4173
4244
|
"iframe",
|
4174
4245
|
{
|
4175
4246
|
src,
|
@@ -4182,10 +4253,10 @@ var EmbedComponent = () => {
|
|
4182
4253
|
};
|
4183
4254
|
|
4184
4255
|
// src/Prebuilt/layouts/PDFView.jsx
|
4185
|
-
import
|
4256
|
+
import React53, { useCallback as useCallback9, useEffect as useEffect17, useRef as useRef9, useState as useState28 } from "react";
|
4186
4257
|
import { throwErrorHandler as throwErrorHandler2, useScreenShare as useScreenShare4 } from "@100mslive/react-sdk";
|
4187
4258
|
var PDFView = () => {
|
4188
|
-
return /* @__PURE__ */
|
4259
|
+
return /* @__PURE__ */ React53.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React53.createElement(PDFEmbedComponent, null));
|
4189
4260
|
};
|
4190
4261
|
var PDFEmbedComponent = () => {
|
4191
4262
|
const ref = useRef9();
|
@@ -4203,7 +4274,7 @@ var PDFEmbedComponent = () => {
|
|
4203
4274
|
const resetEmbedConfig = useCallback9(() => {
|
4204
4275
|
setPDFConfig({ state: false });
|
4205
4276
|
}, [setPDFConfig]);
|
4206
|
-
|
4277
|
+
useEffect17(() => {
|
4207
4278
|
if (isPDFLoaded && ref.current) {
|
4208
4279
|
ref.current.contentWindow.postMessage(
|
4209
4280
|
{
|
@@ -4213,7 +4284,7 @@ var PDFEmbedComponent = () => {
|
|
4213
4284
|
);
|
4214
4285
|
}
|
4215
4286
|
}, [isPDFLoaded, themeType]);
|
4216
|
-
|
4287
|
+
useEffect17(() => {
|
4217
4288
|
if (!amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
|
4218
4289
|
screenShareAttemptInProgress.current = true;
|
4219
4290
|
toggleScreenShare({
|
@@ -4227,7 +4298,7 @@ var PDFEmbedComponent = () => {
|
|
4227
4298
|
});
|
4228
4299
|
}
|
4229
4300
|
}, []);
|
4230
|
-
|
4301
|
+
useEffect17(() => {
|
4231
4302
|
if (wasScreenShared && !amIScreenSharing) {
|
4232
4303
|
resetEmbedConfig();
|
4233
4304
|
}
|
@@ -4238,7 +4309,7 @@ var PDFEmbedComponent = () => {
|
|
4238
4309
|
}
|
4239
4310
|
};
|
4240
4311
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
4241
|
-
return /* @__PURE__ */
|
4312
|
+
return /* @__PURE__ */ React53.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React53.createElement(
|
4242
4313
|
"iframe",
|
4243
4314
|
{
|
4244
4315
|
src: pdfJSURL,
|
@@ -4271,19 +4342,19 @@ var PDFEmbedComponent = () => {
|
|
4271
4342
|
};
|
4272
4343
|
|
4273
4344
|
// src/Prebuilt/layouts/SidePane.tsx
|
4274
|
-
import
|
4275
|
-
import { useMedia as
|
4345
|
+
import React60 from "react";
|
4346
|
+
import { useMedia as useMedia16 } from "react-use";
|
4276
4347
|
import { selectAppData as selectAppData3, selectVideoTrackByPeerID, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
|
4277
4348
|
|
4278
4349
|
// src/Prebuilt/components/SidePaneTabs.tsx
|
4279
|
-
import
|
4280
|
-
import { useMedia as
|
4350
|
+
import React57, { useEffect as useEffect22, useState as useState32 } from "react";
|
4351
|
+
import { useMedia as useMedia15 } from "react-use";
|
4281
4352
|
import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore30 } from "@100mslive/react-sdk";
|
4282
4353
|
import { CrossIcon as CrossIcon7 } from "@100mslive/react-icons";
|
4283
4354
|
|
4284
4355
|
// src/Prebuilt/components/Chat/Chat.jsx
|
4285
|
-
import
|
4286
|
-
import { useMedia as
|
4356
|
+
import React56, { useCallback as useCallback14, useEffect as useEffect21, useRef as useRef13, useState as useState31 } from "react";
|
4357
|
+
import { useMedia as useMedia14 } from "react-use";
|
4287
4358
|
import {
|
4288
4359
|
HMSNotificationTypes,
|
4289
4360
|
selectHMSMessagesCount,
|
@@ -4297,21 +4368,21 @@ import {
|
|
4297
4368
|
import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as CrossIcon6, PinIcon as PinIcon2 } from "@100mslive/react-icons";
|
4298
4369
|
|
4299
4370
|
// src/Prebuilt/components/Chat/ChatBody.jsx
|
4300
|
-
import
|
4371
|
+
import React54, { Fragment as Fragment8, useCallback as useCallback11, useEffect as useEffect18, useLayoutEffect, useMemo as useMemo8, useRef as useRef10, useState as useState29 } from "react";
|
4301
4372
|
import { useInView } from "react-intersection-observer";
|
4302
|
-
import { useMedia as
|
4373
|
+
import { useMedia as useMedia12 } from "react-use";
|
4303
4374
|
import AutoSizer from "react-virtualized-auto-sizer";
|
4304
4375
|
import { VariableSizeList } from "react-window";
|
4305
4376
|
import {
|
4306
4377
|
selectHMSMessages,
|
4307
|
-
selectLocalPeerID as
|
4308
|
-
selectLocalPeerRoleName,
|
4378
|
+
selectLocalPeerID as selectLocalPeerID6,
|
4379
|
+
selectLocalPeerRoleName as selectLocalPeerRoleName2,
|
4309
4380
|
selectMessagesByPeerID,
|
4310
4381
|
selectMessagesByRole,
|
4311
4382
|
selectPeerNameByID as selectPeerNameByID2,
|
4312
4383
|
selectPermissions as selectPermissions9,
|
4313
4384
|
useHMSActions as useHMSActions16,
|
4314
|
-
useHMSStore as
|
4385
|
+
useHMSStore as useHMSStore27
|
4315
4386
|
} from "@100mslive/react-sdk";
|
4316
4387
|
import { PinIcon, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
|
4317
4388
|
|
@@ -4347,6 +4418,19 @@ var useSetPinnedMessage = () => {
|
|
4347
4418
|
return { setPinnedMessage };
|
4348
4419
|
};
|
4349
4420
|
|
4421
|
+
// src/Prebuilt/components/Chat/useUnreadCount.js
|
4422
|
+
import {
|
4423
|
+
selectMessagesUnreadCountByPeerID,
|
4424
|
+
selectMessagesUnreadCountByRole,
|
4425
|
+
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
|
4426
|
+
useHMSStore as useHMSStore26
|
4427
|
+
} from "@100mslive/react-sdk";
|
4428
|
+
var useUnreadCount = ({ role, peerId }) => {
|
4429
|
+
const unreadCountSelector = role ? selectMessagesUnreadCountByRole(role) : peerId ? selectMessagesUnreadCountByPeerID(peerId) : selectUnreadHMSMessagesCount2;
|
4430
|
+
const unreadCount = useHMSStore26(unreadCountSelector);
|
4431
|
+
return unreadCount;
|
4432
|
+
};
|
4433
|
+
|
4350
4434
|
// src/Prebuilt/components/Chat/ChatBody.jsx
|
4351
4435
|
var formatTime = (date) => {
|
4352
4436
|
if (!(date instanceof Date)) {
|
@@ -4364,7 +4448,7 @@ var formatTime = (date) => {
|
|
4364
4448
|
return `${hours}:${mins} ${suffix}`;
|
4365
4449
|
};
|
4366
4450
|
var MessageTypeContainer = ({ left, right }) => {
|
4367
|
-
return /* @__PURE__ */
|
4451
|
+
return /* @__PURE__ */ React54.createElement(
|
4368
4452
|
Flex,
|
4369
4453
|
{
|
4370
4454
|
align: "center",
|
@@ -4376,16 +4460,16 @@ var MessageTypeContainer = ({ left, right }) => {
|
|
4376
4460
|
r: "$0"
|
4377
4461
|
}
|
4378
4462
|
},
|
4379
|
-
left && /* @__PURE__ */
|
4380
|
-
left && right && /* @__PURE__ */
|
4381
|
-
right && /* @__PURE__ */
|
4463
|
+
left && /* @__PURE__ */ React54.createElement(SenderName, { variant: "tiny", as: "span", css: { color: "$on_surface_medium" } }, left),
|
4464
|
+
left && right && /* @__PURE__ */ React54.createElement(Box, { css: { borderLeft: "1px solid $border_bright", mx: "$4", h: "$8" } }),
|
4465
|
+
right && /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "tiny", css: { textTransform: "uppercase" } }, right)
|
4382
4466
|
);
|
4383
4467
|
};
|
4384
4468
|
var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
4385
|
-
const peerName =
|
4386
|
-
const localPeerRoleName =
|
4469
|
+
const peerName = useHMSStore27(selectPeerNameByID2(receiver));
|
4470
|
+
const localPeerRoleName = useHMSStore27(selectLocalPeerRoleName2);
|
4387
4471
|
if (receiver) {
|
4388
|
-
return /* @__PURE__ */
|
4472
|
+
return /* @__PURE__ */ React54.createElement(
|
4389
4473
|
MessageTypeContainer,
|
4390
4474
|
{
|
4391
4475
|
left: hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ""}` : "TO YOU",
|
@@ -4394,7 +4478,7 @@ var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
|
4394
4478
|
);
|
4395
4479
|
}
|
4396
4480
|
if (roles && roles.length) {
|
4397
|
-
return /* @__PURE__ */
|
4481
|
+
return /* @__PURE__ */ React54.createElement(MessageTypeContainer, { left: "TO", right: hasCurrentUserSent ? roles.join(",") : localPeerRoleName });
|
4398
4482
|
}
|
4399
4483
|
return null;
|
4400
4484
|
};
|
@@ -4408,10 +4492,10 @@ var Link = styled("a", {
|
|
4408
4492
|
});
|
4409
4493
|
var AnnotisedMessage = ({ message }) => {
|
4410
4494
|
if (!message) {
|
4411
|
-
return /* @__PURE__ */
|
4495
|
+
return /* @__PURE__ */ React54.createElement(Fragment8, null);
|
4412
4496
|
}
|
4413
|
-
return /* @__PURE__ */
|
4414
|
-
(part) => URL_REGEX.test(part) ? /* @__PURE__ */
|
4497
|
+
return /* @__PURE__ */ React54.createElement(Fragment8, null, message.trim().split(/(\s)/).map(
|
4498
|
+
(part) => URL_REGEX.test(part) ? /* @__PURE__ */ React54.createElement(Link, { href: part, key: part, target: "_blank", rel: "noopener noreferrer" }, part) : part
|
4415
4499
|
));
|
4416
4500
|
};
|
4417
4501
|
var getMessageType = ({ roles, receiver }) => {
|
@@ -4425,14 +4509,14 @@ var ChatActions = ({ onPin, showPinAction }) => {
|
|
4425
4509
|
if (!showPinAction) {
|
4426
4510
|
return null;
|
4427
4511
|
}
|
4428
|
-
return /* @__PURE__ */
|
4512
|
+
return /* @__PURE__ */ React54.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React54.createElement(Dropdown.Trigger, { className: "chat_actions", css: { opacity: open ? 1 : 0, "@md": { opacity: 1 } }, asChild: true }, /* @__PURE__ */ React54.createElement(IconButton, null, /* @__PURE__ */ React54.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React54.createElement(VerticalMenuIcon5, null)))), /* @__PURE__ */ React54.createElement(Dropdown.Portal, null, /* @__PURE__ */ React54.createElement(
|
4429
4513
|
Dropdown.Content,
|
4430
4514
|
{
|
4431
4515
|
sideOffset: 5,
|
4432
4516
|
align: "end",
|
4433
4517
|
css: { width: "$48", backgroundColor: "$surface_bright", py: "$0", border: "1px solid $border_bright" }
|
4434
4518
|
},
|
4435
|
-
/* @__PURE__ */
|
4519
|
+
/* @__PURE__ */ React54.createElement(Dropdown.Item, { "data-testid": "pin_message_btn", onClick: onPin }, /* @__PURE__ */ React54.createElement(PinIcon, null), /* @__PURE__ */ React54.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Pin Message"))
|
4436
4520
|
)));
|
4437
4521
|
};
|
4438
4522
|
var SenderName = styled(Text, {
|
@@ -4444,120 +4528,127 @@ var SenderName = styled(Text, {
|
|
4444
4528
|
color: "$on_surface_high",
|
4445
4529
|
fontWeight: "$semiBold"
|
4446
4530
|
});
|
4447
|
-
var ChatMessage =
|
4448
|
-
|
4449
|
-
|
4450
|
-
|
4451
|
-
|
4452
|
-
|
4453
|
-
|
4454
|
-
|
4455
|
-
|
4456
|
-
|
4457
|
-
|
4458
|
-
|
4459
|
-
|
4460
|
-
|
4461
|
-
|
4462
|
-
|
4463
|
-
|
4464
|
-
|
4465
|
-
|
4466
|
-
|
4467
|
-
|
4468
|
-
|
4469
|
-
|
4470
|
-
|
4471
|
-
|
4472
|
-
|
4473
|
-
|
4474
|
-
|
4475
|
-
|
4476
|
-
|
4477
|
-
|
4478
|
-
|
4479
|
-
|
4480
|
-
/* @__PURE__ */ React52.createElement(
|
4481
|
-
Flex,
|
4531
|
+
var ChatMessage = React54.memo(
|
4532
|
+
({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {
|
4533
|
+
var _a, _b;
|
4534
|
+
const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });
|
4535
|
+
const rowRef = useRef10(null);
|
4536
|
+
useEffect18(() => {
|
4537
|
+
if (rowRef.current) {
|
4538
|
+
setRowHeight(index, rowRef.current.clientHeight);
|
4539
|
+
}
|
4540
|
+
}, [index, setRowHeight]);
|
4541
|
+
const isMobile = useMedia12(config.media.md);
|
4542
|
+
const { elements } = useRoomLayoutConferencingScreen();
|
4543
|
+
const isOverlay = ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
4544
|
+
const hmsActions = useHMSActions16();
|
4545
|
+
const localPeerId = useHMSStore27(selectLocalPeerID6);
|
4546
|
+
const permissions = useHMSStore27(selectPermissions9);
|
4547
|
+
const messageType = getMessageType({
|
4548
|
+
roles: message.recipientRoles,
|
4549
|
+
receiver: message.recipientPeer
|
4550
|
+
});
|
4551
|
+
const showPinAction = permissions.removeOthers && !messageType && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages);
|
4552
|
+
useEffect18(() => {
|
4553
|
+
if (message.id && !message.read && inView) {
|
4554
|
+
hmsActions.setMessageRead(true, message.id);
|
4555
|
+
}
|
4556
|
+
}, [message.read, hmsActions, inView, message.id]);
|
4557
|
+
useEffect18(() => {
|
4558
|
+
if (isLast && inView && unreadCount >= 1) {
|
4559
|
+
scrollToBottom(1);
|
4560
|
+
}
|
4561
|
+
}, [inView, isLast, scrollToBottom, unreadCount]);
|
4562
|
+
return /* @__PURE__ */ React54.createElement(
|
4563
|
+
Box,
|
4482
4564
|
{
|
4483
|
-
ref
|
4484
|
-
|
4485
|
-
css: {
|
4486
|
-
|
4487
|
-
// Theme independent color, token should not be used for transparent chat
|
4488
|
-
bg: messageType ? isOverlay ? "rgba(0, 0, 0, 0.64)" : "$surface_default" : void 0,
|
4489
|
-
r: messageType ? "$1" : void 0,
|
4490
|
-
px: messageType ? "$4" : "$2",
|
4491
|
-
py: messageType ? "$4" : 0,
|
4492
|
-
userSelect: "none"
|
4493
|
-
},
|
4494
|
-
key: message.time,
|
4495
|
-
"data-testid": "chat_msg"
|
4565
|
+
ref,
|
4566
|
+
as: "div",
|
4567
|
+
css: { mb: "$10", pr: "$10", mt: "$8", "&:hover .chat_actions": { opacity: 1 } },
|
4568
|
+
style
|
4496
4569
|
},
|
4497
|
-
/* @__PURE__ */
|
4498
|
-
|
4570
|
+
/* @__PURE__ */ React54.createElement(
|
4571
|
+
Flex,
|
4499
4572
|
{
|
4573
|
+
ref: rowRef,
|
4574
|
+
align: "center",
|
4500
4575
|
css: {
|
4501
|
-
|
4502
|
-
|
4503
|
-
|
4504
|
-
|
4505
|
-
|
4506
|
-
|
4576
|
+
flexWrap: "wrap",
|
4577
|
+
// Theme independent color, token should not be used for transparent chat
|
4578
|
+
bg: messageType ? isOverlay ? "rgba(0, 0, 0, 0.64)" : "$surface_default" : void 0,
|
4579
|
+
r: messageType ? "$1" : void 0,
|
4580
|
+
px: messageType ? "$4" : "$2",
|
4581
|
+
py: messageType ? "$4" : 0,
|
4582
|
+
userSelect: "none"
|
4507
4583
|
},
|
4508
|
-
|
4584
|
+
key: message.time,
|
4585
|
+
"data-testid": "chat_msg"
|
4509
4586
|
},
|
4510
|
-
/* @__PURE__ */
|
4587
|
+
/* @__PURE__ */ React54.createElement(
|
4511
4588
|
Text,
|
4512
4589
|
{
|
4513
|
-
as: "span",
|
4514
|
-
variant: "xs",
|
4515
4590
|
css: {
|
4516
|
-
|
4517
|
-
|
4518
|
-
|
4519
|
-
|
4591
|
+
color: isOverlay ? "#FFF" : "$on_surface_high",
|
4592
|
+
fontWeight: "$semiBold",
|
4593
|
+
display: "inline-flex",
|
4594
|
+
alignItems: "center",
|
4595
|
+
justifyContent: "space-between",
|
4596
|
+
width: "100%"
|
4597
|
+
},
|
4598
|
+
as: "div"
|
4520
4599
|
},
|
4521
|
-
|
4522
|
-
|
4523
|
-
|
4524
|
-
|
4525
|
-
|
4526
|
-
|
4527
|
-
|
4528
|
-
|
4529
|
-
|
4600
|
+
/* @__PURE__ */ React54.createElement(Flex, { align: "baseline" }, message.senderName === "You" || !message.senderName ? /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName || "Anonymous") : /* @__PURE__ */ React54.createElement(Tooltip, { title: message.senderName, side: "top", align: "start" }, /* @__PURE__ */ React54.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName)), !isOverlay ? /* @__PURE__ */ React54.createElement(
|
4601
|
+
Text,
|
4602
|
+
{
|
4603
|
+
as: "span",
|
4604
|
+
variant: "xs",
|
4605
|
+
css: {
|
4606
|
+
ml: "$4",
|
4607
|
+
color: "$on_surface_medium",
|
4608
|
+
flexShrink: 0
|
4609
|
+
}
|
4610
|
+
},
|
4611
|
+
formatTime(message.time)
|
4612
|
+
) : null),
|
4613
|
+
/* @__PURE__ */ React54.createElement(
|
4614
|
+
MessageType,
|
4615
|
+
{
|
4616
|
+
hasCurrentUserSent: message.sender === localPeerId,
|
4617
|
+
receiver: message.recipientPeer,
|
4618
|
+
roles: message.recipientRoles
|
4619
|
+
}
|
4620
|
+
),
|
4621
|
+
!isOverlay ? /* @__PURE__ */ React54.createElement(ChatActions, { onPin, showPinAction }) : null
|
4530
4622
|
),
|
4531
|
-
|
4532
|
-
|
4533
|
-
|
4534
|
-
|
4535
|
-
|
4536
|
-
|
4537
|
-
|
4538
|
-
|
4539
|
-
|
4540
|
-
|
4541
|
-
|
4542
|
-
|
4543
|
-
|
4623
|
+
/* @__PURE__ */ React54.createElement(
|
4624
|
+
Text,
|
4625
|
+
{
|
4626
|
+
variant: "sm",
|
4627
|
+
css: {
|
4628
|
+
w: "100%",
|
4629
|
+
mt: "$2",
|
4630
|
+
wordBreak: "break-word",
|
4631
|
+
whiteSpace: "pre-wrap",
|
4632
|
+
userSelect: "all",
|
4633
|
+
color: isOverlay ? "#FFF" : "$on_surface_high"
|
4634
|
+
},
|
4635
|
+
onClick: (e) => e.stopPropagation()
|
4544
4636
|
},
|
4545
|
-
|
4546
|
-
|
4547
|
-
/* @__PURE__ */ React52.createElement(AnnotisedMessage, { message: message.message })
|
4637
|
+
/* @__PURE__ */ React54.createElement(AnnotisedMessage, { message: message.message })
|
4638
|
+
)
|
4548
4639
|
)
|
4549
|
-
)
|
4550
|
-
|
4551
|
-
|
4552
|
-
var ChatList =
|
4553
|
-
({ width, height, setRowHeight, getRowHeight, messages, scrollToBottom }, listRef) => {
|
4640
|
+
);
|
4641
|
+
}
|
4642
|
+
);
|
4643
|
+
var ChatList = React54.forwardRef(
|
4644
|
+
({ width, height, setRowHeight, getRowHeight, messages, unreadCount = 0, scrollToBottom }, listRef) => {
|
4554
4645
|
const { setPinnedMessage } = useSetPinnedMessage();
|
4555
4646
|
useLayoutEffect(() => {
|
4556
4647
|
if (listRef.current && listRef.current.scrollToItem) {
|
4557
4648
|
scrollToBottom(1);
|
4558
4649
|
}
|
4559
4650
|
}, [listRef]);
|
4560
|
-
return /* @__PURE__ */
|
4651
|
+
return /* @__PURE__ */ React54.createElement(
|
4561
4652
|
VariableSizeList,
|
4562
4653
|
{
|
4563
4654
|
ref: listRef,
|
@@ -4569,7 +4660,7 @@ var ChatList = React52.forwardRef(
|
|
4569
4660
|
overflowX: "hidden"
|
4570
4661
|
}
|
4571
4662
|
},
|
4572
|
-
({ index, style }) => /* @__PURE__ */
|
4663
|
+
({ index, style }) => /* @__PURE__ */ React54.createElement(
|
4573
4664
|
ChatMessage,
|
4574
4665
|
{
|
4575
4666
|
style,
|
@@ -4577,13 +4668,16 @@ var ChatList = React52.forwardRef(
|
|
4577
4668
|
key: messages[index].id,
|
4578
4669
|
message: messages[index],
|
4579
4670
|
setRowHeight,
|
4671
|
+
unreadCount,
|
4672
|
+
isLast: index >= messages.length - 2,
|
4673
|
+
scrollToBottom,
|
4580
4674
|
onPin: () => setPinnedMessage(messages[index])
|
4581
4675
|
}
|
4582
4676
|
)
|
4583
4677
|
);
|
4584
4678
|
}
|
4585
4679
|
);
|
4586
|
-
var VirtualizedChatMessages =
|
4680
|
+
var VirtualizedChatMessages = React54.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {
|
4587
4681
|
const rowHeights = useRef10({});
|
4588
4682
|
function getRowHeight(index) {
|
4589
4683
|
return rowHeights.current[index] + 16 || 72;
|
@@ -4595,7 +4689,7 @@ var VirtualizedChatMessages = React52.forwardRef(({ messages, scrollToBottom },
|
|
4595
4689
|
},
|
4596
4690
|
[listRef]
|
4597
4691
|
);
|
4598
|
-
return /* @__PURE__ */
|
4692
|
+
return /* @__PURE__ */ React54.createElement(
|
4599
4693
|
Box,
|
4600
4694
|
{
|
4601
4695
|
css: {
|
@@ -4604,14 +4698,14 @@ var VirtualizedChatMessages = React52.forwardRef(({ messages, scrollToBottom },
|
|
4604
4698
|
},
|
4605
4699
|
as: "div"
|
4606
4700
|
},
|
4607
|
-
/* @__PURE__ */
|
4701
|
+
/* @__PURE__ */ React54.createElement(
|
4608
4702
|
AutoSizer,
|
4609
4703
|
{
|
4610
4704
|
style: {
|
4611
4705
|
width: "90%"
|
4612
4706
|
}
|
4613
4707
|
},
|
4614
|
-
({ height, width }) => /* @__PURE__ */
|
4708
|
+
({ height, width }) => /* @__PURE__ */ React54.createElement(
|
4615
4709
|
ChatList,
|
4616
4710
|
{
|
4617
4711
|
width,
|
@@ -4620,21 +4714,23 @@ var VirtualizedChatMessages = React52.forwardRef(({ messages, scrollToBottom },
|
|
4620
4714
|
setRowHeight,
|
4621
4715
|
getRowHeight,
|
4622
4716
|
scrollToBottom,
|
4623
|
-
ref: listRef
|
4717
|
+
ref: listRef,
|
4718
|
+
unreadCount
|
4624
4719
|
}
|
4625
4720
|
)
|
4626
4721
|
)
|
4627
4722
|
);
|
4628
4723
|
});
|
4629
|
-
var ChatBody =
|
4724
|
+
var ChatBody = React54.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
|
4630
4725
|
var _a;
|
4631
4726
|
const storeMessageSelector = role ? selectMessagesByRole(role) : peerId ? selectMessagesByPeerID(peerId) : selectHMSMessages;
|
4632
|
-
let messages =
|
4727
|
+
let messages = useHMSStore27(storeMessageSelector);
|
4633
4728
|
messages = useMemo8(() => (messages == null ? void 0 : messages.filter((message) => message.type === "chat")) || [], [messages]);
|
4634
|
-
const isMobile =
|
4729
|
+
const isMobile = useMedia12(config.media.md);
|
4635
4730
|
const { elements } = useRoomLayoutConferencingScreen();
|
4731
|
+
const unreadCount = useUnreadCount({ role, peerId });
|
4636
4732
|
if (messages.length === 0 && !(isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay))) {
|
4637
|
-
return /* @__PURE__ */
|
4733
|
+
return /* @__PURE__ */ React54.createElement(
|
4638
4734
|
Flex,
|
4639
4735
|
{
|
4640
4736
|
css: {
|
@@ -4646,7 +4742,7 @@ var ChatBody = React52.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
|
|
4646
4742
|
align: "center",
|
4647
4743
|
justify: "center"
|
4648
4744
|
},
|
4649
|
-
/* @__PURE__ */
|
4745
|
+
/* @__PURE__ */ React54.createElement(Box, null, /* @__PURE__ */ React54.createElement("img", { src: empty_chat_default, alt: "Empty Chat", height: 132, width: 185, style: { margin: "0 auto" } }), /* @__PURE__ */ React54.createElement(Text, { variant: "h5", css: { mt: "$8", c: "$on_surface_high" } }, "Start a conversation"), /* @__PURE__ */ React54.createElement(
|
4650
4746
|
Text,
|
4651
4747
|
{
|
4652
4748
|
variant: "sm",
|
@@ -4656,12 +4752,20 @@ var ChatBody = React52.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
|
|
4656
4752
|
))
|
4657
4753
|
);
|
4658
4754
|
}
|
4659
|
-
return /* @__PURE__ */
|
4755
|
+
return /* @__PURE__ */ React54.createElement(Fragment8, null, /* @__PURE__ */ React54.createElement(
|
4756
|
+
VirtualizedChatMessages,
|
4757
|
+
{
|
4758
|
+
messages,
|
4759
|
+
scrollToBottom,
|
4760
|
+
unreadCount,
|
4761
|
+
ref: listRef
|
4762
|
+
}
|
4763
|
+
));
|
4660
4764
|
});
|
4661
4765
|
|
4662
4766
|
// src/Prebuilt/components/Chat/ChatFooter.tsx
|
4663
|
-
import
|
4664
|
-
import { useMedia as
|
4767
|
+
import React55, { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef12, useState as useState30 } from "react";
|
4768
|
+
import { useMedia as useMedia13 } from "react-use";
|
4665
4769
|
import data2 from "@emoji-mart/data";
|
4666
4770
|
import Picker from "@emoji-mart/react";
|
4667
4771
|
import { useHMSActions as useHMSActions18 } from "@100mslive/react-sdk";
|
@@ -4669,10 +4773,10 @@ import { EmojiIcon as EmojiIcon3, SendIcon } from "@100mslive/react-icons";
|
|
4669
4773
|
|
4670
4774
|
// src/Prebuilt/components/AppData/useChatState.js
|
4671
4775
|
import { useCallback as useCallback12 } from "react";
|
4672
|
-
import { selectAppData as selectAppData2, useHMSActions as useHMSActions17, useHMSStore as
|
4776
|
+
import { selectAppData as selectAppData2, useHMSActions as useHMSActions17, useHMSStore as useHMSStore28 } from "@100mslive/react-sdk";
|
4673
4777
|
var useChatDraftMessage = () => {
|
4674
4778
|
const hmsActions = useHMSActions17();
|
4675
|
-
let chatDraftMessage =
|
4779
|
+
let chatDraftMessage = useHMSStore28(selectAppData2(APP_DATA.chatDraft));
|
4676
4780
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
4677
4781
|
chatDraftMessage = "";
|
4678
4782
|
}
|
@@ -4686,10 +4790,10 @@ var useChatDraftMessage = () => {
|
|
4686
4790
|
};
|
4687
4791
|
|
4688
4792
|
// src/Prebuilt/components/Chat/useEmojiPickerStyles.js
|
4689
|
-
import { useEffect as
|
4793
|
+
import { useEffect as useEffect19, useRef as useRef11 } from "react";
|
4690
4794
|
var useEmojiPickerStyles = (showing) => {
|
4691
4795
|
const ref = useRef11(null);
|
4692
|
-
|
4796
|
+
useEffect19(() => {
|
4693
4797
|
if (showing) {
|
4694
4798
|
setTimeout(() => {
|
4695
4799
|
var _a, _b;
|
@@ -4739,7 +4843,7 @@ var TextArea = styled("textarea", {
|
|
4739
4843
|
function EmojiPicker({ onSelect }) {
|
4740
4844
|
const [showEmoji, setShowEmoji] = useState30(false);
|
4741
4845
|
const ref = useEmojiPickerStyles(showEmoji);
|
4742
|
-
return /* @__PURE__ */
|
4846
|
+
return /* @__PURE__ */ React55.createElement(Popover.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React55.createElement(Popover.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React55.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React55.createElement(EmojiIcon3, null))), /* @__PURE__ */ React55.createElement(Popover.Portal, null, /* @__PURE__ */ React55.createElement(
|
4743
4847
|
Popover.Content,
|
4744
4848
|
{
|
4745
4849
|
alignOffset: -40,
|
@@ -4749,7 +4853,7 @@ function EmojiPicker({ onSelect }) {
|
|
4749
4853
|
p: 0
|
4750
4854
|
}
|
4751
4855
|
},
|
4752
|
-
/* @__PURE__ */
|
4856
|
+
/* @__PURE__ */ React55.createElement(
|
4753
4857
|
Box,
|
4754
4858
|
{
|
4755
4859
|
css: {
|
@@ -4758,7 +4862,7 @@ function EmojiPicker({ onSelect }) {
|
|
4758
4862
|
},
|
4759
4863
|
ref
|
4760
4864
|
},
|
4761
|
-
/* @__PURE__ */
|
4865
|
+
/* @__PURE__ */ React55.createElement(Picker, { onEmojiSelect: onSelect, data: data2, previewPosition: "none", skinPosition: "search" })
|
4762
4866
|
)
|
4763
4867
|
)));
|
4764
4868
|
}
|
@@ -4772,7 +4876,7 @@ var ChatFooter = ({
|
|
4772
4876
|
const hmsActions = useHMSActions18();
|
4773
4877
|
const inputRef = useRef12(null);
|
4774
4878
|
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
4775
|
-
const isMobile =
|
4879
|
+
const isMobile = useMedia13(config.media.md);
|
4776
4880
|
const { elements } = useRoomLayoutConferencingScreen();
|
4777
4881
|
const isOverlayChat = (_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay;
|
4778
4882
|
const sendMessage = useCallback13(() => __async(void 0, null, function* () {
|
@@ -4798,19 +4902,19 @@ var ChatFooter = ({
|
|
4798
4902
|
ToastManager.addToast({ title: err.message });
|
4799
4903
|
}
|
4800
4904
|
}), [role, peerId, hmsActions, onSend]);
|
4801
|
-
|
4905
|
+
useEffect20(() => {
|
4802
4906
|
const messageElement = inputRef.current;
|
4803
4907
|
if (messageElement) {
|
4804
4908
|
messageElement.value = draftMessage;
|
4805
4909
|
}
|
4806
4910
|
}, [draftMessage]);
|
4807
|
-
|
4911
|
+
useEffect20(() => {
|
4808
4912
|
const messageElement = inputRef.current;
|
4809
4913
|
return () => {
|
4810
4914
|
setDraftMessage((messageElement == null ? void 0 : messageElement.value) || "");
|
4811
4915
|
};
|
4812
4916
|
}, [setDraftMessage]);
|
4813
|
-
return /* @__PURE__ */
|
4917
|
+
return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ React55.createElement(
|
4814
4918
|
Flex,
|
4815
4919
|
{
|
4816
4920
|
align: "center",
|
@@ -4831,7 +4935,7 @@ var ChatFooter = ({
|
|
4831
4935
|
}
|
4832
4936
|
},
|
4833
4937
|
children,
|
4834
|
-
/* @__PURE__ */
|
4938
|
+
/* @__PURE__ */ React55.createElement(
|
4835
4939
|
TextArea,
|
4836
4940
|
{
|
4837
4941
|
css: {
|
@@ -4859,7 +4963,7 @@ var ChatFooter = ({
|
|
4859
4963
|
onCopy: (e) => e.stopPropagation()
|
4860
4964
|
}
|
4861
4965
|
),
|
4862
|
-
!isMobile ? /* @__PURE__ */
|
4966
|
+
!isMobile ? /* @__PURE__ */ React55.createElement(
|
4863
4967
|
EmojiPicker,
|
4864
4968
|
{
|
4865
4969
|
onSelect: (emoji) => {
|
@@ -4869,7 +4973,7 @@ var ChatFooter = ({
|
|
4869
4973
|
}
|
4870
4974
|
}
|
4871
4975
|
) : null,
|
4872
|
-
/* @__PURE__ */
|
4976
|
+
/* @__PURE__ */ React55.createElement(
|
4873
4977
|
IconButton,
|
4874
4978
|
{
|
4875
4979
|
className: "send-msg",
|
@@ -4882,31 +4986,18 @@ var ChatFooter = ({
|
|
4882
4986
|
},
|
4883
4987
|
"data-testid": "send_msg_btn"
|
4884
4988
|
},
|
4885
|
-
/* @__PURE__ */
|
4989
|
+
/* @__PURE__ */ React55.createElement(SendIcon, null)
|
4886
4990
|
)
|
4887
4991
|
)));
|
4888
4992
|
};
|
4889
4993
|
|
4890
|
-
// src/Prebuilt/components/Chat/useUnreadCount.js
|
4891
|
-
import {
|
4892
|
-
selectMessagesUnreadCountByPeerID,
|
4893
|
-
selectMessagesUnreadCountByRole,
|
4894
|
-
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
|
4895
|
-
useHMSStore as useHMSStore28
|
4896
|
-
} from "@100mslive/react-sdk";
|
4897
|
-
var useUnreadCount = ({ role, peerId }) => {
|
4898
|
-
const unreadCountSelector = role ? selectMessagesUnreadCountByRole(role) : peerId ? selectMessagesUnreadCountByPeerID(peerId) : selectUnreadHMSMessagesCount2;
|
4899
|
-
const unreadCount = useHMSStore28(unreadCountSelector);
|
4900
|
-
return unreadCount;
|
4901
|
-
};
|
4902
|
-
|
4903
4994
|
// src/Prebuilt/components/Chat/Chat.jsx
|
4904
4995
|
var PINNED_MESSAGE_LENGTH = 80;
|
4905
4996
|
var PinnedMessage = ({ clearPinnedMessage }) => {
|
4906
4997
|
const permissions = useHMSStore29(selectPermissions10);
|
4907
4998
|
const pinnedMessage = useHMSStore29(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGE));
|
4908
4999
|
const formattedPinnedMessage = (pinnedMessage == null ? void 0 : pinnedMessage.length) && pinnedMessage.length > PINNED_MESSAGE_LENGTH ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...` : pinnedMessage;
|
4909
|
-
return pinnedMessage ? /* @__PURE__ */
|
5000
|
+
return pinnedMessage ? /* @__PURE__ */ React56.createElement(
|
4910
5001
|
Flex,
|
4911
5002
|
{
|
4912
5003
|
title: pinnedMessage,
|
@@ -4914,8 +5005,8 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
|
|
4914
5005
|
align: "center",
|
4915
5006
|
justify: "between"
|
4916
5007
|
},
|
4917
|
-
/* @__PURE__ */
|
4918
|
-
/* @__PURE__ */
|
5008
|
+
/* @__PURE__ */ React56.createElement(PinIcon2, null),
|
5009
|
+
/* @__PURE__ */ React56.createElement(
|
4919
5010
|
Box,
|
4920
5011
|
{
|
4921
5012
|
css: {
|
@@ -4925,15 +5016,15 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
|
|
4925
5016
|
overflowY: "auto"
|
4926
5017
|
}
|
4927
5018
|
},
|
4928
|
-
/* @__PURE__ */
|
5019
|
+
/* @__PURE__ */ React56.createElement(Text, { variant: "sm" }, /* @__PURE__ */ React56.createElement(AnnotisedMessage, { message: formattedPinnedMessage }))
|
4929
5020
|
),
|
4930
|
-
permissions.removeOthers && /* @__PURE__ */
|
5021
|
+
permissions.removeOthers && /* @__PURE__ */ React56.createElement(
|
4931
5022
|
Flex,
|
4932
5023
|
{
|
4933
5024
|
onClick: () => clearPinnedMessage(),
|
4934
5025
|
css: { cursor: "pointer", color: "$on_surface_medium", "&:hover": { color: "$on_surface_high" } }
|
4935
5026
|
},
|
4936
|
-
/* @__PURE__ */
|
5027
|
+
/* @__PURE__ */ React56.createElement(CrossIcon6, null)
|
4937
5028
|
)
|
4938
5029
|
) : null;
|
4939
5030
|
};
|
@@ -4952,7 +5043,7 @@ var Chat = ({ screenType }) => {
|
|
4952
5043
|
const listRef = useRef13(null);
|
4953
5044
|
const hmsActions = useHMSActions19();
|
4954
5045
|
const { setPinnedMessage } = useSetPinnedMessage();
|
4955
|
-
|
5046
|
+
useEffect21(() => {
|
4956
5047
|
if (notification && notification.data && peerSelector === notification.data.id) {
|
4957
5048
|
setPeerSelector("");
|
4958
5049
|
setChatOptions({
|
@@ -4964,7 +5055,7 @@ var Chat = ({ screenType }) => {
|
|
4964
5055
|
}, [notification, peerSelector, setPeerSelector]);
|
4965
5056
|
const storeMessageSelector = selectHMSMessagesCount;
|
4966
5057
|
const { elements } = useRoomLayoutConferencingScreen();
|
4967
|
-
const isMobile =
|
5058
|
+
const isMobile = useMedia14(config.media.md);
|
4968
5059
|
let isScrolledToBottom = false;
|
4969
5060
|
if (listRef.current) {
|
4970
5061
|
const currentRef = listRef.current._outerRef;
|
@@ -4985,7 +5076,7 @@ var Chat = ({ screenType }) => {
|
|
4985
5076
|
},
|
4986
5077
|
[hmsActions, messagesCount]
|
4987
5078
|
);
|
4988
|
-
return /* @__PURE__ */
|
5079
|
+
return /* @__PURE__ */ React56.createElement(
|
4989
5080
|
Flex,
|
4990
5081
|
{
|
4991
5082
|
direction: "column",
|
@@ -4994,8 +5085,8 @@ var Chat = ({ screenType }) => {
|
|
4994
5085
|
gap: "$4"
|
4995
5086
|
}
|
4996
5087
|
},
|
4997
|
-
isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? null : /* @__PURE__ */
|
4998
|
-
/* @__PURE__ */
|
5088
|
+
isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? null : /* @__PURE__ */ React56.createElement(React56.Fragment, null, ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages) ? /* @__PURE__ */ React56.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
|
5089
|
+
/* @__PURE__ */ React56.createElement(
|
4999
5090
|
ChatBody,
|
5000
5091
|
{
|
5001
5092
|
role: chatOptions.role,
|
@@ -5005,7 +5096,7 @@ var Chat = ({ screenType }) => {
|
|
5005
5096
|
screenType
|
5006
5097
|
}
|
5007
5098
|
),
|
5008
|
-
/* @__PURE__ */
|
5099
|
+
/* @__PURE__ */ React56.createElement(
|
5009
5100
|
ChatFooter,
|
5010
5101
|
{
|
5011
5102
|
role: chatOptions.role,
|
@@ -5023,7 +5114,7 @@ var Chat = ({ screenType }) => {
|
|
5023
5114
|
},
|
5024
5115
|
peerId: chatOptions.peerId
|
5025
5116
|
},
|
5026
|
-
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */
|
5117
|
+
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */ React56.createElement(NewMessageIndicator, { role: chatOptions.role, peerId: chatOptions.peerId, scrollToBottom })
|
5027
5118
|
)
|
5028
5119
|
);
|
5029
5120
|
};
|
@@ -5032,7 +5123,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5032
5123
|
if (!unreadCount) {
|
5033
5124
|
return null;
|
5034
5125
|
}
|
5035
|
-
return /* @__PURE__ */
|
5126
|
+
return /* @__PURE__ */ React56.createElement(
|
5036
5127
|
Flex,
|
5037
5128
|
{
|
5038
5129
|
justify: "center",
|
@@ -5043,7 +5134,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5043
5134
|
position: "absolute"
|
5044
5135
|
}
|
5045
5136
|
},
|
5046
|
-
/* @__PURE__ */
|
5137
|
+
/* @__PURE__ */ React56.createElement(
|
5047
5138
|
Button,
|
5048
5139
|
{
|
5049
5140
|
variant: "standard",
|
@@ -5066,7 +5157,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5066
5157
|
},
|
5067
5158
|
"New ",
|
5068
5159
|
unreadCount === 1 ? "message" : "messages",
|
5069
|
-
/* @__PURE__ */
|
5160
|
+
/* @__PURE__ */ React56.createElement(ChevronDownIcon2, null)
|
5070
5161
|
)
|
5071
5162
|
);
|
5072
5163
|
};
|
@@ -5081,9 +5172,9 @@ var tabTriggerCSS = {
|
|
5081
5172
|
justifyContent: "center"
|
5082
5173
|
};
|
5083
5174
|
var ParticipantCount2 = ({ count }) => {
|
5084
|
-
return count < 1e3 ? /* @__PURE__ */
|
5175
|
+
return count < 1e3 ? /* @__PURE__ */ React57.createElement("span", null, "(", count, ")") : /* @__PURE__ */ React57.createElement(Tooltip, { title: count }, /* @__PURE__ */ React57.createElement("span", null, "(", getFormattedCount(count), ")"));
|
5085
5176
|
};
|
5086
|
-
var SidePaneTabs =
|
5177
|
+
var SidePaneTabs = React57.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
|
5087
5178
|
var _a;
|
5088
5179
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
5089
5180
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
@@ -5094,10 +5185,10 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5094
5185
|
const showChat = !!(elements == null ? void 0 : elements.chat);
|
5095
5186
|
const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
|
5096
5187
|
const hideTabs = !(showChat && showParticipants);
|
5097
|
-
const isMobile =
|
5188
|
+
const isMobile = useMedia15(config.media.md);
|
5098
5189
|
const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
5099
5190
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
5100
|
-
|
5191
|
+
useEffect22(() => {
|
5101
5192
|
if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
|
5102
5193
|
setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
5103
5194
|
} else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {
|
@@ -5106,10 +5197,10 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5106
5197
|
resetSidePane();
|
5107
5198
|
}
|
5108
5199
|
}, [showChat, activeTab, showParticipants, resetSidePane]);
|
5109
|
-
|
5200
|
+
useEffect22(() => {
|
5110
5201
|
setActiveTab(active);
|
5111
5202
|
}, [active]);
|
5112
|
-
return /* @__PURE__ */
|
5203
|
+
return /* @__PURE__ */ React57.createElement(
|
5113
5204
|
Flex,
|
5114
5205
|
{
|
5115
5206
|
direction: "column",
|
@@ -5120,7 +5211,7 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5120
5211
|
transition: "margin 0.3s ease-in-out"
|
5121
5212
|
}
|
5122
5213
|
},
|
5123
|
-
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */
|
5214
|
+
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React57.createElement(Chat, { screenType }) : /* @__PURE__ */ React57.createElement(React57.Fragment, null, hideTabs ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ React57.createElement("span", null, "Participants ", /* @__PURE__ */ React57.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ React57.createElement(Chat, { screenType }) : /* @__PURE__ */ React57.createElement(ParticipantList, null)) : /* @__PURE__ */ React57.createElement(
|
5124
5215
|
Tabs.Root,
|
5125
5216
|
{
|
5126
5217
|
value: activeTab,
|
@@ -5130,7 +5221,7 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5130
5221
|
size: "100%"
|
5131
5222
|
}
|
5132
5223
|
},
|
5133
|
-
/* @__PURE__ */
|
5224
|
+
/* @__PURE__ */ React57.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ React57.createElement(
|
5134
5225
|
Tabs.Trigger,
|
5135
5226
|
{
|
5136
5227
|
value: SIDE_PANE_OPTIONS.CHAT,
|
@@ -5140,7 +5231,7 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5140
5231
|
})
|
5141
5232
|
},
|
5142
5233
|
"Chat"
|
5143
|
-
), /* @__PURE__ */
|
5234
|
+
), /* @__PURE__ */ React57.createElement(
|
5144
5235
|
Tabs.Trigger,
|
5145
5236
|
{
|
5146
5237
|
value: SIDE_PANE_OPTIONS.PARTICIPANTS,
|
@@ -5150,12 +5241,12 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5150
5241
|
})
|
5151
5242
|
},
|
5152
5243
|
"Participants ",
|
5153
|
-
/* @__PURE__ */
|
5244
|
+
/* @__PURE__ */ React57.createElement(ParticipantCount2, { count: peerCount })
|
5154
5245
|
)),
|
5155
|
-
/* @__PURE__ */
|
5156
|
-
/* @__PURE__ */
|
5246
|
+
/* @__PURE__ */ React57.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React57.createElement(ParticipantList, null)),
|
5247
|
+
/* @__PURE__ */ React57.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React57.createElement(Chat, { screenType }))
|
5157
5248
|
)),
|
5158
|
-
isOverlayChat && isChatOpen ? null : /* @__PURE__ */
|
5249
|
+
isOverlayChat && isChatOpen ? null : /* @__PURE__ */ React57.createElement(
|
5159
5250
|
IconButton,
|
5160
5251
|
{
|
5161
5252
|
css: { position: "absolute", right: "$10", top: "$11", "@md": { top: "$8", right: "$8" } },
|
@@ -5169,13 +5260,13 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5169
5260
|
},
|
5170
5261
|
"data-testid": "close_chat"
|
5171
5262
|
},
|
5172
|
-
/* @__PURE__ */
|
5263
|
+
/* @__PURE__ */ React57.createElement(CrossIcon7, null)
|
5173
5264
|
)
|
5174
5265
|
);
|
5175
5266
|
});
|
5176
5267
|
|
5177
5268
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
5178
|
-
import
|
5269
|
+
import React59, { Fragment as Fragment10, useState as useState34 } from "react";
|
5179
5270
|
import { selectPermissions as selectPermissions11, useHMSStore as useHMSStore32, useRecordingStreaming as useRecordingStreaming7 } from "@100mslive/react-sdk";
|
5180
5271
|
import { ColoredHandIcon, CrossIcon as CrossIcon8, GoLiveIcon as GoLiveIcon3 } from "@100mslive/react-icons";
|
5181
5272
|
|
@@ -5183,7 +5274,7 @@ import { ColoredHandIcon, CrossIcon as CrossIcon8, GoLiveIcon as GoLiveIcon3 } f
|
|
5183
5274
|
var rtmp_default = "data:image/png;base64,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";
|
5184
5275
|
|
5185
5276
|
// src/Prebuilt/components/Streaming/HLSStreaming.jsx
|
5186
|
-
import
|
5277
|
+
import React58, { Fragment as Fragment9, useCallback as useCallback15, useEffect as useEffect23, useState as useState33 } from "react";
|
5187
5278
|
import { selectRoomID, useHMSActions as useHMSActions20, useHMSStore as useHMSStore31, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
|
5188
5279
|
import {
|
5189
5280
|
EndStreamIcon as EndStreamIcon2,
|
@@ -5203,7 +5294,7 @@ var getCardData = (roleName, roomId) => {
|
|
5203
5294
|
data3 = {
|
5204
5295
|
title: formattedRoleName,
|
5205
5296
|
content: "Broadcasters can livestream audio or video, manage stream appearance and control the room via HLS.",
|
5206
|
-
icon: /* @__PURE__ */
|
5297
|
+
icon: /* @__PURE__ */ React58.createElement(SupportIcon, null)
|
5207
5298
|
};
|
5208
5299
|
break;
|
5209
5300
|
}
|
@@ -5211,7 +5302,7 @@ var getCardData = (roleName, roomId) => {
|
|
5211
5302
|
data3 = {
|
5212
5303
|
title: "HLS Viewer",
|
5213
5304
|
content: "Viewers can view and send chat messages, but need to be made broadcasters to participate with audio or video.",
|
5214
|
-
icon: /* @__PURE__ */
|
5305
|
+
icon: /* @__PURE__ */ React58.createElement(EyeOpenIcon, null)
|
5215
5306
|
};
|
5216
5307
|
break;
|
5217
5308
|
}
|
@@ -5219,7 +5310,7 @@ var getCardData = (roleName, roomId) => {
|
|
5219
5310
|
data3 = {
|
5220
5311
|
title: formattedRoleName,
|
5221
5312
|
content: `${formattedRoleName} is customised with specific permissions, which will determine how it interacts with this room.`,
|
5222
|
-
icon: /* @__PURE__ */
|
5313
|
+
icon: /* @__PURE__ */ React58.createElement(WrenchIcon, null),
|
5223
5314
|
order: 1
|
5224
5315
|
};
|
5225
5316
|
}
|
@@ -5228,7 +5319,7 @@ var getCardData = (roleName, roomId) => {
|
|
5228
5319
|
};
|
5229
5320
|
var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
5230
5321
|
const [copied, setCopied] = useState33(false);
|
5231
|
-
return isHLSRunning ? /* @__PURE__ */
|
5322
|
+
return isHLSRunning ? /* @__PURE__ */ React58.createElement(
|
5232
5323
|
Box,
|
5233
5324
|
{
|
5234
5325
|
key: title,
|
@@ -5239,9 +5330,9 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
|
5239
5330
|
borderRadius: "$2"
|
5240
5331
|
}
|
5241
5332
|
},
|
5242
|
-
/* @__PURE__ */
|
5243
|
-
/* @__PURE__ */
|
5244
|
-
/* @__PURE__ */
|
5333
|
+
/* @__PURE__ */ React58.createElement(Flex, { align: "center", gap: "2", css: { color: "$primary_bright" } }, icon, /* @__PURE__ */ React58.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, title)),
|
5334
|
+
/* @__PURE__ */ React58.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", mt: "$6" } }, content),
|
5335
|
+
/* @__PURE__ */ React58.createElement(
|
5245
5336
|
Button,
|
5246
5337
|
{
|
5247
5338
|
variant: "standard",
|
@@ -5253,7 +5344,7 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
|
5253
5344
|
css: { w: "100%", r: "$1", mt: "$10", fontWeight: "$semiBold" },
|
5254
5345
|
icon: true
|
5255
5346
|
},
|
5256
|
-
copied ? /* @__PURE__ */
|
5347
|
+
copied ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, "Link copied!") : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(LinkIcon, { style: { color: "inherit" } }), "Copy Invite Link")
|
5257
5348
|
)
|
5258
5349
|
) : null;
|
5259
5350
|
};
|
@@ -5263,7 +5354,7 @@ var HLSStreaming = ({ onBack }) => {
|
|
5263
5354
|
const cards = roleNames.map((roleName) => getCardData(roleName, roomId));
|
5264
5355
|
const { isHLSRunning } = useRecordingStreaming6();
|
5265
5356
|
const [showLinks, setShowLinks] = useState33(false);
|
5266
|
-
return !showLinks ? /* @__PURE__ */
|
5357
|
+
return !showLinks ? /* @__PURE__ */ React58.createElement(Container, { rounded: true }, /* @__PURE__ */ React58.createElement(ContentHeader, { title: "Start Streaming", content: "HLS", onBack }), /* @__PURE__ */ React58.createElement(ContentBody, { title: "HLS Streaming", Icon: GoLiveIcon2, removeVerticalPadding: true }, "Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this platform."), isHLSRunning ? /* @__PURE__ */ React58.createElement(EndHLS, { setShowLinks }) : /* @__PURE__ */ React58.createElement(StartHLS, null)) : /* @__PURE__ */ React58.createElement(Container, { rounded: true }, /* @__PURE__ */ React58.createElement(ContentHeader, { title: "Invite People", content: "Start the conversation", onBack: () => setShowLinks(false) }), /* @__PURE__ */ React58.createElement(Flex, { direction: "column", css: { gap: "$10", p: "$0 $10", overflowY: "auto", mb: "$10" } }, cards.map((card) => /* @__PURE__ */ React58.createElement(Card, __spreadProps(__spreadValues({ key: card.title }, card), { isHLSRunning })))));
|
5267
5358
|
};
|
5268
5359
|
var StartHLS = () => {
|
5269
5360
|
const [record, setRecord] = useState33(false);
|
@@ -5289,7 +5380,7 @@ var StartHLS = () => {
|
|
5289
5380
|
}),
|
5290
5381
|
[hmsActions, record, isHLSStarted, setHLSStarted]
|
5291
5382
|
);
|
5292
|
-
return /* @__PURE__ */
|
5383
|
+
return /* @__PURE__ */ React58.createElement(Fragment9, null, /* @__PURE__ */ React58.createElement(RecordStream, { record, setRecord, testId: "hls-recording" }), /* @__PURE__ */ React58.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(ErrorText, { error }), /* @__PURE__ */ React58.createElement(
|
5293
5384
|
Button,
|
5294
5385
|
{
|
5295
5386
|
"data-testid": "start_hls",
|
@@ -5298,21 +5389,21 @@ var StartHLS = () => {
|
|
5298
5389
|
onClick: () => startHLS(),
|
5299
5390
|
disabled: isHLSStarted
|
5300
5391
|
},
|
5301
|
-
isHLSStarted ? /* @__PURE__ */
|
5392
|
+
isHLSStarted ? /* @__PURE__ */ React58.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ React58.createElement(GoLiveIcon2, null),
|
5302
5393
|
isHLSStarted ? "Starting stream..." : "Go Live"
|
5303
|
-
)), /* @__PURE__ */
|
5394
|
+
)), /* @__PURE__ */ React58.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(Text, null, /* @__PURE__ */ React58.createElement(InfoIcon4, { width: 16, height: 16 })), /* @__PURE__ */ React58.createElement(Text, { variant: "tiny", color: "$on_surface_medium", css: { mx: "$8" } }, "You cannot start recording once the stream starts, you will have to stop the stream to enable recording.")));
|
5304
5395
|
};
|
5305
5396
|
var EndHLS = ({ setShowLinks }) => {
|
5306
5397
|
const hmsActions = useHMSActions20();
|
5307
5398
|
const [inProgress, setInProgress] = useState33(false);
|
5308
5399
|
const [error, setError] = useState33("");
|
5309
5400
|
const { isHLSRunning } = useRecordingStreaming6();
|
5310
|
-
|
5401
|
+
useEffect23(() => {
|
5311
5402
|
if (inProgress && !isHLSRunning) {
|
5312
5403
|
setInProgress(false);
|
5313
5404
|
}
|
5314
5405
|
}, [inProgress, isHLSRunning]);
|
5315
|
-
return /* @__PURE__ */
|
5406
|
+
return /* @__PURE__ */ React58.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React58.createElement(ErrorText, { error }), /* @__PURE__ */ React58.createElement(
|
5316
5407
|
Button,
|
5317
5408
|
{
|
5318
5409
|
"data-testid": "stop_hls",
|
@@ -5331,9 +5422,9 @@ var EndHLS = ({ setShowLinks }) => {
|
|
5331
5422
|
}
|
5332
5423
|
})
|
5333
5424
|
},
|
5334
|
-
/* @__PURE__ */
|
5425
|
+
/* @__PURE__ */ React58.createElement(EndStreamIcon2, null),
|
5335
5426
|
"End Stream"
|
5336
|
-
), /* @__PURE__ */
|
5427
|
+
), /* @__PURE__ */ React58.createElement(Button, { icon: true, css: { w: "100%", r: "$0", mt: "$8" }, onClick: () => setShowLinks(true) }, /* @__PURE__ */ React58.createElement(PeopleIcon3, null), " Invite People"));
|
5337
5428
|
};
|
5338
5429
|
|
5339
5430
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
@@ -5347,7 +5438,7 @@ var StreamingLanding = () => {
|
|
5347
5438
|
toggleStreaming();
|
5348
5439
|
return null;
|
5349
5440
|
}
|
5350
|
-
return /* @__PURE__ */
|
5441
|
+
return /* @__PURE__ */ React59.createElement(Fragment10, null, /* @__PURE__ */ React59.createElement(Flex, { css: { w: "100%", py: "$8" } }, /* @__PURE__ */ React59.createElement(
|
5351
5442
|
Box,
|
5352
5443
|
{
|
5353
5444
|
css: {
|
@@ -5357,8 +5448,8 @@ var StreamingLanding = () => {
|
|
5357
5448
|
r: "$round"
|
5358
5449
|
}
|
5359
5450
|
},
|
5360
|
-
/* @__PURE__ */
|
5361
|
-
), /* @__PURE__ */
|
5451
|
+
/* @__PURE__ */ React59.createElement(ColoredHandIcon, { width: 40, height: 40 })
|
5452
|
+
), /* @__PURE__ */ React59.createElement(Box, { css: { flex: "1 1 0", mx: "$8" } }, /* @__PURE__ */ React59.createElement(Text, { variant: "sm" }, "Welcome !"), /* @__PURE__ */ React59.createElement(Text, { variant: "h6" }, "Let\u2019s get you started")), /* @__PURE__ */ React59.createElement(IconButton_default, { onClick: toggleStreaming, css: { alignSelf: "flex-start" }, "data-testid": "close_streaming" }, /* @__PURE__ */ React59.createElement(CrossIcon8, null))), /* @__PURE__ */ React59.createElement(Text, { variant: "tiny", color: "$on_surface_medium" }, "Start Streaming"), (permissions == null ? void 0 : permissions.hlsStreaming) && /* @__PURE__ */ React59.createElement(
|
5362
5453
|
StreamCard,
|
5363
5454
|
{
|
5364
5455
|
testId: "hls_stream",
|
@@ -5368,7 +5459,7 @@ var StreamingLanding = () => {
|
|
5368
5459
|
onClick: () => setShowHLS(true),
|
5369
5460
|
Icon: GoLiveIcon3
|
5370
5461
|
}
|
5371
|
-
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */
|
5462
|
+
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */ React59.createElement(
|
5372
5463
|
StreamCard,
|
5373
5464
|
{
|
5374
5465
|
testId: "rtmp_stream",
|
@@ -5380,7 +5471,7 @@ var StreamingLanding = () => {
|
|
5380
5471
|
},
|
5381
5472
|
imgSrc: rtmp_default
|
5382
5473
|
}
|
5383
|
-
), showHLS && /* @__PURE__ */
|
5474
|
+
), showHLS && /* @__PURE__ */ React59.createElement(HLSStreaming, { onBack: () => setShowHLS(false) }), showRTMP && /* @__PURE__ */ React59.createElement(RTMPStreaming, { onBack: () => setShowRTMP(false) }));
|
5384
5475
|
};
|
5385
5476
|
|
5386
5477
|
// src/Prebuilt/layouts/SidePane.tsx
|
@@ -5390,16 +5481,16 @@ var SidePane = ({
|
|
5390
5481
|
hideControls = false
|
5391
5482
|
}) => {
|
5392
5483
|
var _a, _b;
|
5393
|
-
const isMobile =
|
5484
|
+
const isMobile = useMedia16(config.media.md);
|
5394
5485
|
const sidepane = useHMSStore33(selectAppData3(APP_DATA.sidePane));
|
5395
5486
|
const activeScreensharePeerId = useHMSStore33(selectAppData3(APP_DATA.activeScreensharePeerId));
|
5396
5487
|
const trackId = (_a = useHMSStore33(selectVideoTrackByPeerID(activeScreensharePeerId))) == null ? void 0 : _a.id;
|
5397
5488
|
const { elements } = useRoomLayoutConferencingScreen();
|
5398
5489
|
let ViewComponent;
|
5399
5490
|
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
5400
|
-
ViewComponent = /* @__PURE__ */
|
5491
|
+
ViewComponent = /* @__PURE__ */ React60.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
|
5401
5492
|
} else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
|
5402
|
-
ViewComponent = /* @__PURE__ */
|
5493
|
+
ViewComponent = /* @__PURE__ */ React60.createElement(StreamingLanding, null);
|
5403
5494
|
}
|
5404
5495
|
if (!ViewComponent && !trackId) {
|
5405
5496
|
return null;
|
@@ -5412,7 +5503,7 @@ var SidePane = ({
|
|
5412
5503
|
objectFit: tileProps == null ? void 0 : tileProps.video_object_fit
|
5413
5504
|
};
|
5414
5505
|
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay);
|
5415
|
-
return /* @__PURE__ */
|
5506
|
+
return /* @__PURE__ */ React60.createElement(
|
5416
5507
|
Flex,
|
5417
5508
|
{
|
5418
5509
|
direction: "column",
|
@@ -5425,17 +5516,16 @@ var SidePane = ({
|
|
5425
5516
|
"@md": { position: mwebStreamingChat ? "absolute" : "", zIndex: 12 }
|
5426
5517
|
}
|
5427
5518
|
},
|
5428
|
-
trackId && /* @__PURE__ */
|
5519
|
+
trackId && /* @__PURE__ */ React60.createElement(
|
5429
5520
|
VideoTile_default,
|
5430
5521
|
__spreadValues({
|
5431
5522
|
peerId: activeScreensharePeerId,
|
5432
5523
|
trackId,
|
5433
|
-
width: "100%",
|
5434
5524
|
height: 225,
|
5435
5525
|
rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
|
5436
5526
|
}, tileLayout)
|
5437
5527
|
),
|
5438
|
-
!!ViewComponent && /* @__PURE__ */
|
5528
|
+
!!ViewComponent && /* @__PURE__ */ React60.createElement(
|
5439
5529
|
Box,
|
5440
5530
|
{
|
5441
5531
|
css: {
|
@@ -5471,10 +5561,10 @@ var SidePane = ({
|
|
5471
5561
|
var SidePane_default = SidePane;
|
5472
5562
|
|
5473
5563
|
// src/Prebuilt/layouts/WaitingView.jsx
|
5474
|
-
import
|
5564
|
+
import React61 from "react";
|
5475
5565
|
import { ColoredTimeIcon } from "@100mslive/react-icons";
|
5476
|
-
var WaitingView =
|
5477
|
-
return /* @__PURE__ */
|
5566
|
+
var WaitingView = React61.memo(() => {
|
5567
|
+
return /* @__PURE__ */ React61.createElement(
|
5478
5568
|
Box,
|
5479
5569
|
{
|
5480
5570
|
css: {
|
@@ -5488,7 +5578,7 @@ var WaitingView = React59.memo(() => {
|
|
5488
5578
|
},
|
5489
5579
|
"data-testid": "waiting_view"
|
5490
5580
|
},
|
5491
|
-
/* @__PURE__ */
|
5581
|
+
/* @__PURE__ */ React61.createElement(
|
5492
5582
|
Flex,
|
5493
5583
|
{
|
5494
5584
|
align: "center",
|
@@ -5502,8 +5592,8 @@ var WaitingView = React59.memo(() => {
|
|
5502
5592
|
gap: "$8"
|
5503
5593
|
}
|
5504
5594
|
},
|
5505
|
-
/* @__PURE__ */
|
5506
|
-
/* @__PURE__ */
|
5595
|
+
/* @__PURE__ */ React61.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
|
5596
|
+
/* @__PURE__ */ React61.createElement(
|
5507
5597
|
Flex,
|
5508
5598
|
{
|
5509
5599
|
direction: "column",
|
@@ -5513,28 +5603,28 @@ var WaitingView = React59.memo(() => {
|
|
5513
5603
|
gap: "$4"
|
5514
5604
|
}
|
5515
5605
|
},
|
5516
|
-
/* @__PURE__ */
|
5517
|
-
/* @__PURE__ */
|
5606
|
+
/* @__PURE__ */ React61.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
|
5607
|
+
/* @__PURE__ */ React61.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
|
5518
5608
|
)
|
5519
5609
|
)
|
5520
5610
|
);
|
5521
5611
|
});
|
5522
5612
|
|
5523
5613
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
5524
|
-
var HLSView =
|
5614
|
+
var HLSView = React62.lazy(() => import("./HLSView-3S74KF3A.js"));
|
5525
5615
|
var VideoStreamingSection = ({
|
5526
5616
|
screenType,
|
5527
5617
|
elements,
|
5528
5618
|
hideControls = false
|
5529
5619
|
}) => {
|
5530
5620
|
var _a, _b;
|
5531
|
-
const localPeerRole = useHMSStore34(
|
5621
|
+
const localPeerRole = useHMSStore34(selectLocalPeerRoleName3);
|
5532
5622
|
const isConnected = useHMSStore34(selectIsConnectedToRoom6);
|
5533
5623
|
const hmsActions = useHMSActions21();
|
5534
5624
|
const waitingViewerRole = useWaitingViewerRole();
|
5535
5625
|
const urlToIframe = useUrlToEmbed();
|
5536
5626
|
const pdfAnnotatorActive = usePDFAnnotator();
|
5537
|
-
|
5627
|
+
useEffect24(() => {
|
5538
5628
|
if (!isConnected) {
|
5539
5629
|
return;
|
5540
5630
|
}
|
@@ -5545,17 +5635,17 @@ var VideoStreamingSection = ({
|
|
5545
5635
|
}
|
5546
5636
|
let ViewComponent;
|
5547
5637
|
if (screenType === "hls_live_streaming") {
|
5548
|
-
ViewComponent = /* @__PURE__ */
|
5638
|
+
ViewComponent = /* @__PURE__ */ React62.createElement(HLSView, null);
|
5549
5639
|
} else if (localPeerRole === waitingViewerRole) {
|
5550
|
-
ViewComponent = /* @__PURE__ */
|
5640
|
+
ViewComponent = /* @__PURE__ */ React62.createElement(WaitingView, null);
|
5551
5641
|
} else if (pdfAnnotatorActive) {
|
5552
|
-
ViewComponent = /* @__PURE__ */
|
5642
|
+
ViewComponent = /* @__PURE__ */ React62.createElement(PDFView, null);
|
5553
5643
|
} else if (urlToIframe) {
|
5554
|
-
ViewComponent = /* @__PURE__ */
|
5644
|
+
ViewComponent = /* @__PURE__ */ React62.createElement(EmbedView, null);
|
5555
5645
|
} else {
|
5556
|
-
ViewComponent = /* @__PURE__ */
|
5646
|
+
ViewComponent = /* @__PURE__ */ React62.createElement(GridLayout, __spreadValues({}, (_a = elements == null ? void 0 : elements.video_tile_layout) == null ? void 0 : _a.grid));
|
5557
5647
|
}
|
5558
|
-
return /* @__PURE__ */
|
5648
|
+
return /* @__PURE__ */ React62.createElement(Suspense2, { fallback: /* @__PURE__ */ React62.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React62.createElement(
|
5559
5649
|
Flex,
|
5560
5650
|
{
|
5561
5651
|
css: {
|
@@ -5565,7 +5655,7 @@ var VideoStreamingSection = ({
|
|
5565
5655
|
}
|
5566
5656
|
},
|
5567
5657
|
ViewComponent,
|
5568
|
-
/* @__PURE__ */
|
5658
|
+
/* @__PURE__ */ React62.createElement(
|
5569
5659
|
SidePane_default,
|
5570
5660
|
{
|
5571
5661
|
screenType,
|
@@ -5576,80 +5666,6 @@ var VideoStreamingSection = ({
|
|
5576
5666
|
));
|
5577
5667
|
};
|
5578
5668
|
|
5579
|
-
// src/Prebuilt/components/RoleChangeRequestModal.tsx
|
5580
|
-
import React61, { useEffect as useEffect24 } from "react";
|
5581
|
-
import {
|
5582
|
-
selectLocalPeerName,
|
5583
|
-
selectLocalPeerRoleName as selectLocalPeerRoleName3,
|
5584
|
-
selectRoleChangeRequest,
|
5585
|
-
useCustomEvent as useCustomEvent2,
|
5586
|
-
useHMSActions as useHMSActions22,
|
5587
|
-
useHMSStore as useHMSStore35
|
5588
|
-
} from "@100mslive/react-sdk";
|
5589
|
-
var RoleChangeRequestModal = () => {
|
5590
|
-
const hmsActions = useHMSActions22();
|
5591
|
-
const { updateMetaData } = useMyMetadata();
|
5592
|
-
const currentRole = useHMSStore35(selectLocalPeerRoleName3);
|
5593
|
-
const roleChangeRequest = useHMSStore35(selectRoleChangeRequest);
|
5594
|
-
const name = useHMSStore35(selectLocalPeerName);
|
5595
|
-
const { sendEvent } = useCustomEvent2({ type: ROLE_CHANGE_DECLINED });
|
5596
|
-
useEffect24(() => {
|
5597
|
-
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
5598
|
-
return;
|
5599
|
-
}
|
5600
|
-
(() => __async(void 0, null, function* () {
|
5601
|
-
yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
|
5602
|
-
}))();
|
5603
|
-
}, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
|
5604
|
-
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
5605
|
-
return null;
|
5606
|
-
}
|
5607
|
-
const body = /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(Text, { css: { fontWeight: 400, c: "$on_surface_medium", textAlign: "center" } }, "Setup your audio and video before joining"), /* @__PURE__ */ React61.createElement(
|
5608
|
-
Flex,
|
5609
|
-
{
|
5610
|
-
align: "center",
|
5611
|
-
justify: "center",
|
5612
|
-
css: {
|
5613
|
-
"@sm": { width: "100%" },
|
5614
|
-
flexDirection: "column",
|
5615
|
-
mt: "$6"
|
5616
|
-
}
|
5617
|
-
},
|
5618
|
-
/* @__PURE__ */ React61.createElement(PreviewTile, { name: name || "" }),
|
5619
|
-
/* @__PURE__ */ React61.createElement(PreviewControls, { hideSettings: true })
|
5620
|
-
));
|
5621
|
-
return /* @__PURE__ */ React61.createElement(
|
5622
|
-
RequestDialog,
|
5623
|
-
{
|
5624
|
-
title: `You're invited to join the ${roleChangeRequest.role.name} role`,
|
5625
|
-
onOpenChange: (value) => __async(void 0, null, function* () {
|
5626
|
-
var _a;
|
5627
|
-
if (!value) {
|
5628
|
-
yield hmsActions.rejectChangeRole(roleChangeRequest);
|
5629
|
-
sendEvent(__spreadProps(__spreadValues({}, roleChangeRequest), { peerName: name }), { peerId: (_a = roleChangeRequest.requestedBy) == null ? void 0 : _a.id });
|
5630
|
-
yield hmsActions.cancelMidCallPreview();
|
5631
|
-
yield hmsActions.lowerLocalPeerHand();
|
5632
|
-
}
|
5633
|
-
}),
|
5634
|
-
body,
|
5635
|
-
onAction: () => __async(void 0, null, function* () {
|
5636
|
-
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
5637
|
-
yield updateMetaData({ prevRole: currentRole });
|
5638
|
-
yield hmsActions.lowerLocalPeerHand();
|
5639
|
-
}),
|
5640
|
-
actionText: "Accept"
|
5641
|
-
}
|
5642
|
-
);
|
5643
|
-
};
|
5644
|
-
var RequestDialog = ({
|
5645
|
-
open = true,
|
5646
|
-
onOpenChange,
|
5647
|
-
title,
|
5648
|
-
body,
|
5649
|
-
actionText = "Accept",
|
5650
|
-
onAction
|
5651
|
-
}) => /* @__PURE__ */ React61.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React61.createElement(Dialog.Portal, null, /* @__PURE__ */ React61.createElement(Dialog.Overlay, null), /* @__PURE__ */ React61.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ React61.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ React61.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ React61.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ React61.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md" } }, /* @__PURE__ */ React61.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React61.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ React61.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Cancel"))), /* @__PURE__ */ React61.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ React61.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText))))));
|
5652
|
-
|
5653
5669
|
// src/Prebuilt/components/conference.jsx
|
5654
5670
|
var Conference = () => {
|
5655
5671
|
var _a, _b, _c, _d, _e;
|
@@ -5658,12 +5674,12 @@ var Conference = () => {
|
|
5658
5674
|
const { userName, endpoints } = useHMSPrebuiltContext();
|
5659
5675
|
const screenProps = useRoomLayoutConferencingScreen();
|
5660
5676
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
5661
|
-
const roomState =
|
5677
|
+
const roomState = useHMSStore35(selectRoomState);
|
5662
5678
|
const prevState = usePrevious(roomState);
|
5663
|
-
const isConnectedToRoom =
|
5664
|
-
const hmsActions =
|
5679
|
+
const isConnectedToRoom = useHMSStore35(selectIsConnectedToRoom7);
|
5680
|
+
const hmsActions = useHMSActions22();
|
5665
5681
|
const [hideControls, setHideControls] = useState35(false);
|
5666
|
-
const dropdownList =
|
5682
|
+
const dropdownList = useHMSStore35(selectAppData4(APP_DATA.dropdownList));
|
5667
5683
|
const authTokenInAppData = useAuthToken();
|
5668
5684
|
const headerRef = useRef14();
|
5669
5685
|
const footerRef = useRef14();
|
@@ -5728,9 +5744,9 @@ var Conference = () => {
|
|
5728
5744
|
};
|
5729
5745
|
}, []);
|
5730
5746
|
if (!isConnectedToRoom) {
|
5731
|
-
return /* @__PURE__ */
|
5747
|
+
return /* @__PURE__ */ React63.createElement(FullPageProgress_default, { text: "Joining..." });
|
5732
5748
|
}
|
5733
|
-
return /* @__PURE__ */
|
5749
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, isHLSStarted ? /* @__PURE__ */ React63.createElement(Box, { css: { position: "fixed", zIndex: 100, w: "100%", h: "100%", left: 0, top: 0 } }, /* @__PURE__ */ React63.createElement(FullPageProgress_default, { text: "Starting live stream...", css: { opacity: 0.8, bg: "$background_dim" } })) : null, /* @__PURE__ */ React63.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !screenProps.hideSections.includes("header") && /* @__PURE__ */ React63.createElement(
|
5734
5750
|
Box,
|
5735
5751
|
{
|
5736
5752
|
ref: headerRef,
|
@@ -5744,8 +5760,8 @@ var Conference = () => {
|
|
5744
5760
|
},
|
5745
5761
|
"data-testid": "header"
|
5746
5762
|
},
|
5747
|
-
/* @__PURE__ */
|
5748
|
-
), /* @__PURE__ */
|
5763
|
+
/* @__PURE__ */ React63.createElement(Header, { elements: screenProps.elements, screenType: screenProps.screenType })
|
5764
|
+
), /* @__PURE__ */ React63.createElement(
|
5749
5765
|
Box,
|
5750
5766
|
{
|
5751
5767
|
css: {
|
@@ -5763,7 +5779,7 @@ var Conference = () => {
|
|
5763
5779
|
"data-testid": "conferencing",
|
5764
5780
|
onClick: toggleControls
|
5765
5781
|
},
|
5766
|
-
/* @__PURE__ */
|
5782
|
+
/* @__PURE__ */ React63.createElement(
|
5767
5783
|
VideoStreamingSection,
|
5768
5784
|
{
|
5769
5785
|
screenType: screenProps.screenType,
|
@@ -5771,7 +5787,7 @@ var Conference = () => {
|
|
5771
5787
|
hideControls
|
5772
5788
|
}
|
5773
5789
|
)
|
5774
|
-
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */
|
5790
|
+
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */ React63.createElement(
|
5775
5791
|
Box,
|
5776
5792
|
{
|
5777
5793
|
ref: footerRef,
|
@@ -5788,11 +5804,11 @@ var Conference = () => {
|
|
5788
5804
|
},
|
5789
5805
|
"data-testid": "footer"
|
5790
5806
|
},
|
5791
|
-
/* @__PURE__ */
|
5792
|
-
), /* @__PURE__ */
|
5807
|
+
/* @__PURE__ */ React63.createElement(Footer2, { elements: screenProps.elements, screenType: screenProps.screenType })
|
5808
|
+
), /* @__PURE__ */ React63.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ React63.createElement(HLSFailureModal, null), /* @__PURE__ */ React63.createElement(ActivatedPIP, null)));
|
5793
5809
|
};
|
5794
5810
|
var conference_default = Conference;
|
5795
5811
|
export {
|
5796
5812
|
conference_default as default
|
5797
5813
|
};
|
5798
|
-
//# sourceMappingURL=conference-
|
5814
|
+
//# sourceMappingURL=conference-JNABIZBG.js.map
|