@100mslive/roomkit-react 0.1.6-alpha.1 → 0.1.6-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-HNVYG5VE.js → HLSView-QMU5JK7U.js} +3 -3
- package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +1 -3
- package/dist/Prebuilt/components/SidePaneTabs.d.ts +7 -0
- package/dist/{VirtualBackground-UM2FOUHQ.js → VirtualBackground-37FXUPYO.js} +6 -6
- package/dist/VirtualBackground-37FXUPYO.js.map +7 -0
- package/dist/{chunk-POE7H4IE.js → chunk-KBVIZGYW.js} +2 -2
- package/dist/{chunk-POE7H4IE.js.map → chunk-KBVIZGYW.js.map} +1 -1
- package/dist/{chunk-LYSAET4G.js → chunk-WVGGQZK4.js} +100 -106
- package/dist/{chunk-LYSAET4G.js.map → chunk-WVGGQZK4.js.map} +3 -3
- package/dist/{chunk-364HP22I.js → chunk-ZKE2N5LH.js} +2 -2
- package/dist/{conference-UWLJHMB2.js → conference-FJJQ4TXX.js} +419 -384
- package/dist/conference-FJJQ4TXX.js.map +7 -0
- package/dist/index.cjs.js +594 -570
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +127 -127
- package/dist/meta.esbuild.json +161 -160
- package/package.json +6 -6
- package/src/Prebuilt/components/Chat/Chat.jsx +2 -6
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +2 -9
- package/src/Prebuilt/components/Footer/Footer.tsx +22 -6
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +0 -2
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +8 -1
- package/src/Prebuilt/components/InsetTile.tsx +1 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +1 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +14 -7
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +2 -3
- package/src/Prebuilt/components/RoleChangeRequestModal.tsx +6 -4
- package/src/Prebuilt/components/SidePaneTabs.tsx +120 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -25
- package/src/Prebuilt/layouts/SidePane.tsx +12 -10
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +3 -3
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +2 -2
- package/dist/VirtualBackground-UM2FOUHQ.js.map +0 -7
- package/dist/conference-UWLJHMB2.js.map +0 -7
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +0 -84
- /package/dist/{HLSView-HNVYG5VE.js.map → HLSView-QMU5JK7U.js.map} +0 -0
- /package/dist/{chunk-364HP22I.js.map → chunk-ZKE2N5LH.js.map} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
ActionTile
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-ZKE2N5LH.js";
|
4
4
|
import {
|
5
5
|
APP_DATA,
|
6
6
|
Accordion,
|
@@ -77,13 +77,14 @@ import {
|
|
77
77
|
useSetAppDataByKey,
|
78
78
|
useSetSubscribedChatSelector,
|
79
79
|
useSetUiSettings,
|
80
|
+
useSidepaneReset,
|
80
81
|
useSidepaneToggle,
|
81
82
|
useTheme,
|
82
83
|
useUISettings,
|
83
84
|
useUrlToEmbed,
|
84
85
|
useUserPreferences,
|
85
86
|
useWaitingViewerRole
|
86
|
-
} from "./chunk-
|
87
|
+
} from "./chunk-WVGGQZK4.js";
|
87
88
|
import {
|
88
89
|
Box,
|
89
90
|
Flex,
|
@@ -102,10 +103,10 @@ import {
|
|
102
103
|
slideLeftAndFade,
|
103
104
|
styled,
|
104
105
|
textEllipsis
|
105
|
-
} from "./chunk-
|
106
|
+
} from "./chunk-KBVIZGYW.js";
|
106
107
|
|
107
108
|
// src/Prebuilt/components/conference.jsx
|
108
|
-
import React62, { useEffect as
|
109
|
+
import React62, { useEffect as useEffect25, useRef as useRef14, useState as useState35 } from "react";
|
109
110
|
import { useNavigate, useParams } from "react-router-dom";
|
110
111
|
import { usePrevious } from "react-use";
|
111
112
|
import {
|
@@ -114,14 +115,13 @@ import {
|
|
114
115
|
selectIsConnectedToRoom as selectIsConnectedToRoom7,
|
115
116
|
selectRoomState,
|
116
117
|
useHMSActions as useHMSActions22,
|
117
|
-
useHMSStore as
|
118
|
+
useHMSStore as useHMSStore36
|
118
119
|
} from "@100mslive/react-sdk";
|
119
120
|
|
120
121
|
// src/Prebuilt/components/Footer/Footer.tsx
|
121
|
-
import
|
122
|
+
import React36, { Suspense, useEffect as useEffect6 } from "react";
|
122
123
|
import { useMedia as useMedia5 } from "react-use";
|
123
124
|
import { Chat_ChatState } from "@100mslive/types-prebuilt/elements/chat";
|
124
|
-
import { selectIsLocalVideoEnabled as selectIsLocalVideoEnabled2, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
125
125
|
|
126
126
|
// src/Prebuilt/components/EmojiReaction.jsx
|
127
127
|
import React2, { Fragment, useState } from "react";
|
@@ -2068,7 +2068,7 @@ var MwebOptions = ({
|
|
2068
2068
|
isRecordingLoading ? /* @__PURE__ */ React22.createElement(Loading, null) : /* @__PURE__ */ React22.createElement(RecordIcon2, null),
|
2069
2069
|
/* @__PURE__ */ React22.createElement(ActionTile.Title, null, isBrowserRecordingOn ? "Recording On" : isRecordingLoading ? "Starting Recording" : "Start Recording")
|
2070
2070
|
) : null
|
2071
|
-
))), /* @__PURE__ */ React22.createElement(SettingsModal_default, { open: openSettingsSheet, onOpenChange: setOpenSettingsSheet }), openModals.has(MODALS2.MUTE_ALL) && /* @__PURE__ */ React22.createElement(MuteAllModal, { onOpenChange: (value) => updateState(MODALS2.MUTE_ALL, value), isMobile: true }), openModals.has(MODALS2.CHANGE_NAME) && /* @__PURE__ */ React22.createElement(
|
2071
|
+
))), /* @__PURE__ */ React22.createElement(SettingsModal_default, { open: openSettingsSheet, onOpenChange: setOpenSettingsSheet, screenType }), openModals.has(MODALS2.MUTE_ALL) && /* @__PURE__ */ React22.createElement(MuteAllModal, { onOpenChange: (value) => updateState(MODALS2.MUTE_ALL, value), isMobile: true }), openModals.has(MODALS2.CHANGE_NAME) && /* @__PURE__ */ React22.createElement(
|
2072
2072
|
ChangeNameModal,
|
2073
2073
|
{
|
2074
2074
|
onOpenChange: (value) => updateState(MODALS2.CHANGE_NAME, value),
|
@@ -2644,33 +2644,28 @@ var ScreenshareToggle = ({ css = {} }) => {
|
|
2644
2644
|
};
|
2645
2645
|
|
2646
2646
|
// src/Prebuilt/components/Footer/ChatToggle.tsx
|
2647
|
-
import React32
|
2647
|
+
import React32 from "react";
|
2648
2648
|
import { selectUnreadHMSMessagesCount, useHMSStore as useHMSStore14 } from "@100mslive/react-sdk";
|
2649
2649
|
import { ChatIcon, ChatUnreadIcon } from "@100mslive/react-icons";
|
2650
|
-
var ChatToggle = (
|
2650
|
+
var ChatToggle = () => {
|
2651
2651
|
const countUnreadMessages = useHMSStore14(selectUnreadHMSMessagesCount);
|
2652
2652
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
2653
2653
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
2654
|
-
useEffect5(() => {
|
2655
|
-
if (!isChatOpen && openByDefault) {
|
2656
|
-
toggleChat();
|
2657
|
-
}
|
2658
|
-
}, [toggleChat, openByDefault]);
|
2659
2654
|
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" })));
|
2660
2655
|
};
|
2661
2656
|
|
2662
2657
|
// src/Prebuilt/components/Footer/ParticipantList.jsx
|
2663
|
-
import
|
2658
|
+
import React35, { Fragment as Fragment7, useCallback as useCallback6, useEffect as useEffect5, useState as useState18 } from "react";
|
2664
2659
|
import { useDebounce, useMedia as useMedia4 } from "react-use";
|
2665
2660
|
import {
|
2666
2661
|
selectIsPeerAudioEnabled,
|
2667
2662
|
selectLocalPeerID as selectLocalPeerID4,
|
2668
|
-
selectPeerCount as
|
2663
|
+
selectPeerCount as selectPeerCount2,
|
2669
2664
|
selectPeerMetadata as selectPeerMetadata2,
|
2670
2665
|
selectPeersByCondition as selectPeersByCondition2,
|
2671
2666
|
selectPermissions as selectPermissions8,
|
2672
2667
|
useHMSActions as useHMSActions11,
|
2673
|
-
useHMSStore as
|
2668
|
+
useHMSStore as useHMSStore16
|
2674
2669
|
} from "@100mslive/react-sdk";
|
2675
2670
|
import {
|
2676
2671
|
ChangeRoleIcon as ChangeRoleIcon2,
|
@@ -2682,86 +2677,14 @@ import {
|
|
2682
2677
|
VerticalMenuIcon as VerticalMenuIcon4
|
2683
2678
|
} from "@100mslive/react-icons";
|
2684
2679
|
|
2685
|
-
// src/Prebuilt/components/Chat/ChatParticipantHeader.jsx
|
2686
|
-
import React33, { useState as useState17 } from "react";
|
2687
|
-
import { selectPeerCount as selectPeerCount2, useHMSStore as useHMSStore15 } from "@100mslive/react-sdk";
|
2688
|
-
import { CrossIcon as CrossIcon5 } from "@100mslive/react-icons";
|
2689
|
-
var tabTriggerCSS = {
|
2690
|
-
color: "$on_surface_high",
|
2691
|
-
p: "$4",
|
2692
|
-
fontWeight: "$semiBold",
|
2693
|
-
fontSize: "$sm",
|
2694
|
-
w: "100%",
|
2695
|
-
justifyContent: "center"
|
2696
|
-
};
|
2697
|
-
var ChatParticipantHeader = React33.memo(({ activeTabValue = SIDE_PANE_OPTIONS.CHAT }) => {
|
2698
|
-
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
2699
|
-
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
2700
|
-
const [activeTab, setActiveTab] = useState17(activeTabValue);
|
2701
|
-
const peerCount = useHMSStore15(selectPeerCount2);
|
2702
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
2703
|
-
const showChat = !!(elements == null ? void 0 : elements.chat);
|
2704
|
-
const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
|
2705
|
-
const hideTabs = !(showChat && showParticipants);
|
2706
|
-
return /* @__PURE__ */ React33.createElement(
|
2707
|
-
Flex,
|
2708
|
-
{
|
2709
|
-
align: "center",
|
2710
|
-
css: {
|
2711
|
-
color: "$on_primary_high",
|
2712
|
-
h: "$16"
|
2713
|
-
}
|
2714
|
-
},
|
2715
|
-
hideTabs ? /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", c: "$on_surface_high" } }, showChat ? "Chat" : `Participants (${peerCount})`) : /* @__PURE__ */ React33.createElement(Flex, { css: { w: "100%", bg: "$surface_default", borderRadius: "$2" } }, /* @__PURE__ */ React33.createElement(Tabs.Root, { value: activeTab, onValueChange: setActiveTab, css: { w: "100%" } }, /* @__PURE__ */ React33.createElement(Tabs.List, { css: { w: "100%", p: "$2" } }, /* @__PURE__ */ React33.createElement(
|
2716
|
-
Tabs.Trigger,
|
2717
|
-
{
|
2718
|
-
value: SIDE_PANE_OPTIONS.CHAT,
|
2719
|
-
onClick: toggleChat,
|
2720
|
-
css: __spreadProps(__spreadValues({}, tabTriggerCSS), {
|
2721
|
-
color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? "$on_surface_low" : "$on_surface_high"
|
2722
|
-
})
|
2723
|
-
},
|
2724
|
-
"Chat"
|
2725
|
-
), /* @__PURE__ */ React33.createElement(
|
2726
|
-
Tabs.Trigger,
|
2727
|
-
{
|
2728
|
-
value: SIDE_PANE_OPTIONS.PARTICIPANTS,
|
2729
|
-
onClick: toggleParticipants,
|
2730
|
-
css: __spreadProps(__spreadValues({}, tabTriggerCSS), {
|
2731
|
-
color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? "$on_surface_low" : "$on_surface_high"
|
2732
|
-
})
|
2733
|
-
},
|
2734
|
-
"Participants (",
|
2735
|
-
peerCount,
|
2736
|
-
")"
|
2737
|
-
)))),
|
2738
|
-
/* @__PURE__ */ React33.createElement(
|
2739
|
-
IconButton,
|
2740
|
-
{
|
2741
|
-
css: { ml: "auto" },
|
2742
|
-
onClick: (e) => {
|
2743
|
-
e.stopPropagation();
|
2744
|
-
if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
|
2745
|
-
toggleChat();
|
2746
|
-
} else {
|
2747
|
-
toggleParticipants();
|
2748
|
-
}
|
2749
|
-
},
|
2750
|
-
"data-testid": "close_chat"
|
2751
|
-
},
|
2752
|
-
/* @__PURE__ */ React33.createElement(CrossIcon5, null)
|
2753
|
-
)
|
2754
|
-
);
|
2755
|
-
});
|
2756
|
-
|
2757
2680
|
// src/Prebuilt/components/Footer/RoleAccordion.tsx
|
2758
|
-
import
|
2681
|
+
import React34 from "react";
|
2759
2682
|
import { useMeasure } from "react-use";
|
2760
2683
|
import { FixedSizeList } from "react-window";
|
2761
2684
|
|
2762
2685
|
// src/Prebuilt/components/Footer/RoleOptions.tsx
|
2763
|
-
import
|
2764
|
-
import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions10, useHMSStore as
|
2686
|
+
import React33, { useState as useState17 } from "react";
|
2687
|
+
import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions10, useHMSStore as useHMSStore15, useHMSVanillaStore as useHMSVanillaStore2 } from "@100mslive/react-sdk";
|
2765
2688
|
import {
|
2766
2689
|
MicOffIcon as MicOffIcon2,
|
2767
2690
|
MicOnIcon,
|
@@ -2774,8 +2697,8 @@ import {
|
|
2774
2697
|
var dropdownItemCSS = { backgroundColor: "$surface_default", gap: "$4", p: "$8" };
|
2775
2698
|
var optionTextCSS = { fontWeight: "$semiBold", color: "$on_surface_high", textTransform: "none" };
|
2776
2699
|
var RoleOptions = ({ roleName, peerList }) => {
|
2777
|
-
const [openOptions, setOpenOptions] =
|
2778
|
-
const permissions =
|
2700
|
+
const [openOptions, setOpenOptions] = useState17(false);
|
2701
|
+
const permissions = useHMSStore15(selectPermissions7);
|
2779
2702
|
const hmsActions = useHMSActions10();
|
2780
2703
|
const { elements } = useRoomLayoutConferencingScreen();
|
2781
2704
|
const { on_stage_role, off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
|
@@ -2820,7 +2743,7 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
2820
2743
|
console.error(e);
|
2821
2744
|
}
|
2822
2745
|
});
|
2823
|
-
return /* @__PURE__ */
|
2746
|
+
return /* @__PURE__ */ React33.createElement(Dropdown.Root, { open: openOptions, onOpenChange: setOpenOptions }, /* @__PURE__ */ React33.createElement(
|
2824
2747
|
Dropdown.Trigger,
|
2825
2748
|
{
|
2826
2749
|
onClick: (e) => e.stopPropagation(),
|
@@ -2839,40 +2762,40 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
2839
2762
|
}
|
2840
2763
|
}
|
2841
2764
|
},
|
2842
|
-
/* @__PURE__ */
|
2843
|
-
), /* @__PURE__ */
|
2765
|
+
/* @__PURE__ */ React33.createElement(Flex, null, /* @__PURE__ */ React33.createElement(VerticalMenuIcon3, null))
|
2766
|
+
), /* @__PURE__ */ React33.createElement(
|
2844
2767
|
Dropdown.Content,
|
2845
2768
|
{
|
2846
2769
|
onClick: (e) => e.stopPropagation(),
|
2847
2770
|
css: { w: "max-content", maxWidth: "$64", bg: "$surface_default", py: 0 },
|
2848
2771
|
align: "end"
|
2849
2772
|
},
|
2850
|
-
canRemoveRoleFromStage && /* @__PURE__ */
|
2773
|
+
canRemoveRoleFromStage && /* @__PURE__ */ React33.createElement(
|
2851
2774
|
Dropdown.Item,
|
2852
2775
|
{
|
2853
2776
|
css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderBottom: "1px solid $border_bright" }),
|
2854
2777
|
onClick: removeAllFromStage
|
2855
2778
|
},
|
2856
|
-
/* @__PURE__ */
|
2857
|
-
/* @__PURE__ */
|
2779
|
+
/* @__PURE__ */ React33.createElement(PersonRectangleIcon, null),
|
2780
|
+
/* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, "Remove all from Stage")
|
2858
2781
|
),
|
2859
|
-
canMuteRole && /* @__PURE__ */
|
2782
|
+
canMuteRole && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Dropdown.Item, { css: dropdownItemCSS, onClick: () => setTrackEnabled("audio", !allPeersHaveAudioOn) }, allPeersHaveAudioOn ? /* @__PURE__ */ React33.createElement(MicOffIcon2, null) : /* @__PURE__ */ React33.createElement(MicOnIcon, null), /* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveAudioOn ? "Mute" : "Unmute", " Audio")), /* @__PURE__ */ React33.createElement(
|
2860
2783
|
Dropdown.Item,
|
2861
2784
|
{
|
2862
2785
|
css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderTop: "1px solid $border_bright" }),
|
2863
2786
|
onClick: () => setTrackEnabled("video", !allPeersHaveVideoOn)
|
2864
2787
|
},
|
2865
|
-
allPeersHaveVideoOn ? /* @__PURE__ */
|
2866
|
-
/* @__PURE__ */
|
2788
|
+
allPeersHaveVideoOn ? /* @__PURE__ */ React33.createElement(VideoOffIcon, null) : /* @__PURE__ */ React33.createElement(VideoOnIcon, null),
|
2789
|
+
/* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: optionTextCSS }, allPeersHaveVideoOn ? "Mute" : "Unmute", " Video")
|
2867
2790
|
)),
|
2868
|
-
canRemoveRoleFromRoom && /* @__PURE__ */
|
2791
|
+
canRemoveRoleFromRoom && /* @__PURE__ */ React33.createElement(
|
2869
2792
|
Dropdown.Item,
|
2870
2793
|
{
|
2871
2794
|
css: __spreadProps(__spreadValues({}, dropdownItemCSS), { borderTop: "1px solid $border_bright", color: "$alert_error_default" }),
|
2872
2795
|
onClick: removePeersFromRoom
|
2873
2796
|
},
|
2874
|
-
/* @__PURE__ */
|
2875
|
-
/* @__PURE__ */
|
2797
|
+
/* @__PURE__ */ React33.createElement(RemoveUserIcon, null),
|
2798
|
+
/* @__PURE__ */ React33.createElement(Text, { variant: "sm", css: __spreadProps(__spreadValues({}, optionTextCSS), { color: "inherit" }) }, "Remove all from Room")
|
2876
2799
|
)
|
2877
2800
|
));
|
2878
2801
|
};
|
@@ -2882,8 +2805,8 @@ var ROW_HEIGHT = 50;
|
|
2882
2805
|
function itemKey(index, data3) {
|
2883
2806
|
return data3.peerList[index].id;
|
2884
2807
|
}
|
2885
|
-
var VirtualizedParticipantItem =
|
2886
|
-
return /* @__PURE__ */
|
2808
|
+
var VirtualizedParticipantItem = React34.memo(({ index, data: data3 }) => {
|
2809
|
+
return /* @__PURE__ */ React34.createElement(Participant, { key: data3.peerList[index].id, peer: data3.peerList[index], isConnected: data3.isConnected });
|
2887
2810
|
});
|
2888
2811
|
var RoleAccordion = ({
|
2889
2812
|
peerList = [],
|
@@ -2898,7 +2821,7 @@ var RoleAccordion = ({
|
|
2898
2821
|
return null;
|
2899
2822
|
}
|
2900
2823
|
const height = ROW_HEIGHT * peerList.length;
|
2901
|
-
return /* @__PURE__ */
|
2824
|
+
return /* @__PURE__ */ React34.createElement(Flex, { direction: "column", css: { flexGrow: 1, "&:hover .role_actions": { visibility: "visible" } }, ref }, /* @__PURE__ */ React34.createElement(
|
2902
2825
|
Accordion.Root,
|
2903
2826
|
{
|
2904
2827
|
type: "single",
|
@@ -2906,7 +2829,7 @@ var RoleAccordion = ({
|
|
2906
2829
|
defaultValue: roleName,
|
2907
2830
|
css: { borderRadius: "$1", border: "1px solid $border_bright" }
|
2908
2831
|
},
|
2909
|
-
/* @__PURE__ */
|
2832
|
+
/* @__PURE__ */ React34.createElement(Accordion.Item, { value: roleName }, /* @__PURE__ */ React34.createElement(
|
2910
2833
|
Accordion.Header,
|
2911
2834
|
{
|
2912
2835
|
iconStyles: { c: "$on_surface_high" },
|
@@ -2918,7 +2841,7 @@ var RoleAccordion = ({
|
|
2918
2841
|
c: "$on_surface_medium"
|
2919
2842
|
}
|
2920
2843
|
},
|
2921
|
-
/* @__PURE__ */
|
2844
|
+
/* @__PURE__ */ React34.createElement(Flex, { justify: "between", css: { flexGrow: 1, pr: "$6" } }, /* @__PURE__ */ React34.createElement(
|
2922
2845
|
Text,
|
2923
2846
|
{
|
2924
2847
|
variant: "sm",
|
@@ -2927,8 +2850,8 @@ var RoleAccordion = ({
|
|
2927
2850
|
roleName,
|
2928
2851
|
" ",
|
2929
2852
|
`(${getFormattedCount(peerList.length)})`
|
2930
|
-
), /* @__PURE__ */
|
2931
|
-
), /* @__PURE__ */
|
2853
|
+
), /* @__PURE__ */ React34.createElement(RoleOptions, { roleName, peerList }))
|
2854
|
+
), /* @__PURE__ */ React34.createElement(Accordion.Content, null, /* @__PURE__ */ React34.createElement(Box, { css: { borderTop: "1px solid $border_default" } }), /* @__PURE__ */ React34.createElement(
|
2932
2855
|
FixedSizeList,
|
2933
2856
|
{
|
2934
2857
|
itemSize: ROW_HEIGHT,
|
@@ -2945,10 +2868,10 @@ var RoleAccordion = ({
|
|
2945
2868
|
|
2946
2869
|
// src/Prebuilt/components/Footer/ParticipantList.jsx
|
2947
2870
|
var ParticipantList = () => {
|
2948
|
-
const [filter, setFilter] =
|
2871
|
+
const [filter, setFilter] = useState18();
|
2949
2872
|
const { participants, isConnected, peerCount } = useParticipants(filter);
|
2950
2873
|
const peersOrderedByRoles = {};
|
2951
|
-
const handRaisedPeers =
|
2874
|
+
const handRaisedPeers = useHMSStore16(selectPeersByCondition2((peer) => {
|
2952
2875
|
var _a;
|
2953
2876
|
return (_a = JSON.parse(peer.metadata || "{}")) == null ? void 0 : _a.isHandRaised;
|
2954
2877
|
}));
|
@@ -2970,7 +2893,7 @@ var ParticipantList = () => {
|
|
2970
2893
|
if (peerCount === 0) {
|
2971
2894
|
return null;
|
2972
2895
|
}
|
2973
|
-
return /* @__PURE__ */
|
2896
|
+
return /* @__PURE__ */ React35.createElement(Fragment7, null, /* @__PURE__ */ React35.createElement(Flex, { direction: "column", css: { size: "100%", gap: "$4" } }, !(filter == null ? void 0 : filter.search) && participants.length === 0 ? null : /* @__PURE__ */ React35.createElement(ParticipantSearch, { onSearch, inSidePane: true }), participants.length === 0 ? /* @__PURE__ */ React35.createElement(Flex, { align: "center", justify: "center", css: { w: "100%", p: "$8 0" } }, /* @__PURE__ */ React35.createElement(Text, { variant: "sm" }, !filter ? "No participants" : "No matching participants")) : null, /* @__PURE__ */ React35.createElement(
|
2974
2897
|
VirtualizedParticipants,
|
2975
2898
|
{
|
2976
2899
|
peersOrderedByRoles,
|
@@ -2981,10 +2904,10 @@ var ParticipantList = () => {
|
|
2981
2904
|
)));
|
2982
2905
|
};
|
2983
2906
|
var ParticipantCount = () => {
|
2984
|
-
const peerCount =
|
2907
|
+
const peerCount = useHMSStore16(selectPeerCount2);
|
2985
2908
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
2986
2909
|
const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
2987
|
-
|
2910
|
+
useEffect5(() => {
|
2988
2911
|
if (isParticipantsOpen && peerCount === 0) {
|
2989
2912
|
toggleSidepane();
|
2990
2913
|
}
|
@@ -2992,7 +2915,7 @@ var ParticipantCount = () => {
|
|
2992
2915
|
if (peerCount === 0) {
|
2993
2916
|
return null;
|
2994
2917
|
}
|
2995
|
-
return /* @__PURE__ */
|
2918
|
+
return /* @__PURE__ */ React35.createElement(
|
2996
2919
|
IconButton_default,
|
2997
2920
|
{
|
2998
2921
|
css: {
|
@@ -3008,12 +2931,12 @@ var ParticipantCount = () => {
|
|
3008
2931
|
active: !isParticipantsOpen,
|
3009
2932
|
"data-testid": "participant_list"
|
3010
2933
|
},
|
3011
|
-
/* @__PURE__ */
|
3012
|
-
/* @__PURE__ */
|
2934
|
+
/* @__PURE__ */ React35.createElement(PeopleIcon2, null),
|
2935
|
+
/* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, peerCount)
|
3013
2936
|
);
|
3014
2937
|
};
|
3015
2938
|
var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter, handRaisedList = [] }) => {
|
3016
|
-
return /* @__PURE__ */
|
2939
|
+
return /* @__PURE__ */ React35.createElement(
|
3017
2940
|
Flex,
|
3018
2941
|
{
|
3019
2942
|
direction: "column",
|
@@ -3025,7 +2948,7 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
3025
2948
|
pr: "$3"
|
3026
2949
|
}
|
3027
2950
|
},
|
3028
|
-
/* @__PURE__ */
|
2951
|
+
/* @__PURE__ */ React35.createElement(
|
3029
2952
|
RoleAccordion,
|
3030
2953
|
{
|
3031
2954
|
peerList: handRaisedList,
|
@@ -3035,7 +2958,7 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
3035
2958
|
isHandRaisedAccordion: true
|
3036
2959
|
}
|
3037
2960
|
),
|
3038
|
-
Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */
|
2961
|
+
Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */ React35.createElement(
|
3039
2962
|
RoleAccordion,
|
3040
2963
|
{
|
3041
2964
|
key: role,
|
@@ -3048,8 +2971,8 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
3048
2971
|
);
|
3049
2972
|
};
|
3050
2973
|
var Participant = ({ peer, isConnected }) => {
|
3051
|
-
const localPeerId =
|
3052
|
-
return /* @__PURE__ */
|
2974
|
+
const localPeerId = useHMSStore16(selectLocalPeerID4);
|
2975
|
+
return /* @__PURE__ */ React35.createElement(
|
3053
2976
|
Flex,
|
3054
2977
|
{
|
3055
2978
|
key: peer.id,
|
@@ -3064,17 +2987,17 @@ var Participant = ({ peer, isConnected }) => {
|
|
3064
2987
|
justify: "between",
|
3065
2988
|
"data-testid": "participant_" + peer.name
|
3066
2989
|
},
|
3067
|
-
/* @__PURE__ */
|
3068
|
-
isConnected ? /* @__PURE__ */
|
2990
|
+
/* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: __spreadProps(__spreadValues({}, textEllipsis(150)), { fontWeight: "$semiBold", color: "$on_surface_high" }) }, peer.name, " ", localPeerId === peer.id ? "(You)" : ""),
|
2991
|
+
isConnected ? /* @__PURE__ */ React35.createElement(ParticipantActions, { peerId: peer.id, isLocal: peer.id === localPeerId, role: peer.roleName }) : null
|
3069
2992
|
);
|
3070
2993
|
};
|
3071
|
-
var ParticipantActions =
|
2994
|
+
var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
|
3072
2995
|
var _a, _b;
|
3073
|
-
const isHandRaised = (_a =
|
3074
|
-
const canChangeRole = (_b =
|
2996
|
+
const isHandRaised = (_a = useHMSStore16(selectPeerMetadata2(peerId))) == null ? void 0 : _a.isHandRaised;
|
2997
|
+
const canChangeRole = (_b = useHMSStore16(selectPermissions8)) == null ? void 0 : _b.changeRole;
|
3075
2998
|
const shouldShowMoreActions = canChangeRole;
|
3076
|
-
const isAudioMuted = !
|
3077
|
-
return /* @__PURE__ */
|
2999
|
+
const isAudioMuted = !useHMSStore16(selectIsPeerAudioEnabled(peerId));
|
3000
|
+
return /* @__PURE__ */ React35.createElement(
|
3078
3001
|
Flex,
|
3079
3002
|
{
|
3080
3003
|
align: "center",
|
@@ -3083,32 +3006,32 @@ var ParticipantActions = React36.memo(({ peerId, role, isLocal }) => {
|
|
3083
3006
|
gap: "$8"
|
3084
3007
|
}
|
3085
3008
|
},
|
3086
|
-
/* @__PURE__ */
|
3087
|
-
isHandRaised && /* @__PURE__ */
|
3009
|
+
/* @__PURE__ */ React35.createElement(ConnectionIndicator, { peerId }),
|
3010
|
+
isHandRaised && /* @__PURE__ */ React35.createElement(
|
3088
3011
|
Flex,
|
3089
3012
|
{
|
3090
3013
|
align: "center",
|
3091
3014
|
justify: "center",
|
3092
3015
|
css: { p: "$1", c: "$on_surface_high", bg: "$surface_bright", borderRadius: "$round" }
|
3093
3016
|
},
|
3094
|
-
/* @__PURE__ */
|
3017
|
+
/* @__PURE__ */ React35.createElement(HandIcon3, { height: 19, width: 19 })
|
3095
3018
|
),
|
3096
|
-
isAudioMuted ? /* @__PURE__ */
|
3019
|
+
isAudioMuted ? /* @__PURE__ */ React35.createElement(
|
3097
3020
|
Flex,
|
3098
3021
|
{
|
3099
3022
|
align: "center",
|
3100
3023
|
justify: "center",
|
3101
3024
|
css: { p: "$2", c: "$on_surface_high", bg: "$surface_bright", borderRadius: "$round" }
|
3102
3025
|
},
|
3103
|
-
/* @__PURE__ */
|
3026
|
+
/* @__PURE__ */ React35.createElement(MicOffIcon3, { height: 19, width: 19 })
|
3104
3027
|
) : null,
|
3105
|
-
shouldShowMoreActions && !isInternalRole(role) && !isLocal ? /* @__PURE__ */
|
3028
|
+
shouldShowMoreActions && !isInternalRole(role) && !isLocal ? /* @__PURE__ */ React35.createElement(ParticipantMoreActions, { peerId, role }) : null
|
3106
3029
|
);
|
3107
3030
|
});
|
3108
3031
|
var ParticipantMoreActions = ({ peerId, role }) => {
|
3109
3032
|
var _a;
|
3110
3033
|
const hmsActions = useHMSActions11();
|
3111
|
-
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } =
|
3034
|
+
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = useHMSStore16(selectPermissions8);
|
3112
3035
|
const { elements } = useRoomLayoutConferencingScreen();
|
3113
3036
|
const {
|
3114
3037
|
bring_to_stage_label,
|
@@ -3118,10 +3041,10 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3118
3041
|
} = elements.on_stage_exp || {};
|
3119
3042
|
const isInStage = role === on_stage_role;
|
3120
3043
|
const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
|
3121
|
-
const prevRole = (_a =
|
3122
|
-
const localPeerId =
|
3044
|
+
const prevRole = (_a = useHMSStore16(selectPeerMetadata2(peerId))) == null ? void 0 : _a.prevRole;
|
3045
|
+
const localPeerId = useHMSStore16(selectLocalPeerID4);
|
3123
3046
|
const isLocal = localPeerId === peerId;
|
3124
|
-
const [open, setOpen] =
|
3047
|
+
const [open, setOpen] = useState18(false);
|
3125
3048
|
const handleStageAction = () => __async(void 0, null, function* () {
|
3126
3049
|
if (isInStage) {
|
3127
3050
|
prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);
|
@@ -3130,7 +3053,7 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3130
3053
|
}
|
3131
3054
|
setOpen(false);
|
3132
3055
|
});
|
3133
|
-
return /* @__PURE__ */
|
3056
|
+
return /* @__PURE__ */ React35.createElement(Dropdown.Root, { open, onOpenChange: (value) => setOpen(value), modal: false }, /* @__PURE__ */ React35.createElement(
|
3134
3057
|
Dropdown.Trigger,
|
3135
3058
|
{
|
3136
3059
|
asChild: true,
|
@@ -3150,8 +3073,8 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3150
3073
|
},
|
3151
3074
|
tabIndex: 0
|
3152
3075
|
},
|
3153
|
-
/* @__PURE__ */
|
3154
|
-
), /* @__PURE__ */
|
3076
|
+
/* @__PURE__ */ React35.createElement(Box, { css: { my: "auto" } }, /* @__PURE__ */ React35.createElement(VerticalMenuIcon4, null))
|
3077
|
+
), /* @__PURE__ */ React35.createElement(Dropdown.Portal, null, /* @__PURE__ */ React35.createElement(Dropdown.Content, { align: "end", sideOffset: 8, css: { w: "$64", bg: "$surface_default" } }, shouldShowStageRoleChange ? /* @__PURE__ */ React35.createElement(Dropdown.Item, { css: { bg: "$surface_default" }, onClick: () => handleStageAction() }, /* @__PURE__ */ React35.createElement(ChangeRoleIcon2, null), /* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { ml: "$4", fontWeight: "$semiBold", c: "$on_surface_high" } }, isInStage ? remove_from_stage_label : bring_to_stage_label)) : null, !isLocal && canRemoveOthers && /* @__PURE__ */ React35.createElement(
|
3155
3078
|
Dropdown.Item,
|
3156
3079
|
{
|
3157
3080
|
css: { color: "$alert_error_default", bg: "$surface_default" },
|
@@ -3163,12 +3086,12 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3163
3086
|
}
|
3164
3087
|
})
|
3165
3088
|
},
|
3166
|
-
/* @__PURE__ */
|
3167
|
-
/* @__PURE__ */
|
3089
|
+
/* @__PURE__ */ React35.createElement(PeopleRemoveIcon, null),
|
3090
|
+
/* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { ml: "$4", color: "inherit", fontWeight: "$semiBold" } }, "Remove Participant")
|
3168
3091
|
))));
|
3169
3092
|
};
|
3170
3093
|
var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
3171
|
-
const [value, setValue] =
|
3094
|
+
const [value, setValue] = React35.useState("");
|
3172
3095
|
const isMobile = useMedia4(config.media.md);
|
3173
3096
|
useDebounce(
|
3174
3097
|
() => {
|
@@ -3177,7 +3100,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3177
3100
|
300,
|
3178
3101
|
[value, onSearch]
|
3179
3102
|
);
|
3180
|
-
return /* @__PURE__ */
|
3103
|
+
return /* @__PURE__ */ React35.createElement(
|
3181
3104
|
Flex,
|
3182
3105
|
{
|
3183
3106
|
align: "center",
|
@@ -3189,8 +3112,8 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3189
3112
|
mt: inSidePane ? "$4" : ""
|
3190
3113
|
}
|
3191
3114
|
},
|
3192
|
-
/* @__PURE__ */
|
3193
|
-
/* @__PURE__ */
|
3115
|
+
/* @__PURE__ */ React35.createElement(SearchIcon, { style: { position: "absolute", left: isMobile ? "1.25rem" : "0.5rem" } }),
|
3116
|
+
/* @__PURE__ */ React35.createElement(
|
3194
3117
|
Input,
|
3195
3118
|
{
|
3196
3119
|
type: "text",
|
@@ -3211,7 +3134,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3211
3134
|
};
|
3212
3135
|
|
3213
3136
|
// src/Prebuilt/components/Footer/Footer.tsx
|
3214
|
-
var VirtualBackground =
|
3137
|
+
var VirtualBackground = React36.lazy(() => import("./VirtualBackground-37FXUPYO.js"));
|
3215
3138
|
var Footer2 = ({
|
3216
3139
|
screenType,
|
3217
3140
|
elements
|
@@ -3220,8 +3143,14 @@ var Footer2 = ({
|
|
3220
3143
|
const isMobile = useMedia5(config.media.md);
|
3221
3144
|
const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay);
|
3222
3145
|
const openByDefault = ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.initial_state) === Chat_ChatState.CHAT_STATE_OPEN;
|
3223
|
-
const
|
3224
|
-
|
3146
|
+
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
3147
|
+
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
3148
|
+
useEffect6(() => {
|
3149
|
+
if (!isChatOpen && openByDefault) {
|
3150
|
+
toggleChat();
|
3151
|
+
}
|
3152
|
+
}, [toggleChat, openByDefault]);
|
3153
|
+
return /* @__PURE__ */ React36.createElement(
|
3225
3154
|
Footer.Root,
|
3226
3155
|
{
|
3227
3156
|
css: {
|
@@ -3235,7 +3164,7 @@ var Footer2 = ({
|
|
3235
3164
|
}
|
3236
3165
|
}
|
3237
3166
|
},
|
3238
|
-
/* @__PURE__ */
|
3167
|
+
/* @__PURE__ */ React36.createElement(
|
3239
3168
|
Footer.Left,
|
3240
3169
|
{
|
3241
3170
|
css: {
|
@@ -3246,11 +3175,11 @@ var Footer2 = ({
|
|
3246
3175
|
}
|
3247
3176
|
}
|
3248
3177
|
},
|
3249
|
-
isMobile ? /* @__PURE__ */
|
3250
|
-
/* @__PURE__ */
|
3251
|
-
isMobile ? null : /* @__PURE__ */
|
3178
|
+
isMobile ? /* @__PURE__ */ React36.createElement(LeaveRoom, { screenType }) : null,
|
3179
|
+
/* @__PURE__ */ React36.createElement(AudioVideoToggle, null),
|
3180
|
+
isMobile ? null : /* @__PURE__ */ React36.createElement(Suspense, { fallback: /* @__PURE__ */ React36.createElement(React36.Fragment, null) }, /* @__PURE__ */ React36.createElement(VirtualBackground, null))
|
3252
3181
|
),
|
3253
|
-
/* @__PURE__ */
|
3182
|
+
/* @__PURE__ */ React36.createElement(
|
3254
3183
|
Footer.Center,
|
3255
3184
|
{
|
3256
3185
|
css: {
|
@@ -3260,18 +3189,18 @@ var Footer2 = ({
|
|
3260
3189
|
}
|
3261
3190
|
}
|
3262
3191
|
},
|
3263
|
-
isMobile ? /* @__PURE__ */
|
3192
|
+
isMobile ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, screenType === "hls_live_streaming" ? /* @__PURE__ */ React36.createElement(RaiseHand, null) : null, (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType })) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ScreenshareToggle, null), /* @__PURE__ */ React36.createElement(RaiseHand, null), (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React36.createElement(EmojiReaction, null), /* @__PURE__ */ React36.createElement(LeaveRoom, { screenType }))
|
3264
3193
|
),
|
3265
|
-
/* @__PURE__ */
|
3194
|
+
/* @__PURE__ */ React36.createElement(Footer.Right, null, !isMobile && (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React36.createElement(ParticipantCount, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType }))
|
3266
3195
|
);
|
3267
3196
|
};
|
3268
3197
|
|
3269
3198
|
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
3270
|
-
import
|
3271
|
-
import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions12, useHMSStore as
|
3199
|
+
import React37, { useCallback as useCallback7, useState as useState19 } from "react";
|
3200
|
+
import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions12, useHMSStore as useHMSStore17 } from "@100mslive/react-sdk";
|
3272
3201
|
function HLSFailureModal() {
|
3273
|
-
const { hlsError } =
|
3274
|
-
const [openModal, setOpenModal] =
|
3202
|
+
const { hlsError } = useHMSStore17(selectHLSState2).error || false;
|
3203
|
+
const [openModal, setOpenModal] = useState19(!!hlsError);
|
3275
3204
|
const hmsActions = useHMSActions12();
|
3276
3205
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
3277
3206
|
const startHLS = useCallback7(() => __async(this, null, function* () {
|
@@ -3289,7 +3218,7 @@ function HLSFailureModal() {
|
|
3289
3218
|
setHLSStarted(false);
|
3290
3219
|
}
|
3291
3220
|
}), [hmsActions, isHLSStarted, setHLSStarted]);
|
3292
|
-
return hlsError ? /* @__PURE__ */
|
3221
|
+
return hlsError ? /* @__PURE__ */ React37.createElement(
|
3293
3222
|
Dialog.Root,
|
3294
3223
|
{
|
3295
3224
|
open: openModal,
|
@@ -3299,7 +3228,7 @@ function HLSFailureModal() {
|
|
3299
3228
|
}
|
3300
3229
|
}
|
3301
3230
|
},
|
3302
|
-
/* @__PURE__ */
|
3231
|
+
/* @__PURE__ */ React37.createElement(Dialog.Portal, null, /* @__PURE__ */ React37.createElement(Dialog.Overlay, null), /* @__PURE__ */ React37.createElement(Dialog.Content, { css: { w: "min(360px, 90%)" } }, /* @__PURE__ */ React37.createElement(
|
3303
3232
|
Dialog.Title,
|
3304
3233
|
{
|
3305
3234
|
css: {
|
@@ -3310,34 +3239,34 @@ function HLSFailureModal() {
|
|
3310
3239
|
mt: "$4"
|
3311
3240
|
}
|
3312
3241
|
},
|
3313
|
-
/* @__PURE__ */
|
3314
|
-
), /* @__PURE__ */
|
3242
|
+
/* @__PURE__ */ React37.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, "Failed to Go Live")
|
3243
|
+
), /* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { mb: "$10", color: "$on_surface_medium" } }, "Something went wrong and your live broadcast failed. Please try again."), /* @__PURE__ */ React37.createElement(Flex, { align: "center", justify: "between", css: { w: "100%", gap: "$8" } }, /* @__PURE__ */ React37.createElement(Button, { outlined: true, variant: "standard", css: { w: "100%" }, onClick: () => setOpenModal(false) }, "Dismiss"), /* @__PURE__ */ React37.createElement(Button, { css: { w: "100%" }, onClick: startHLS }, "Go Live"))))
|
3315
3244
|
) : null;
|
3316
3245
|
}
|
3317
3246
|
|
3318
3247
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
3319
|
-
import React60, { Suspense as Suspense2, useEffect as
|
3320
|
-
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName2, useHMSActions as useHMSActions20, useHMSStore as
|
3248
|
+
import React60, { Suspense as Suspense2, useEffect as useEffect23 } from "react";
|
3249
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName2, useHMSActions as useHMSActions20, useHMSStore as useHMSStore34 } from "@100mslive/react-sdk";
|
3321
3250
|
|
3322
3251
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
3323
|
-
import
|
3324
|
-
import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as
|
3252
|
+
import React49, { useEffect as useEffect14, useMemo as useMemo6, useState as useState26 } from "react";
|
3253
|
+
import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as useHMSStore23, useHMSVanillaStore as useHMSVanillaStore4 } from "@100mslive/react-sdk";
|
3325
3254
|
|
3326
3255
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3327
|
-
import
|
3256
|
+
import React42, { useEffect as useEffect10, useMemo as useMemo3, useState as useState21 } from "react";
|
3328
3257
|
import { useMedia as useMedia8 } from "react-use";
|
3329
|
-
import { selectLocalPeer as selectLocalPeer3, useHMSStore as
|
3258
|
+
import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore19 } from "@100mslive/react-sdk";
|
3330
3259
|
|
3331
3260
|
// src/Prebuilt/components/InsetTile.tsx
|
3332
|
-
import
|
3261
|
+
import React39, { useEffect as useEffect7, useRef as useRef6 } from "react";
|
3333
3262
|
import Draggable from "react-draggable";
|
3334
3263
|
import { useMedia as useMedia6 } from "react-use";
|
3335
|
-
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer as selectLocalPeer2, selectVideoTrackByID, useHMSStore as
|
3264
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer as selectLocalPeer2, selectVideoTrackByID, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
3336
3265
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
3337
3266
|
|
3338
3267
|
// src/Prebuilt/components/hooks/useVideoTileLayout.ts
|
3339
|
-
import
|
3340
|
-
var VideoTileContext =
|
3268
|
+
import React38, { useContext } from "react";
|
3269
|
+
var VideoTileContext = React38.createContext({
|
3341
3270
|
enableSpotlightingPeer: true,
|
3342
3271
|
hideParticipantNameOnTile: false,
|
3343
3272
|
roundedVideoTile: true,
|
@@ -3353,14 +3282,14 @@ var useVideoTileContext = () => {
|
|
3353
3282
|
|
3354
3283
|
// src/Prebuilt/components/InsetTile.tsx
|
3355
3284
|
var MinimisedTile = ({ setMinimised }) => {
|
3356
|
-
return /* @__PURE__ */
|
3285
|
+
return /* @__PURE__ */ React39.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ React39.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ React39.createElement(Text, null, "You"), /* @__PURE__ */ React39.createElement(
|
3357
3286
|
IconButton_default,
|
3358
3287
|
{
|
3359
3288
|
className: "__cancel-drag-event",
|
3360
3289
|
onClick: () => setMinimised(false),
|
3361
3290
|
css: { bg: "transparent", border: "transparent" }
|
3362
3291
|
},
|
3363
|
-
/* @__PURE__ */
|
3292
|
+
/* @__PURE__ */ React39.createElement(ExpandIcon2, null)
|
3364
3293
|
));
|
3365
3294
|
};
|
3366
3295
|
var insetHeightPx = 180;
|
@@ -3370,10 +3299,10 @@ var desktopAspectRatio = 1 / defaultMobileAspectRatio;
|
|
3370
3299
|
var InsetTile = () => {
|
3371
3300
|
const isMobile = useMedia6(config.media.md);
|
3372
3301
|
const isLandscape = useMedia6(config.media.ls);
|
3373
|
-
const localPeer =
|
3302
|
+
const localPeer = useHMSStore18(selectLocalPeer2);
|
3374
3303
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
3375
|
-
const videoTrack =
|
3376
|
-
const isAllowedToPublish =
|
3304
|
+
const videoTrack = useHMSStore18(selectVideoTrackByID(localPeer == null ? void 0 : localPeer.videoTrack));
|
3305
|
+
const isAllowedToPublish = useHMSStore18(selectIsAllowedToPublish2);
|
3377
3306
|
const videoTileProps = useVideoTileContext();
|
3378
3307
|
let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;
|
3379
3308
|
if ((videoTrack == null ? void 0 : videoTrack.width) && (videoTrack == null ? void 0 : videoTrack.height) && !isMobile) {
|
@@ -3407,7 +3336,7 @@ var InsetTile = () => {
|
|
3407
3336
|
if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {
|
3408
3337
|
return null;
|
3409
3338
|
}
|
3410
|
-
return /* @__PURE__ */
|
3339
|
+
return /* @__PURE__ */ React39.createElement(Draggable, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ React39.createElement(
|
3411
3340
|
Box,
|
3412
3341
|
{
|
3413
3342
|
ref: nodeRef,
|
@@ -3423,9 +3352,9 @@ var InsetTile = () => {
|
|
3423
3352
|
h: height
|
3424
3353
|
} : {})
|
3425
3354
|
},
|
3426
|
-
minimised ? /* @__PURE__ */
|
3355
|
+
minimised ? /* @__PURE__ */ React39.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ React39.createElement(
|
3427
3356
|
VideoTile_default,
|
3428
|
-
__spreadValues({
|
3357
|
+
__spreadProps(__spreadValues({
|
3429
3358
|
peerId: localPeer == null ? void 0 : localPeer.id,
|
3430
3359
|
trackid: localPeer == null ? void 0 : localPeer.videoTrack,
|
3431
3360
|
rootCSS: {
|
@@ -3437,13 +3366,15 @@ var InsetTile = () => {
|
|
3437
3366
|
containerCSS: { background: "$surface_default" },
|
3438
3367
|
canMinimise: true,
|
3439
3368
|
isDragabble: true
|
3440
|
-
}, videoTileProps)
|
3369
|
+
}, videoTileProps), {
|
3370
|
+
hideParticipantNameOnTile: true
|
3371
|
+
})
|
3441
3372
|
)
|
3442
3373
|
));
|
3443
3374
|
};
|
3444
3375
|
|
3445
3376
|
// src/Prebuilt/components/Pagination.tsx
|
3446
|
-
import
|
3377
|
+
import React40, { useEffect as useEffect8 } from "react";
|
3447
3378
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@100mslive/react-icons";
|
3448
3379
|
var Pagination = ({
|
3449
3380
|
page,
|
@@ -3468,7 +3399,7 @@ var Pagination = ({
|
|
3468
3399
|
if (numPages <= 1) {
|
3469
3400
|
return null;
|
3470
3401
|
}
|
3471
|
-
return /* @__PURE__ */
|
3402
|
+
return /* @__PURE__ */ React40.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React40.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React40.createElement(ChevronLeftIcon2, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React40.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React40.createElement(
|
3472
3403
|
StyledPagination.Dot,
|
3473
3404
|
{
|
3474
3405
|
key: i,
|
@@ -3478,15 +3409,15 @@ var Pagination = ({
|
|
3478
3409
|
onPageChange(i);
|
3479
3410
|
}
|
3480
3411
|
}
|
3481
|
-
))) : null, /* @__PURE__ */
|
3412
|
+
))) : null, /* @__PURE__ */ React40.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React40.createElement(ChevronRightIcon2, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
|
3482
3413
|
};
|
3483
3414
|
|
3484
3415
|
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
3485
|
-
import
|
3486
|
-
var Grid =
|
3416
|
+
import React41 from "react";
|
3417
|
+
var Grid = React41.forwardRef(
|
3487
3418
|
({ tiles, edgeToEdge }, ref) => {
|
3488
3419
|
const videoTileProps = useVideoTileContext();
|
3489
|
-
return /* @__PURE__ */
|
3420
|
+
return /* @__PURE__ */ React41.createElement(
|
3490
3421
|
Box,
|
3491
3422
|
{
|
3492
3423
|
ref,
|
@@ -3504,7 +3435,7 @@ var Grid = React42.forwardRef(
|
|
3504
3435
|
},
|
3505
3436
|
tiles == null ? void 0 : tiles.map((tile) => {
|
3506
3437
|
var _a, _b, _c, _d;
|
3507
|
-
return /* @__PURE__ */
|
3438
|
+
return /* @__PURE__ */ React41.createElement(
|
3508
3439
|
VideoTile_default,
|
3509
3440
|
__spreadValues({
|
3510
3441
|
key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
|
@@ -3522,7 +3453,7 @@ var Grid = React42.forwardRef(
|
|
3522
3453
|
);
|
3523
3454
|
|
3524
3455
|
// src/Prebuilt/components/hooks/useTileLayout.tsx
|
3525
|
-
import { useEffect as useEffect9, useMemo as useMemo2, useState as
|
3456
|
+
import { useEffect as useEffect9, useMemo as useMemo2, useState as useState20 } from "react";
|
3526
3457
|
import { useMeasure as useMeasure2, useMedia as useMedia7 } from "react-use";
|
3527
3458
|
import {
|
3528
3459
|
getPeersWithTiles,
|
@@ -3560,7 +3491,7 @@ var useTileLayout = ({
|
|
3560
3491
|
const vanillaStore = useHMSVanillaStore3();
|
3561
3492
|
const [ref, { width, height }] = useMeasure2();
|
3562
3493
|
const isMobile = useMedia7(config.media.lg);
|
3563
|
-
const [pagesWithTiles, setPagesWithTiles] =
|
3494
|
+
const [pagesWithTiles, setPagesWithTiles] = useState20([]);
|
3564
3495
|
useEffect9(() => {
|
3565
3496
|
if (width === 0 || height === 0) {
|
3566
3497
|
return;
|
@@ -3628,7 +3559,7 @@ var useTileLayout = ({
|
|
3628
3559
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3629
3560
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
3630
3561
|
var _a;
|
3631
|
-
const localPeer =
|
3562
|
+
const localPeer = useHMSStore19(selectLocalPeer3);
|
3632
3563
|
const isMobile = useMedia8(config.media.md);
|
3633
3564
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
3634
3565
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
@@ -3649,14 +3580,14 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
3649
3580
|
maxTileCount,
|
3650
3581
|
edgeToEdge
|
3651
3582
|
});
|
3652
|
-
const [page, setPage] =
|
3583
|
+
const [page, setPage] = useState21(0);
|
3653
3584
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3654
3585
|
useEffect10(() => {
|
3655
3586
|
if (pageSize > 0) {
|
3656
3587
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3657
3588
|
}
|
3658
3589
|
}, [pageSize, onPageSize]);
|
3659
|
-
return /* @__PURE__ */
|
3590
|
+
return /* @__PURE__ */ React42.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ React42.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ React42.createElement(
|
3660
3591
|
Pagination,
|
3661
3592
|
{
|
3662
3593
|
page,
|
@@ -3666,20 +3597,20 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
3666
3597
|
},
|
3667
3598
|
numPages: pagesWithTiles.length
|
3668
3599
|
}
|
3669
|
-
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */
|
3600
|
+
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */ React42.createElement(InsetTile, null));
|
3670
3601
|
}
|
3671
3602
|
|
3672
3603
|
// src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
|
3673
|
-
import
|
3674
|
-
import { selectLocalPeer as selectLocalPeer4, useHMSStore as
|
3604
|
+
import React45, { useEffect as useEffect12, useState as useState23 } from "react";
|
3605
|
+
import { selectLocalPeer as selectLocalPeer4, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
|
3675
3606
|
|
3676
3607
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
3677
|
-
import
|
3608
|
+
import React44, { useEffect as useEffect11, useState as useState22 } from "react";
|
3678
3609
|
import { useMedia as useMedia9 } from "react-use";
|
3679
3610
|
|
3680
3611
|
// src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
|
3681
|
-
import
|
3682
|
-
var Root = ({ children, edgeToEdge }) => /* @__PURE__ */
|
3612
|
+
import React43 from "react";
|
3613
|
+
var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React43.createElement(
|
3683
3614
|
Flex,
|
3684
3615
|
{
|
3685
3616
|
direction: "column",
|
@@ -3688,7 +3619,7 @@ var Root = ({ children, edgeToEdge }) => /* @__PURE__ */ React44.createElement(
|
|
3688
3619
|
children
|
3689
3620
|
);
|
3690
3621
|
var ProminentSection = ({ children, css = {} }) => {
|
3691
|
-
return /* @__PURE__ */
|
3622
|
+
return /* @__PURE__ */ React43.createElement(Flex, { direction: "column", css: __spreadValues({ flex: "1 1 0", gap: "$2", minHeight: 0 }, css) }, children);
|
3692
3623
|
};
|
3693
3624
|
var SecondarySection = ({
|
3694
3625
|
tiles,
|
@@ -3699,12 +3630,12 @@ var SecondarySection = ({
|
|
3699
3630
|
if (!(tiles == null ? void 0 : tiles.length)) {
|
3700
3631
|
return null;
|
3701
3632
|
}
|
3702
|
-
return /* @__PURE__ */
|
3633
|
+
return /* @__PURE__ */ React43.createElement(
|
3703
3634
|
Box,
|
3704
3635
|
{
|
3705
3636
|
css: {
|
3706
3637
|
display: "grid",
|
3707
|
-
gridTemplateRows:
|
3638
|
+
gridTemplateRows: React43.Children.count(children) > 0 ? "136px auto" : "154px",
|
3708
3639
|
gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,
|
3709
3640
|
margin: "0 auto",
|
3710
3641
|
gap: "$2 $4",
|
@@ -3714,7 +3645,7 @@ var SecondarySection = ({
|
|
3714
3645
|
},
|
3715
3646
|
tiles.map((tile) => {
|
3716
3647
|
var _a, _b, _c, _d;
|
3717
|
-
return /* @__PURE__ */
|
3648
|
+
return /* @__PURE__ */ React43.createElement(
|
3718
3649
|
VideoTile_default,
|
3719
3650
|
__spreadValues({
|
3720
3651
|
key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
|
@@ -3731,7 +3662,7 @@ var SecondarySection = ({
|
|
3731
3662
|
}, tileLayoutProps)
|
3732
3663
|
);
|
3733
3664
|
}),
|
3734
|
-
/* @__PURE__ */
|
3665
|
+
/* @__PURE__ */ React43.createElement(Box, { css: { gridColumn: `1/span ${tiles.length}` } }, children)
|
3735
3666
|
);
|
3736
3667
|
};
|
3737
3668
|
var ProminenceLayout = {
|
@@ -3746,14 +3677,14 @@ var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
3746
3677
|
const isMobile = useMedia9(config.media.md);
|
3747
3678
|
const maxTileCount = isMobile ? 2 : 4;
|
3748
3679
|
const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });
|
3749
|
-
const [page, setPage] =
|
3680
|
+
const [page, setPage] = useState22(0);
|
3750
3681
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3751
3682
|
useEffect11(() => {
|
3752
3683
|
if (pageSize > 0) {
|
3753
3684
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3754
3685
|
}
|
3755
3686
|
}, [pageSize, onPageSize]);
|
3756
|
-
return /* @__PURE__ */
|
3687
|
+
return /* @__PURE__ */ React44.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge }, !edgeToEdge && /* @__PURE__ */ React44.createElement(
|
3757
3688
|
Pagination,
|
3758
3689
|
{
|
3759
3690
|
page,
|
@@ -3811,7 +3742,7 @@ function RoleProminence({
|
|
3811
3742
|
}) {
|
3812
3743
|
var _a;
|
3813
3744
|
const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);
|
3814
|
-
const localPeer =
|
3745
|
+
const localPeer = useHMSStore20(selectLocalPeer4);
|
3815
3746
|
const maxTileCount = 4;
|
3816
3747
|
const pageList = usePagesWithTiles({
|
3817
3748
|
peers: prominentPeers,
|
@@ -3821,14 +3752,14 @@ function RoleProminence({
|
|
3821
3752
|
pageList,
|
3822
3753
|
maxTileCount
|
3823
3754
|
});
|
3824
|
-
const [page, setPage] =
|
3755
|
+
const [page, setPage] = useState23(0);
|
3825
3756
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
3826
3757
|
useEffect12(() => {
|
3827
3758
|
if (pageSize > 0) {
|
3828
3759
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
3829
3760
|
}
|
3830
3761
|
}, [pageSize, onPageSize]);
|
3831
|
-
return /* @__PURE__ */
|
3762
|
+
return /* @__PURE__ */ React45.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React45.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React45.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ React45.createElement(
|
3832
3763
|
Pagination,
|
3833
3764
|
{
|
3834
3765
|
page,
|
@@ -3838,16 +3769,16 @@ function RoleProminence({
|
|
3838
3769
|
},
|
3839
3770
|
numPages: pagesWithTiles.length
|
3840
3771
|
}
|
3841
|
-
), /* @__PURE__ */
|
3772
|
+
), /* @__PURE__ */ React45.createElement(SecondaryTiles, { peers: secondaryPeers, isInsetEnabled, edgeToEdge }), isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && /* @__PURE__ */ React45.createElement(InsetTile, null));
|
3842
3773
|
}
|
3843
3774
|
|
3844
3775
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
3845
|
-
import
|
3776
|
+
import React48, { useEffect as useEffect13, useMemo as useMemo5, useState as useState25 } from "react";
|
3846
3777
|
import { useMedia as useMedia10 } from "react-use";
|
3847
|
-
import { selectPeersScreenSharing, useHMSStore as
|
3778
|
+
import { selectPeersScreenSharing, useHMSStore as useHMSStore22 } from "@100mslive/react-sdk";
|
3848
3779
|
|
3849
3780
|
// src/Prebuilt/components/ScreenshareTile.jsx
|
3850
|
-
import
|
3781
|
+
import React47, { useRef as useRef7, useState as useState24 } from "react";
|
3851
3782
|
import { useFullscreen as useFullscreen2 } from "react-use";
|
3852
3783
|
import screenfull2 from "screenfull";
|
3853
3784
|
import {
|
@@ -3855,17 +3786,17 @@ import {
|
|
3855
3786
|
selectPeerByID as selectPeerByID2,
|
3856
3787
|
selectScreenShareAudioByPeerID,
|
3857
3788
|
selectScreenShareByPeerID,
|
3858
|
-
useHMSStore as
|
3789
|
+
useHMSStore as useHMSStore21
|
3859
3790
|
} from "@100mslive/react-sdk";
|
3860
3791
|
import { ExpandIcon as ExpandIcon3, ShrinkIcon } from "@100mslive/react-icons";
|
3861
3792
|
|
3862
3793
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
3863
|
-
import
|
3794
|
+
import React46 from "react";
|
3864
3795
|
import { useHMSActions as useHMSActions13 } from "@100mslive/react-sdk";
|
3865
|
-
import { CrossIcon as
|
3796
|
+
import { CrossIcon as CrossIcon5, ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
|
3866
3797
|
var ScreenshareDisplay = () => {
|
3867
3798
|
const hmsActions = useHMSActions13();
|
3868
|
-
return /* @__PURE__ */
|
3799
|
+
return /* @__PURE__ */ React46.createElement(
|
3869
3800
|
Flex,
|
3870
3801
|
{
|
3871
3802
|
direction: "column",
|
@@ -3877,9 +3808,9 @@ var ScreenshareDisplay = () => {
|
|
3877
3808
|
color: "$on_surface_high"
|
3878
3809
|
}
|
3879
3810
|
},
|
3880
|
-
/* @__PURE__ */
|
3881
|
-
/* @__PURE__ */
|
3882
|
-
/* @__PURE__ */
|
3811
|
+
/* @__PURE__ */ React46.createElement(ShareScreenIcon2, { width: 48, height: 48 }),
|
3812
|
+
/* @__PURE__ */ React46.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
|
3813
|
+
/* @__PURE__ */ React46.createElement(
|
3883
3814
|
Button,
|
3884
3815
|
{
|
3885
3816
|
variant: "danger",
|
@@ -3889,7 +3820,7 @@ var ScreenshareDisplay = () => {
|
|
3889
3820
|
}),
|
3890
3821
|
"data-testid": "stop_screen_share_btn"
|
3891
3822
|
},
|
3892
|
-
/* @__PURE__ */
|
3823
|
+
/* @__PURE__ */ React46.createElement(CrossIcon5, { width: 18, height: 18 }),
|
3893
3824
|
"\xA0 Stop screen share"
|
3894
3825
|
)
|
3895
3826
|
);
|
@@ -3905,11 +3836,11 @@ var labelStyles = {
|
|
3905
3836
|
flexShrink: 0
|
3906
3837
|
};
|
3907
3838
|
var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
3908
|
-
const isLocal =
|
3909
|
-
const track =
|
3910
|
-
const peer =
|
3839
|
+
const isLocal = useHMSStore21(selectLocalPeerID5) === peerId;
|
3840
|
+
const track = useHMSStore21(selectScreenShareByPeerID(peerId));
|
3841
|
+
const peer = useHMSStore21(selectPeerByID2(peerId));
|
3911
3842
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
3912
|
-
const [isMouseHovered, setIsMouseHovered] =
|
3843
|
+
const [isMouseHovered, setIsMouseHovered] = useState24(false);
|
3913
3844
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
3914
3845
|
const label = getVideoTileLabel({
|
3915
3846
|
peerName: peer.name,
|
@@ -3917,19 +3848,19 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3917
3848
|
track
|
3918
3849
|
});
|
3919
3850
|
const fullscreenRef = useRef7(null);
|
3920
|
-
const [fullscreen, setFullscreen] =
|
3851
|
+
const [fullscreen, setFullscreen] = useState24(false);
|
3921
3852
|
const isFullscreen = useFullscreen2(fullscreenRef, fullscreen, {
|
3922
3853
|
onClose: () => setFullscreen(false)
|
3923
3854
|
});
|
3924
3855
|
const isFullScreenSupported = screenfull2.isEnabled;
|
3925
|
-
const audioTrack =
|
3856
|
+
const audioTrack = useHMSStore21(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
|
3926
3857
|
if (isLocal && !["browser", "window", "application"].includes(track == null ? void 0 : track.displaySurface)) {
|
3927
|
-
return /* @__PURE__ */
|
3858
|
+
return /* @__PURE__ */ React47.createElement(ScreenshareDisplay, null);
|
3928
3859
|
}
|
3929
3860
|
if (!peer) {
|
3930
3861
|
return null;
|
3931
3862
|
}
|
3932
|
-
return /* @__PURE__ */
|
3863
|
+
return /* @__PURE__ */ React47.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ React47.createElement(
|
3933
3864
|
StyledVideoTile.Container,
|
3934
3865
|
{
|
3935
3866
|
transparentBg: true,
|
@@ -3940,9 +3871,9 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3940
3871
|
setIsMouseHovered(false);
|
3941
3872
|
}
|
3942
3873
|
},
|
3943
|
-
showStatsOnTiles ? /* @__PURE__ */
|
3944
|
-
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */
|
3945
|
-
track ? /* @__PURE__ */
|
3874
|
+
showStatsOnTiles ? /* @__PURE__ */ React47.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
|
3875
|
+
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ React47.createElement(StyledVideoTile.FullScreenButton, { onClick: () => setFullscreen(!fullscreen) }, isFullscreen ? /* @__PURE__ */ React47.createElement(ShrinkIcon, null) : /* @__PURE__ */ React47.createElement(ExpandIcon3, null)) : null,
|
3876
|
+
track ? /* @__PURE__ */ React47.createElement(
|
3946
3877
|
Video,
|
3947
3878
|
{
|
3948
3879
|
screenShare: true,
|
@@ -3952,19 +3883,19 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
|
3952
3883
|
css: { minHeight: 0 }
|
3953
3884
|
}
|
3954
3885
|
) : null,
|
3955
|
-
/* @__PURE__ */
|
3956
|
-
isMouseHovered && !(peer == null ? void 0 : peer.isLocal) ? /* @__PURE__ */
|
3886
|
+
/* @__PURE__ */ React47.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
|
3887
|
+
isMouseHovered && !(peer == null ? void 0 : peer.isLocal) ? /* @__PURE__ */ React47.createElement(TileMenu_default, { isScreenshare: true, peerID: peer == null ? void 0 : peer.id, audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id }) : null
|
3957
3888
|
));
|
3958
3889
|
};
|
3959
|
-
var ScreenshareTile =
|
3890
|
+
var ScreenshareTile = React47.memo(Tile);
|
3960
3891
|
var ScreenshareTile_default = ScreenshareTile;
|
3961
3892
|
|
3962
3893
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
3963
3894
|
var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
3964
3895
|
var _a;
|
3965
|
-
const peersSharing =
|
3896
|
+
const peersSharing = useHMSStore22(selectPeersScreenSharing);
|
3966
3897
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
3967
|
-
const [page, setPage] =
|
3898
|
+
const [page, setPage] = useState25(0);
|
3968
3899
|
const activeSharePeer = peersSharing[page];
|
3969
3900
|
const isMobile = useMedia10(config.media.md);
|
3970
3901
|
const secondaryPeers = useMemo5(
|
@@ -3977,7 +3908,7 @@ var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
3977
3908
|
setActiveScreenSharePeer("");
|
3978
3909
|
};
|
3979
3910
|
}, [activeSharePeer == null ? void 0 : activeSharePeer.id, isMobile, setActiveScreenSharePeer]);
|
3980
|
-
return /* @__PURE__ */
|
3911
|
+
return /* @__PURE__ */ React48.createElement(ProminenceLayout.Root, { edgeToEdge }, /* @__PURE__ */ React48.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React48.createElement(ScreenshareTile_default, { peerId: (_a = peersSharing[page]) == null ? void 0 : _a.id }), !edgeToEdge && /* @__PURE__ */ React48.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ React48.createElement(
|
3981
3912
|
SecondaryTiles,
|
3982
3913
|
{
|
3983
3914
|
peers: secondaryPeers,
|
@@ -4082,9 +4013,9 @@ var GridLayout = ({
|
|
4082
4013
|
edge_to_edge = false,
|
4083
4014
|
hide_metadata_on_tile = false
|
4084
4015
|
}) => {
|
4085
|
-
const peerSharing =
|
4016
|
+
const peerSharing = useHMSStore23(selectPeerScreenSharing);
|
4086
4017
|
const pinnedTrack = usePinnedTrack();
|
4087
|
-
const peers =
|
4018
|
+
const peers = useHMSStore23(selectPeers2);
|
4088
4019
|
const isRoleProminence = prominentRoles.length && peers.some(
|
4089
4020
|
(peer) => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack)
|
4090
4021
|
) || pinnedTrack;
|
@@ -4095,10 +4026,10 @@ var GridLayout = ({
|
|
4095
4026
|
return peers;
|
4096
4027
|
}, [isInsetEnabled, isRoleProminence, peerSharing, peers]);
|
4097
4028
|
const vanillaStore = useHMSVanillaStore4();
|
4098
|
-
const [sortedPeers, setSortedPeers] =
|
4029
|
+
const [sortedPeers, setSortedPeers] = useState26(updatedPeers);
|
4099
4030
|
const peersSorter = useMemo6(() => new PeersSorter_default(vanillaStore), [vanillaStore]);
|
4100
|
-
const [pageSize, setPageSize] =
|
4101
|
-
const [mainPage, setMainPage] =
|
4031
|
+
const [pageSize, setPageSize] = useState26(0);
|
4032
|
+
const [mainPage, setMainPage] = useState26(0);
|
4102
4033
|
const tileLayout = {
|
4103
4034
|
enableSpotlightingPeer: enable_spotlighting_peer,
|
4104
4035
|
hideParticipantNameOnTile: hide_participant_name_on_tile,
|
@@ -4118,7 +4049,7 @@ var GridLayout = ({
|
|
4118
4049
|
peersSorter.onUpdate(setSortedPeers);
|
4119
4050
|
}, [mainPage, peersSorter, updatedPeers, pageSize]);
|
4120
4051
|
if (peerSharing) {
|
4121
|
-
return /* @__PURE__ */
|
4052
|
+
return /* @__PURE__ */ React49.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React49.createElement(
|
4122
4053
|
ScreenshareLayout,
|
4123
4054
|
{
|
4124
4055
|
peers: sortedPeers,
|
@@ -4128,7 +4059,7 @@ var GridLayout = ({
|
|
4128
4059
|
}
|
4129
4060
|
));
|
4130
4061
|
} else if (isRoleProminence) {
|
4131
|
-
return /* @__PURE__ */
|
4062
|
+
return /* @__PURE__ */ React49.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React49.createElement(
|
4132
4063
|
RoleProminence,
|
4133
4064
|
{
|
4134
4065
|
peers: sortedPeers,
|
@@ -4140,7 +4071,7 @@ var GridLayout = ({
|
|
4140
4071
|
}
|
4141
4072
|
));
|
4142
4073
|
}
|
4143
|
-
return /* @__PURE__ */
|
4074
|
+
return /* @__PURE__ */ React49.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React49.createElement(
|
4144
4075
|
EqualProminence,
|
4145
4076
|
{
|
4146
4077
|
peers: sortedPeers,
|
@@ -4153,20 +4084,20 @@ var GridLayout = ({
|
|
4153
4084
|
};
|
4154
4085
|
|
4155
4086
|
// src/Prebuilt/layouts/EmbedView.jsx
|
4156
|
-
import
|
4087
|
+
import React50, { useCallback as useCallback8, useEffect as useEffect15, useMemo as useMemo7, useRef as useRef8, useState as useState27 } from "react";
|
4157
4088
|
import {
|
4158
4089
|
selectPeers as selectPeers3,
|
4159
4090
|
selectPeerScreenSharing as selectPeerScreenSharing2,
|
4160
4091
|
throwErrorHandler,
|
4161
|
-
useHMSStore as
|
4092
|
+
useHMSStore as useHMSStore24,
|
4162
4093
|
useScreenShare as useScreenShare3
|
4163
4094
|
} from "@100mslive/react-sdk";
|
4164
4095
|
var EmbedView = () => {
|
4165
|
-
return /* @__PURE__ */
|
4096
|
+
return /* @__PURE__ */ React50.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React50.createElement(EmbedComponent, null));
|
4166
4097
|
};
|
4167
4098
|
var EmbebScreenShareView = ({ children }) => {
|
4168
|
-
const peers =
|
4169
|
-
const peerPresenting =
|
4099
|
+
const peers = useHMSStore24(selectPeers3);
|
4100
|
+
const peerPresenting = useHMSStore24(selectPeerScreenSharing2);
|
4170
4101
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
4171
4102
|
const smallTilePeers = useMemo7(() => {
|
4172
4103
|
const smallTilePeers2 = peers.filter((peer) => peer.id !== (peerPresenting == null ? void 0 : peerPresenting.id));
|
@@ -4178,12 +4109,12 @@ var EmbebScreenShareView = ({ children }) => {
|
|
4178
4109
|
setActiveScreenSharePeer("");
|
4179
4110
|
};
|
4180
4111
|
}, [peerPresenting == null ? void 0 : peerPresenting.id, setActiveScreenSharePeer]);
|
4181
|
-
return /* @__PURE__ */
|
4112
|
+
return /* @__PURE__ */ React50.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React50.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ React50.createElement(SecondaryTiles, { peers: smallTilePeers }));
|
4182
4113
|
};
|
4183
4114
|
var EmbedComponent = () => {
|
4184
4115
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare3(throwErrorHandler);
|
4185
4116
|
const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
|
4186
|
-
const [wasScreenShared, setWasScreenShared] =
|
4117
|
+
const [wasScreenShared, setWasScreenShared] = useState27(false);
|
4187
4118
|
const screenShareAttemptInProgress = useRef8(false);
|
4188
4119
|
const src = embedConfig.url;
|
4189
4120
|
const iframeRef = useRef8();
|
@@ -4216,7 +4147,7 @@ var EmbedComponent = () => {
|
|
4216
4147
|
}
|
4217
4148
|
};
|
4218
4149
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
4219
|
-
return /* @__PURE__ */
|
4150
|
+
return /* @__PURE__ */ React50.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React50.createElement(
|
4220
4151
|
"iframe",
|
4221
4152
|
{
|
4222
4153
|
src,
|
@@ -4229,22 +4160,22 @@ var EmbedComponent = () => {
|
|
4229
4160
|
};
|
4230
4161
|
|
4231
4162
|
// src/Prebuilt/layouts/PDFView.jsx
|
4232
|
-
import
|
4163
|
+
import React51, { useCallback as useCallback9, useEffect as useEffect16, useRef as useRef9, useState as useState28 } from "react";
|
4233
4164
|
import { throwErrorHandler as throwErrorHandler2, useScreenShare as useScreenShare4 } from "@100mslive/react-sdk";
|
4234
4165
|
var PDFView = () => {
|
4235
|
-
return /* @__PURE__ */
|
4166
|
+
return /* @__PURE__ */ React51.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React51.createElement(PDFEmbedComponent, null));
|
4236
4167
|
};
|
4237
4168
|
var PDFEmbedComponent = () => {
|
4238
4169
|
const ref = useRef9();
|
4239
4170
|
const themeType = useTheme().themeType;
|
4240
|
-
const [isPDFLoaded, setIsPDFLoaded] =
|
4171
|
+
const [isPDFLoaded, setIsPDFLoaded] = useState28(false);
|
4241
4172
|
let pdfJSURL = define_process_env_default.REACT_APP_PDFJS_IFRAME_URL;
|
4242
4173
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare4(throwErrorHandler2);
|
4243
4174
|
const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
|
4244
4175
|
if (pdfConfig.url && !pdfConfig.file) {
|
4245
4176
|
pdfJSURL = pdfJSURL + "?file=" + encodeURIComponent(pdfConfig.url);
|
4246
4177
|
}
|
4247
|
-
const [wasScreenShared, setWasScreenShared] =
|
4178
|
+
const [wasScreenShared, setWasScreenShared] = useState28(false);
|
4248
4179
|
const screenShareAttemptInProgress = useRef9(false);
|
4249
4180
|
const iframeRef = useRef9();
|
4250
4181
|
const resetEmbedConfig = useCallback9(() => {
|
@@ -4285,7 +4216,7 @@ var PDFEmbedComponent = () => {
|
|
4285
4216
|
}
|
4286
4217
|
};
|
4287
4218
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
4288
|
-
return /* @__PURE__ */
|
4219
|
+
return /* @__PURE__ */ React51.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ React51.createElement(
|
4289
4220
|
"iframe",
|
4290
4221
|
{
|
4291
4222
|
src: pdfJSURL,
|
@@ -4320,10 +4251,15 @@ var PDFEmbedComponent = () => {
|
|
4320
4251
|
// src/Prebuilt/layouts/SidePane.tsx
|
4321
4252
|
import React58 from "react";
|
4322
4253
|
import { useMedia as useMedia14 } from "react-use";
|
4323
|
-
import { selectAppData as selectAppData3, selectVideoTrackByPeerID, useHMSStore as
|
4254
|
+
import { selectAppData as selectAppData3, selectVideoTrackByPeerID, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
|
4255
|
+
|
4256
|
+
// src/Prebuilt/components/SidePaneTabs.tsx
|
4257
|
+
import React55, { useEffect as useEffect21, useState as useState32 } from "react";
|
4258
|
+
import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore30 } from "@100mslive/react-sdk";
|
4259
|
+
import { CrossIcon as CrossIcon7 } from "@100mslive/react-icons";
|
4324
4260
|
|
4325
4261
|
// src/Prebuilt/components/Chat/Chat.jsx
|
4326
|
-
import
|
4262
|
+
import React54, { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef13, useState as useState31 } from "react";
|
4327
4263
|
import { useMedia as useMedia13 } from "react-use";
|
4328
4264
|
import {
|
4329
4265
|
HMSNotificationTypes,
|
@@ -4333,12 +4269,12 @@ import {
|
|
4333
4269
|
selectSessionStore,
|
4334
4270
|
useHMSActions as useHMSActions18,
|
4335
4271
|
useHMSNotifications,
|
4336
|
-
useHMSStore as
|
4272
|
+
useHMSStore as useHMSStore29
|
4337
4273
|
} from "@100mslive/react-sdk";
|
4338
|
-
import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as
|
4274
|
+
import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as CrossIcon6, PinIcon as PinIcon2 } from "@100mslive/react-icons";
|
4339
4275
|
|
4340
4276
|
// src/Prebuilt/components/Chat/ChatBody.jsx
|
4341
|
-
import
|
4277
|
+
import React52, { Fragment as Fragment8, useCallback as useCallback11, useEffect as useEffect17, useLayoutEffect, useMemo as useMemo8, useRef as useRef10, useState as useState29 } from "react";
|
4342
4278
|
import { useInView } from "react-intersection-observer";
|
4343
4279
|
import { useMedia as useMedia11 } from "react-use";
|
4344
4280
|
import AutoSizer from "react-virtualized-auto-sizer";
|
@@ -4352,7 +4288,7 @@ import {
|
|
4352
4288
|
selectPeerNameByID as selectPeerNameByID2,
|
4353
4289
|
selectPermissions as selectPermissions9,
|
4354
4290
|
useHMSActions as useHMSActions15,
|
4355
|
-
useHMSStore as
|
4291
|
+
useHMSStore as useHMSStore26
|
4356
4292
|
} from "@100mslive/react-sdk";
|
4357
4293
|
import { PinIcon, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
|
4358
4294
|
|
@@ -4365,13 +4301,13 @@ import {
|
|
4365
4301
|
selectPeerNameByID,
|
4366
4302
|
selectSessionMetadata,
|
4367
4303
|
useHMSActions as useHMSActions14,
|
4368
|
-
useHMSStore as
|
4304
|
+
useHMSStore as useHMSStore25,
|
4369
4305
|
useHMSVanillaStore as useHMSVanillaStore5
|
4370
4306
|
} from "@100mslive/react-sdk";
|
4371
4307
|
var useSetPinnedMessage = () => {
|
4372
4308
|
const hmsActions = useHMSActions14();
|
4373
4309
|
const vanillaStore = useHMSVanillaStore5();
|
4374
|
-
const pinnedMessage =
|
4310
|
+
const pinnedMessage = useHMSStore25(selectSessionMetadata);
|
4375
4311
|
const setPinnedMessage = useCallback10(
|
4376
4312
|
/**
|
4377
4313
|
* @param {import("@100mslive/react-sdk").HMSMessage | undefined} message
|
@@ -4405,7 +4341,7 @@ var formatTime = (date) => {
|
|
4405
4341
|
return `${hours}:${mins} ${suffix}`;
|
4406
4342
|
};
|
4407
4343
|
var MessageTypeContainer = ({ left, right }) => {
|
4408
|
-
return /* @__PURE__ */
|
4344
|
+
return /* @__PURE__ */ React52.createElement(
|
4409
4345
|
Flex,
|
4410
4346
|
{
|
4411
4347
|
align: "center",
|
@@ -4417,16 +4353,16 @@ var MessageTypeContainer = ({ left, right }) => {
|
|
4417
4353
|
r: "$0"
|
4418
4354
|
}
|
4419
4355
|
},
|
4420
|
-
left && /* @__PURE__ */
|
4421
|
-
left && right && /* @__PURE__ */
|
4422
|
-
right && /* @__PURE__ */
|
4356
|
+
left && /* @__PURE__ */ React52.createElement(SenderName, { variant: "tiny", as: "span", css: { color: "$on_surface_medium" } }, left),
|
4357
|
+
left && right && /* @__PURE__ */ React52.createElement(Box, { css: { borderLeft: "1px solid $border_bright", mx: "$4", h: "$8" } }),
|
4358
|
+
right && /* @__PURE__ */ React52.createElement(SenderName, { as: "span", variant: "tiny", css: { textTransform: "uppercase" } }, right)
|
4423
4359
|
);
|
4424
4360
|
};
|
4425
4361
|
var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
4426
|
-
const peerName =
|
4427
|
-
const localPeerRoleName =
|
4362
|
+
const peerName = useHMSStore26(selectPeerNameByID2(receiver));
|
4363
|
+
const localPeerRoleName = useHMSStore26(selectLocalPeerRoleName);
|
4428
4364
|
if (receiver) {
|
4429
|
-
return /* @__PURE__ */
|
4365
|
+
return /* @__PURE__ */ React52.createElement(
|
4430
4366
|
MessageTypeContainer,
|
4431
4367
|
{
|
4432
4368
|
left: hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ""}` : "TO YOU",
|
@@ -4435,7 +4371,7 @@ var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
|
4435
4371
|
);
|
4436
4372
|
}
|
4437
4373
|
if (roles && roles.length) {
|
4438
|
-
return /* @__PURE__ */
|
4374
|
+
return /* @__PURE__ */ React52.createElement(MessageTypeContainer, { left: "TO", right: hasCurrentUserSent ? roles.join(",") : localPeerRoleName });
|
4439
4375
|
}
|
4440
4376
|
return null;
|
4441
4377
|
};
|
@@ -4449,10 +4385,10 @@ var Link = styled("a", {
|
|
4449
4385
|
});
|
4450
4386
|
var AnnotisedMessage = ({ message }) => {
|
4451
4387
|
if (!message) {
|
4452
|
-
return /* @__PURE__ */
|
4388
|
+
return /* @__PURE__ */ React52.createElement(Fragment8, null);
|
4453
4389
|
}
|
4454
|
-
return /* @__PURE__ */
|
4455
|
-
(part) => URL_REGEX.test(part) ? /* @__PURE__ */
|
4390
|
+
return /* @__PURE__ */ React52.createElement(Fragment8, null, message.trim().split(/(\s)/).map(
|
4391
|
+
(part) => URL_REGEX.test(part) ? /* @__PURE__ */ React52.createElement(Link, { href: part, key: part, target: "_blank", rel: "noopener noreferrer" }, part) : part
|
4456
4392
|
));
|
4457
4393
|
};
|
4458
4394
|
var getMessageType = ({ roles, receiver }) => {
|
@@ -4462,18 +4398,18 @@ var getMessageType = ({ roles, receiver }) => {
|
|
4462
4398
|
return receiver ? "private" : "";
|
4463
4399
|
};
|
4464
4400
|
var ChatActions = ({ onPin, showPinAction }) => {
|
4465
|
-
const [open, setOpen] =
|
4401
|
+
const [open, setOpen] = useState29(false);
|
4466
4402
|
if (!showPinAction) {
|
4467
4403
|
return null;
|
4468
4404
|
}
|
4469
|
-
return /* @__PURE__ */
|
4405
|
+
return /* @__PURE__ */ React52.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React52.createElement(Dropdown.Trigger, { className: "chat_actions", css: { opacity: open ? 1 : 0, "@md": { opacity: 1 } }, asChild: true }, /* @__PURE__ */ React52.createElement(IconButton, null, /* @__PURE__ */ React52.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React52.createElement(VerticalMenuIcon5, null)))), /* @__PURE__ */ React52.createElement(Dropdown.Portal, null, /* @__PURE__ */ React52.createElement(
|
4470
4406
|
Dropdown.Content,
|
4471
4407
|
{
|
4472
4408
|
sideOffset: 5,
|
4473
4409
|
align: "end",
|
4474
4410
|
css: { width: "$48", backgroundColor: "$surface_bright", py: "$0", border: "1px solid $border_bright" }
|
4475
4411
|
},
|
4476
|
-
/* @__PURE__ */
|
4412
|
+
/* @__PURE__ */ React52.createElement(Dropdown.Item, { "data-testid": "pin_message_btn", onClick: onPin }, /* @__PURE__ */ React52.createElement(PinIcon, null), /* @__PURE__ */ React52.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Pin Message"))
|
4477
4413
|
)));
|
4478
4414
|
};
|
4479
4415
|
var SenderName = styled(Text, {
|
@@ -4485,7 +4421,7 @@ var SenderName = styled(Text, {
|
|
4485
4421
|
color: "$on_surface_high",
|
4486
4422
|
fontWeight: "$semiBold"
|
4487
4423
|
});
|
4488
|
-
var ChatMessage =
|
4424
|
+
var ChatMessage = React52.memo(({ index, style = {}, message, setRowHeight, onPin }) => {
|
4489
4425
|
var _a, _b;
|
4490
4426
|
const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });
|
4491
4427
|
const rowRef = useRef10(null);
|
@@ -4498,8 +4434,8 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4498
4434
|
const { elements } = useRoomLayoutConferencingScreen();
|
4499
4435
|
const isOverlay = ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
4500
4436
|
const hmsActions = useHMSActions15();
|
4501
|
-
const localPeerId =
|
4502
|
-
const permissions =
|
4437
|
+
const localPeerId = useHMSStore26(selectLocalPeerID6);
|
4438
|
+
const permissions = useHMSStore26(selectPermissions9);
|
4503
4439
|
const messageType = getMessageType({
|
4504
4440
|
roles: message.recipientRoles,
|
4505
4441
|
receiver: message.recipientPeer
|
@@ -4510,7 +4446,7 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4510
4446
|
hmsActions.setMessageRead(true, message.id);
|
4511
4447
|
}
|
4512
4448
|
}, [message.read, hmsActions, inView, message.id]);
|
4513
|
-
return /* @__PURE__ */
|
4449
|
+
return /* @__PURE__ */ React52.createElement(
|
4514
4450
|
Box,
|
4515
4451
|
{
|
4516
4452
|
ref,
|
@@ -4518,7 +4454,7 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4518
4454
|
css: { mb: "$10", pr: "$10", mt: "$8", "&:hover .chat_actions": { opacity: 1 } },
|
4519
4455
|
style
|
4520
4456
|
},
|
4521
|
-
/* @__PURE__ */
|
4457
|
+
/* @__PURE__ */ React52.createElement(
|
4522
4458
|
Flex,
|
4523
4459
|
{
|
4524
4460
|
ref: rowRef,
|
@@ -4535,7 +4471,7 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4535
4471
|
key: message.time,
|
4536
4472
|
"data-testid": "chat_msg"
|
4537
4473
|
},
|
4538
|
-
/* @__PURE__ */
|
4474
|
+
/* @__PURE__ */ React52.createElement(
|
4539
4475
|
Text,
|
4540
4476
|
{
|
4541
4477
|
css: {
|
@@ -4548,7 +4484,7 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4548
4484
|
},
|
4549
4485
|
as: "div"
|
4550
4486
|
},
|
4551
|
-
/* @__PURE__ */
|
4487
|
+
/* @__PURE__ */ React52.createElement(Flex, { align: "baseline" }, message.senderName === "You" || !message.senderName ? /* @__PURE__ */ React52.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName || "Anonymous") : /* @__PURE__ */ React52.createElement(Tooltip, { title: message.senderName, side: "top", align: "start" }, /* @__PURE__ */ React52.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName)), !isOverlay ? /* @__PURE__ */ React52.createElement(
|
4552
4488
|
Text,
|
4553
4489
|
{
|
4554
4490
|
as: "span",
|
@@ -4561,7 +4497,7 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4561
4497
|
},
|
4562
4498
|
formatTime(message.time)
|
4563
4499
|
) : null),
|
4564
|
-
/* @__PURE__ */
|
4500
|
+
/* @__PURE__ */ React52.createElement(
|
4565
4501
|
MessageType,
|
4566
4502
|
{
|
4567
4503
|
hasCurrentUserSent: message.sender === localPeerId,
|
@@ -4569,9 +4505,9 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4569
4505
|
roles: message.recipientRoles
|
4570
4506
|
}
|
4571
4507
|
),
|
4572
|
-
!isOverlay ? /* @__PURE__ */
|
4508
|
+
!isOverlay ? /* @__PURE__ */ React52.createElement(ChatActions, { onPin, showPinAction }) : null
|
4573
4509
|
),
|
4574
|
-
/* @__PURE__ */
|
4510
|
+
/* @__PURE__ */ React52.createElement(
|
4575
4511
|
Text,
|
4576
4512
|
{
|
4577
4513
|
variant: "sm",
|
@@ -4585,12 +4521,12 @@ var ChatMessage = React53.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4585
4521
|
},
|
4586
4522
|
onClick: (e) => e.stopPropagation()
|
4587
4523
|
},
|
4588
|
-
/* @__PURE__ */
|
4524
|
+
/* @__PURE__ */ React52.createElement(AnnotisedMessage, { message: message.message })
|
4589
4525
|
)
|
4590
4526
|
)
|
4591
4527
|
);
|
4592
4528
|
});
|
4593
|
-
var ChatList =
|
4529
|
+
var ChatList = React52.forwardRef(
|
4594
4530
|
({ width, height, setRowHeight, getRowHeight, messages, scrollToBottom }, listRef) => {
|
4595
4531
|
const { setPinnedMessage } = useSetPinnedMessage();
|
4596
4532
|
useLayoutEffect(() => {
|
@@ -4598,7 +4534,7 @@ var ChatList = React53.forwardRef(
|
|
4598
4534
|
scrollToBottom(1);
|
4599
4535
|
}
|
4600
4536
|
}, [listRef]);
|
4601
|
-
return /* @__PURE__ */
|
4537
|
+
return /* @__PURE__ */ React52.createElement(
|
4602
4538
|
VariableSizeList,
|
4603
4539
|
{
|
4604
4540
|
ref: listRef,
|
@@ -4610,7 +4546,7 @@ var ChatList = React53.forwardRef(
|
|
4610
4546
|
overflowX: "hidden"
|
4611
4547
|
}
|
4612
4548
|
},
|
4613
|
-
({ index, style }) => /* @__PURE__ */
|
4549
|
+
({ index, style }) => /* @__PURE__ */ React52.createElement(
|
4614
4550
|
ChatMessage,
|
4615
4551
|
{
|
4616
4552
|
style,
|
@@ -4624,7 +4560,7 @@ var ChatList = React53.forwardRef(
|
|
4624
4560
|
);
|
4625
4561
|
}
|
4626
4562
|
);
|
4627
|
-
var VirtualizedChatMessages =
|
4563
|
+
var VirtualizedChatMessages = React52.forwardRef(({ messages, scrollToBottom }, listRef) => {
|
4628
4564
|
const rowHeights = useRef10({});
|
4629
4565
|
function getRowHeight(index) {
|
4630
4566
|
return rowHeights.current[index] + 16 || 72;
|
@@ -4636,7 +4572,7 @@ var VirtualizedChatMessages = React53.forwardRef(({ messages, scrollToBottom },
|
|
4636
4572
|
},
|
4637
4573
|
[listRef]
|
4638
4574
|
);
|
4639
|
-
return /* @__PURE__ */
|
4575
|
+
return /* @__PURE__ */ React52.createElement(
|
4640
4576
|
Box,
|
4641
4577
|
{
|
4642
4578
|
css: {
|
@@ -4645,14 +4581,14 @@ var VirtualizedChatMessages = React53.forwardRef(({ messages, scrollToBottom },
|
|
4645
4581
|
},
|
4646
4582
|
as: "div"
|
4647
4583
|
},
|
4648
|
-
/* @__PURE__ */
|
4584
|
+
/* @__PURE__ */ React52.createElement(
|
4649
4585
|
AutoSizer,
|
4650
4586
|
{
|
4651
4587
|
style: {
|
4652
4588
|
width: "90%"
|
4653
4589
|
}
|
4654
4590
|
},
|
4655
|
-
({ height, width }) => /* @__PURE__ */
|
4591
|
+
({ height, width }) => /* @__PURE__ */ React52.createElement(
|
4656
4592
|
ChatList,
|
4657
4593
|
{
|
4658
4594
|
width,
|
@@ -4667,15 +4603,15 @@ var VirtualizedChatMessages = React53.forwardRef(({ messages, scrollToBottom },
|
|
4667
4603
|
)
|
4668
4604
|
);
|
4669
4605
|
});
|
4670
|
-
var ChatBody =
|
4606
|
+
var ChatBody = React52.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
|
4671
4607
|
var _a;
|
4672
4608
|
const storeMessageSelector = role ? selectMessagesByRole(role) : peerId ? selectMessagesByPeerID(peerId) : selectHMSMessages;
|
4673
|
-
let messages =
|
4609
|
+
let messages = useHMSStore26(storeMessageSelector);
|
4674
4610
|
messages = useMemo8(() => (messages == null ? void 0 : messages.filter((message) => message.type === "chat")) || [], [messages]);
|
4675
4611
|
const isMobile = useMedia11(config.media.md);
|
4676
4612
|
const { elements } = useRoomLayoutConferencingScreen();
|
4677
4613
|
if (messages.length === 0 && !(isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay))) {
|
4678
|
-
return /* @__PURE__ */
|
4614
|
+
return /* @__PURE__ */ React52.createElement(
|
4679
4615
|
Flex,
|
4680
4616
|
{
|
4681
4617
|
css: {
|
@@ -4687,7 +4623,7 @@ var ChatBody = React53.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
|
|
4687
4623
|
align: "center",
|
4688
4624
|
justify: "center"
|
4689
4625
|
},
|
4690
|
-
/* @__PURE__ */
|
4626
|
+
/* @__PURE__ */ React52.createElement(Box, null, /* @__PURE__ */ React52.createElement("img", { src: empty_chat_default, alt: "Empty Chat", height: 132, width: 185, style: { margin: "0 auto" } }), /* @__PURE__ */ React52.createElement(Text, { variant: "h5", css: { mt: "$8", c: "$on_surface_high" } }, "Start a conversation"), /* @__PURE__ */ React52.createElement(
|
4691
4627
|
Text,
|
4692
4628
|
{
|
4693
4629
|
variant: "sm",
|
@@ -4697,11 +4633,11 @@ var ChatBody = React53.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
|
|
4697
4633
|
))
|
4698
4634
|
);
|
4699
4635
|
}
|
4700
|
-
return /* @__PURE__ */
|
4636
|
+
return /* @__PURE__ */ React52.createElement(Fragment8, null, /* @__PURE__ */ React52.createElement(VirtualizedChatMessages, { messages, scrollToBottom, ref: listRef }));
|
4701
4637
|
});
|
4702
4638
|
|
4703
4639
|
// src/Prebuilt/components/Chat/ChatFooter.tsx
|
4704
|
-
import
|
4640
|
+
import React53, { useCallback as useCallback13, useEffect as useEffect19, useRef as useRef12, useState as useState30 } from "react";
|
4705
4641
|
import { useMedia as useMedia12 } from "react-use";
|
4706
4642
|
import data2 from "@emoji-mart/data";
|
4707
4643
|
import Picker from "@emoji-mart/react";
|
@@ -4710,10 +4646,10 @@ import { EmojiIcon as EmojiIcon3, SendIcon } from "@100mslive/react-icons";
|
|
4710
4646
|
|
4711
4647
|
// src/Prebuilt/components/AppData/useChatState.js
|
4712
4648
|
import { useCallback as useCallback12 } from "react";
|
4713
|
-
import { selectAppData as selectAppData2, useHMSActions as useHMSActions16, useHMSStore as
|
4649
|
+
import { selectAppData as selectAppData2, useHMSActions as useHMSActions16, useHMSStore as useHMSStore27 } from "@100mslive/react-sdk";
|
4714
4650
|
var useChatDraftMessage = () => {
|
4715
4651
|
const hmsActions = useHMSActions16();
|
4716
|
-
let chatDraftMessage =
|
4652
|
+
let chatDraftMessage = useHMSStore27(selectAppData2(APP_DATA.chatDraft));
|
4717
4653
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
4718
4654
|
chatDraftMessage = "";
|
4719
4655
|
}
|
@@ -4777,9 +4713,9 @@ var TextArea = styled("textarea", {
|
|
4777
4713
|
}
|
4778
4714
|
});
|
4779
4715
|
function EmojiPicker({ onSelect }) {
|
4780
|
-
const [showEmoji, setShowEmoji] =
|
4716
|
+
const [showEmoji, setShowEmoji] = useState30(false);
|
4781
4717
|
const ref = useEmojiPickerStyles(showEmoji);
|
4782
|
-
return /* @__PURE__ */
|
4718
|
+
return /* @__PURE__ */ React53.createElement(Popover.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React53.createElement(Popover.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React53.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React53.createElement(EmojiIcon3, null))), /* @__PURE__ */ React53.createElement(Popover.Portal, null, /* @__PURE__ */ React53.createElement(
|
4783
4719
|
Popover.Content,
|
4784
4720
|
{
|
4785
4721
|
alignOffset: -40,
|
@@ -4789,7 +4725,7 @@ function EmojiPicker({ onSelect }) {
|
|
4789
4725
|
p: 0
|
4790
4726
|
}
|
4791
4727
|
},
|
4792
|
-
/* @__PURE__ */
|
4728
|
+
/* @__PURE__ */ React53.createElement(
|
4793
4729
|
Box,
|
4794
4730
|
{
|
4795
4731
|
css: {
|
@@ -4798,7 +4734,7 @@ function EmojiPicker({ onSelect }) {
|
|
4798
4734
|
},
|
4799
4735
|
ref
|
4800
4736
|
},
|
4801
|
-
/* @__PURE__ */
|
4737
|
+
/* @__PURE__ */ React53.createElement(Picker, { onEmojiSelect: onSelect, data: data2, previewPosition: "none", skinPosition: "search" })
|
4802
4738
|
)
|
4803
4739
|
)));
|
4804
4740
|
}
|
@@ -4850,7 +4786,7 @@ var ChatFooter = ({
|
|
4850
4786
|
setDraftMessage((messageElement == null ? void 0 : messageElement.value) || "");
|
4851
4787
|
};
|
4852
4788
|
}, [setDraftMessage]);
|
4853
|
-
return /* @__PURE__ */
|
4789
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ React53.createElement(
|
4854
4790
|
Flex,
|
4855
4791
|
{
|
4856
4792
|
align: "center",
|
@@ -4871,7 +4807,7 @@ var ChatFooter = ({
|
|
4871
4807
|
}
|
4872
4808
|
},
|
4873
4809
|
children,
|
4874
|
-
/* @__PURE__ */
|
4810
|
+
/* @__PURE__ */ React53.createElement(
|
4875
4811
|
TextArea,
|
4876
4812
|
{
|
4877
4813
|
css: {
|
@@ -4898,7 +4834,7 @@ var ChatFooter = ({
|
|
4898
4834
|
onCopy: (e) => e.stopPropagation()
|
4899
4835
|
}
|
4900
4836
|
),
|
4901
|
-
!isMobile ? /* @__PURE__ */
|
4837
|
+
!isMobile ? /* @__PURE__ */ React53.createElement(
|
4902
4838
|
EmojiPicker,
|
4903
4839
|
{
|
4904
4840
|
onSelect: (emoji) => {
|
@@ -4908,7 +4844,7 @@ var ChatFooter = ({
|
|
4908
4844
|
}
|
4909
4845
|
}
|
4910
4846
|
) : null,
|
4911
|
-
/* @__PURE__ */
|
4847
|
+
/* @__PURE__ */ React53.createElement(
|
4912
4848
|
IconButton,
|
4913
4849
|
{
|
4914
4850
|
className: "send-msg",
|
@@ -4921,7 +4857,7 @@ var ChatFooter = ({
|
|
4921
4857
|
},
|
4922
4858
|
"data-testid": "send_msg_btn"
|
4923
4859
|
},
|
4924
|
-
/* @__PURE__ */
|
4860
|
+
/* @__PURE__ */ React53.createElement(SendIcon, null)
|
4925
4861
|
)
|
4926
4862
|
)));
|
4927
4863
|
};
|
@@ -4931,21 +4867,21 @@ import {
|
|
4931
4867
|
selectMessagesUnreadCountByPeerID,
|
4932
4868
|
selectMessagesUnreadCountByRole,
|
4933
4869
|
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
|
4934
|
-
useHMSStore as
|
4870
|
+
useHMSStore as useHMSStore28
|
4935
4871
|
} from "@100mslive/react-sdk";
|
4936
4872
|
var useUnreadCount = ({ role, peerId }) => {
|
4937
4873
|
const unreadCountSelector = role ? selectMessagesUnreadCountByRole(role) : peerId ? selectMessagesUnreadCountByPeerID(peerId) : selectUnreadHMSMessagesCount2;
|
4938
|
-
const unreadCount =
|
4874
|
+
const unreadCount = useHMSStore28(unreadCountSelector);
|
4939
4875
|
return unreadCount;
|
4940
4876
|
};
|
4941
4877
|
|
4942
4878
|
// src/Prebuilt/components/Chat/Chat.jsx
|
4943
4879
|
var PINNED_MESSAGE_LENGTH = 80;
|
4944
4880
|
var PinnedMessage = ({ clearPinnedMessage }) => {
|
4945
|
-
const permissions =
|
4946
|
-
const pinnedMessage =
|
4881
|
+
const permissions = useHMSStore29(selectPermissions10);
|
4882
|
+
const pinnedMessage = useHMSStore29(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGE));
|
4947
4883
|
const formattedPinnedMessage = (pinnedMessage == null ? void 0 : pinnedMessage.length) && pinnedMessage.length > PINNED_MESSAGE_LENGTH ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...` : pinnedMessage;
|
4948
|
-
return pinnedMessage ? /* @__PURE__ */
|
4884
|
+
return pinnedMessage ? /* @__PURE__ */ React54.createElement(
|
4949
4885
|
Flex,
|
4950
4886
|
{
|
4951
4887
|
title: pinnedMessage,
|
@@ -4953,8 +4889,8 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
|
|
4953
4889
|
align: "center",
|
4954
4890
|
justify: "between"
|
4955
4891
|
},
|
4956
|
-
/* @__PURE__ */
|
4957
|
-
/* @__PURE__ */
|
4892
|
+
/* @__PURE__ */ React54.createElement(PinIcon2, null),
|
4893
|
+
/* @__PURE__ */ React54.createElement(
|
4958
4894
|
Box,
|
4959
4895
|
{
|
4960
4896
|
css: {
|
@@ -4964,15 +4900,15 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
|
|
4964
4900
|
overflowY: "auto"
|
4965
4901
|
}
|
4966
4902
|
},
|
4967
|
-
/* @__PURE__ */
|
4903
|
+
/* @__PURE__ */ React54.createElement(Text, { variant: "sm" }, /* @__PURE__ */ React54.createElement(AnnotisedMessage, { message: formattedPinnedMessage }))
|
4968
4904
|
),
|
4969
|
-
permissions.removeOthers && /* @__PURE__ */
|
4905
|
+
permissions.removeOthers && /* @__PURE__ */ React54.createElement(
|
4970
4906
|
Flex,
|
4971
4907
|
{
|
4972
4908
|
onClick: () => clearPinnedMessage(),
|
4973
4909
|
css: { cursor: "pointer", color: "$on_surface_medium", "&:hover": { color: "$on_surface_high" } }
|
4974
4910
|
},
|
4975
|
-
/* @__PURE__ */
|
4911
|
+
/* @__PURE__ */ React54.createElement(CrossIcon6, null)
|
4976
4912
|
)
|
4977
4913
|
) : null;
|
4978
4914
|
};
|
@@ -4981,13 +4917,13 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
4981
4917
|
const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);
|
4982
4918
|
const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);
|
4983
4919
|
const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
4984
|
-
const peerName =
|
4985
|
-
const [chatOptions, setChatOptions] =
|
4920
|
+
const peerName = useHMSStore29(selectPeerNameByID3(peerSelector));
|
4921
|
+
const [chatOptions, setChatOptions] = useState31({
|
4986
4922
|
role: roleSelector || "",
|
4987
4923
|
peerId: peerSelector && peerName ? peerSelector : "",
|
4988
4924
|
selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : "Everyone"
|
4989
4925
|
});
|
4990
|
-
const [isSelectorOpen
|
4926
|
+
const [isSelectorOpen] = useState31(false);
|
4991
4927
|
const listRef = useRef13(null);
|
4992
4928
|
const hmsActions = useHMSActions18();
|
4993
4929
|
const { setPinnedMessage } = useSetPinnedMessage();
|
@@ -5009,7 +4945,7 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
5009
4945
|
const currentRef = listRef.current._outerRef;
|
5010
4946
|
isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;
|
5011
4947
|
}
|
5012
|
-
const messagesCount =
|
4948
|
+
const messagesCount = useHMSStore29(storeMessageSelector) || 0;
|
5013
4949
|
const scrollToBottom = useCallback14(
|
5014
4950
|
(unreadCount = 0) => {
|
5015
4951
|
var _a2;
|
@@ -5024,7 +4960,7 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
5024
4960
|
},
|
5025
4961
|
[hmsActions, messagesCount]
|
5026
4962
|
);
|
5027
|
-
return /* @__PURE__ */
|
4963
|
+
return /* @__PURE__ */ React54.createElement(
|
5028
4964
|
Flex,
|
5029
4965
|
{
|
5030
4966
|
direction: "column",
|
@@ -5035,8 +4971,8 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
5035
4971
|
transition: "margin 0.3s ease-in-out"
|
5036
4972
|
}
|
5037
4973
|
},
|
5038
|
-
isMobile && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay) ? null : /* @__PURE__ */
|
5039
|
-
/* @__PURE__ */
|
4974
|
+
isMobile && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay) ? null : /* @__PURE__ */ React54.createElement(React54.Fragment, null, ((_c = elements == null ? void 0 : elements.chat) == null ? void 0 : _c.allow_pinning_messages) ? /* @__PURE__ */ React54.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
|
4975
|
+
/* @__PURE__ */ React54.createElement(
|
5040
4976
|
ChatBody,
|
5041
4977
|
{
|
5042
4978
|
role: chatOptions.role,
|
@@ -5046,7 +4982,7 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
5046
4982
|
screenType
|
5047
4983
|
}
|
5048
4984
|
),
|
5049
|
-
/* @__PURE__ */
|
4985
|
+
/* @__PURE__ */ React54.createElement(
|
5050
4986
|
ChatFooter,
|
5051
4987
|
{
|
5052
4988
|
role: chatOptions.role,
|
@@ -5064,7 +5000,7 @@ var Chat = ({ screenType, hideControls = false }) => {
|
|
5064
5000
|
},
|
5065
5001
|
peerId: chatOptions.peerId
|
5066
5002
|
},
|
5067
|
-
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */
|
5003
|
+
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */ React54.createElement(NewMessageIndicator, { role: chatOptions.role, peerId: chatOptions.peerId, scrollToBottom })
|
5068
5004
|
)
|
5069
5005
|
);
|
5070
5006
|
};
|
@@ -5073,7 +5009,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5073
5009
|
if (!unreadCount) {
|
5074
5010
|
return null;
|
5075
5011
|
}
|
5076
|
-
return /* @__PURE__ */
|
5012
|
+
return /* @__PURE__ */ React54.createElement(
|
5077
5013
|
Flex,
|
5078
5014
|
{
|
5079
5015
|
justify: "center",
|
@@ -5084,7 +5020,7 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5084
5020
|
position: "absolute"
|
5085
5021
|
}
|
5086
5022
|
},
|
5087
|
-
/* @__PURE__ */
|
5023
|
+
/* @__PURE__ */ React54.createElement(
|
5088
5024
|
Button,
|
5089
5025
|
{
|
5090
5026
|
variant: "standard",
|
@@ -5107,22 +5043,114 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5107
5043
|
},
|
5108
5044
|
"New ",
|
5109
5045
|
unreadCount === 1 ? "message" : "messages",
|
5110
|
-
/* @__PURE__ */
|
5046
|
+
/* @__PURE__ */ React54.createElement(ChevronDownIcon2, null)
|
5111
5047
|
)
|
5112
5048
|
);
|
5113
5049
|
};
|
5114
5050
|
|
5051
|
+
// src/Prebuilt/components/SidePaneTabs.tsx
|
5052
|
+
var tabTriggerCSS = {
|
5053
|
+
color: "$on_surface_high",
|
5054
|
+
p: "$4",
|
5055
|
+
fontWeight: "$semiBold",
|
5056
|
+
fontSize: "$sm",
|
5057
|
+
w: "100%",
|
5058
|
+
justifyContent: "center"
|
5059
|
+
};
|
5060
|
+
var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
|
5061
|
+
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
5062
|
+
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
5063
|
+
const resetSidePane = useSidepaneReset();
|
5064
|
+
const [activeTab, setActiveTab] = useState32(active);
|
5065
|
+
const peerCount = useHMSStore30(selectPeerCount3);
|
5066
|
+
const { elements } = useRoomLayoutConferencingScreen();
|
5067
|
+
const showChat = !!(elements == null ? void 0 : elements.chat);
|
5068
|
+
const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
|
5069
|
+
const hideTabs = !(showChat && showParticipants);
|
5070
|
+
useEffect21(() => {
|
5071
|
+
if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
|
5072
|
+
setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
5073
|
+
} else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {
|
5074
|
+
setActiveTab(SIDE_PANE_OPTIONS.CHAT);
|
5075
|
+
} else if (!showChat && !showParticipants) {
|
5076
|
+
resetSidePane();
|
5077
|
+
}
|
5078
|
+
}, [showChat, activeTab, showParticipants, resetSidePane]);
|
5079
|
+
return /* @__PURE__ */ React55.createElement(
|
5080
|
+
Flex,
|
5081
|
+
{
|
5082
|
+
direction: "column",
|
5083
|
+
css: {
|
5084
|
+
color: "$on_primary_high",
|
5085
|
+
h: "100%"
|
5086
|
+
}
|
5087
|
+
},
|
5088
|
+
hideTabs ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : `Participants (${peerCount})`), showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType, hideControls }) : /* @__PURE__ */ React55.createElement(ParticipantList, null)) : /* @__PURE__ */ React55.createElement(
|
5089
|
+
Tabs.Root,
|
5090
|
+
{
|
5091
|
+
value: activeTab,
|
5092
|
+
onValueChange: setActiveTab,
|
5093
|
+
css: {
|
5094
|
+
flexDirection: "column",
|
5095
|
+
size: "100%"
|
5096
|
+
}
|
5097
|
+
},
|
5098
|
+
/* @__PURE__ */ React55.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ React55.createElement(
|
5099
|
+
Tabs.Trigger,
|
5100
|
+
{
|
5101
|
+
value: SIDE_PANE_OPTIONS.CHAT,
|
5102
|
+
onClick: toggleChat,
|
5103
|
+
css: __spreadProps(__spreadValues({}, tabTriggerCSS), {
|
5104
|
+
color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? "$on_surface_low" : "$on_surface_high"
|
5105
|
+
})
|
5106
|
+
},
|
5107
|
+
"Chat"
|
5108
|
+
), /* @__PURE__ */ React55.createElement(
|
5109
|
+
Tabs.Trigger,
|
5110
|
+
{
|
5111
|
+
value: SIDE_PANE_OPTIONS.PARTICIPANTS,
|
5112
|
+
onClick: toggleParticipants,
|
5113
|
+
css: __spreadProps(__spreadValues({}, tabTriggerCSS), {
|
5114
|
+
color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? "$on_surface_low" : "$on_surface_high"
|
5115
|
+
})
|
5116
|
+
},
|
5117
|
+
"Participants (",
|
5118
|
+
peerCount,
|
5119
|
+
")"
|
5120
|
+
)),
|
5121
|
+
/* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(ParticipantList, null)),
|
5122
|
+
/* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(Chat, { screenType, hideControls }))
|
5123
|
+
),
|
5124
|
+
/* @__PURE__ */ React55.createElement(
|
5125
|
+
IconButton,
|
5126
|
+
{
|
5127
|
+
css: { position: "absolute", right: "$10", top: "$11" },
|
5128
|
+
onClick: (e) => {
|
5129
|
+
e.stopPropagation();
|
5130
|
+
if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
|
5131
|
+
toggleChat();
|
5132
|
+
} else {
|
5133
|
+
toggleParticipants();
|
5134
|
+
}
|
5135
|
+
},
|
5136
|
+
"data-testid": "close_chat"
|
5137
|
+
},
|
5138
|
+
/* @__PURE__ */ React55.createElement(CrossIcon7, null)
|
5139
|
+
)
|
5140
|
+
);
|
5141
|
+
});
|
5142
|
+
|
5115
5143
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
5116
5144
|
import React57, { Fragment as Fragment10, useState as useState34 } from "react";
|
5117
|
-
import { selectPermissions as selectPermissions11, useHMSStore as
|
5145
|
+
import { selectPermissions as selectPermissions11, useHMSStore as useHMSStore32, useRecordingStreaming as useRecordingStreaming7 } from "@100mslive/react-sdk";
|
5118
5146
|
import { ColoredHandIcon, CrossIcon as CrossIcon8, GoLiveIcon as GoLiveIcon3 } from "@100mslive/react-icons";
|
5119
5147
|
|
5120
5148
|
// src/Prebuilt/images/rtmp.png
|
5121
5149
|
var rtmp_default = "data:image/png;base64,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";
|
5122
5150
|
|
5123
5151
|
// src/Prebuilt/components/Streaming/HLSStreaming.jsx
|
5124
|
-
import React56, { Fragment as Fragment9, useCallback as useCallback15, useEffect as
|
5125
|
-
import { selectRoomID, useHMSActions as useHMSActions19, useHMSStore as
|
5152
|
+
import React56, { Fragment as Fragment9, useCallback as useCallback15, useEffect as useEffect22, useState as useState33 } from "react";
|
5153
|
+
import { selectRoomID, useHMSActions as useHMSActions19, useHMSStore as useHMSStore31, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
|
5126
5154
|
import {
|
5127
5155
|
EndStreamIcon as EndStreamIcon2,
|
5128
5156
|
EyeOpenIcon,
|
@@ -5197,7 +5225,7 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
|
5197
5225
|
};
|
5198
5226
|
var HLSStreaming = ({ onBack }) => {
|
5199
5227
|
const roleNames = useFilteredRoles();
|
5200
|
-
const roomId =
|
5228
|
+
const roomId = useHMSStore31(selectRoomID);
|
5201
5229
|
const cards = roleNames.map((roleName) => getCardData(roleName, roomId));
|
5202
5230
|
const { isHLSRunning } = useRecordingStreaming6();
|
5203
5231
|
const [showLinks, setShowLinks] = useState33(false);
|
@@ -5245,7 +5273,7 @@ var EndHLS = ({ setShowLinks }) => {
|
|
5245
5273
|
const [inProgress, setInProgress] = useState33(false);
|
5246
5274
|
const [error, setError] = useState33("");
|
5247
5275
|
const { isHLSRunning } = useRecordingStreaming6();
|
5248
|
-
|
5276
|
+
useEffect22(() => {
|
5249
5277
|
if (inProgress && !isHLSRunning) {
|
5250
5278
|
setInProgress(false);
|
5251
5279
|
}
|
@@ -5278,7 +5306,7 @@ var EndHLS = ({ setShowLinks }) => {
|
|
5278
5306
|
var StreamingLanding = () => {
|
5279
5307
|
const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);
|
5280
5308
|
const { isHLSRunning, isRTMPRunning } = useRecordingStreaming7();
|
5281
|
-
const permissions =
|
5309
|
+
const permissions = useHMSStore32(selectPermissions11);
|
5282
5310
|
const [showHLS, setShowHLS] = useState34(isHLSRunning);
|
5283
5311
|
const [showRTMP, setShowRTMP] = useState34(isRTMPRunning);
|
5284
5312
|
if (!(permissions == null ? void 0 : permissions.hlsStreaming) && !(permissions == null ? void 0 : permissions.rtmpStreaming)) {
|
@@ -5329,21 +5357,26 @@ var SidePane = ({
|
|
5329
5357
|
}) => {
|
5330
5358
|
var _a, _b;
|
5331
5359
|
const isMobile = useMedia14(config.media.md);
|
5332
|
-
const sidepane =
|
5333
|
-
const activeScreensharePeerId =
|
5334
|
-
const trackId = (_a =
|
5360
|
+
const sidepane = useHMSStore33(selectAppData3(APP_DATA.sidePane));
|
5361
|
+
const activeScreensharePeerId = useHMSStore33(selectAppData3(APP_DATA.activeScreensharePeerId));
|
5362
|
+
const trackId = (_a = useHMSStore33(selectVideoTrackByPeerID(activeScreensharePeerId))) == null ? void 0 : _a.id;
|
5335
5363
|
const { elements } = useRoomLayoutConferencingScreen();
|
5336
5364
|
let ViewComponent;
|
5337
|
-
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS) {
|
5338
|
-
ViewComponent = /* @__PURE__ */ React58.createElement(
|
5339
|
-
} else if (sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
5340
|
-
ViewComponent = /* @__PURE__ */ React58.createElement(Chat, { screenType, hideControls });
|
5365
|
+
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
5366
|
+
ViewComponent = /* @__PURE__ */ React58.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
|
5341
5367
|
} else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
|
5342
5368
|
ViewComponent = /* @__PURE__ */ React58.createElement(StreamingLanding, null);
|
5343
5369
|
}
|
5344
5370
|
if (!ViewComponent && !trackId) {
|
5345
5371
|
return null;
|
5346
5372
|
}
|
5373
|
+
const tileLayout = {
|
5374
|
+
hideParticipantNameOnTile: tileProps == null ? void 0 : tileProps.hide_participant_name_on_tile,
|
5375
|
+
roundedVideoTile: tileProps == null ? void 0 : tileProps.rounded_video_tile,
|
5376
|
+
hideAudioMuteOnTile: tileProps == null ? void 0 : tileProps.hide_audio_mute_on_tile,
|
5377
|
+
hideMetadataOnTile: tileProps == null ? void 0 : tileProps.hide_metadata_on_tile,
|
5378
|
+
objectFit: tileProps == null ? void 0 : tileProps.video_object_fit
|
5379
|
+
};
|
5347
5380
|
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay);
|
5348
5381
|
return /* @__PURE__ */ React58.createElement(
|
5349
5382
|
Flex,
|
@@ -5365,9 +5398,8 @@ var SidePane = ({
|
|
5365
5398
|
trackId,
|
5366
5399
|
width: "100%",
|
5367
5400
|
height: 225,
|
5368
|
-
rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
|
5369
|
-
|
5370
|
-
}, tileProps)
|
5401
|
+
rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
|
5402
|
+
}, tileLayout)
|
5371
5403
|
),
|
5372
5404
|
!!ViewComponent && /* @__PURE__ */ React58.createElement(
|
5373
5405
|
Box,
|
@@ -5455,20 +5487,20 @@ var WaitingView = React59.memo(() => {
|
|
5455
5487
|
});
|
5456
5488
|
|
5457
5489
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
5458
|
-
var HLSView = React60.lazy(() => import("./HLSView-
|
5490
|
+
var HLSView = React60.lazy(() => import("./HLSView-QMU5JK7U.js"));
|
5459
5491
|
var VideoStreamingSection = ({
|
5460
5492
|
screenType,
|
5461
5493
|
elements,
|
5462
5494
|
hideControls = false
|
5463
5495
|
}) => {
|
5464
5496
|
var _a, _b;
|
5465
|
-
const localPeerRole =
|
5466
|
-
const isConnected =
|
5497
|
+
const localPeerRole = useHMSStore34(selectLocalPeerRoleName2);
|
5498
|
+
const isConnected = useHMSStore34(selectIsConnectedToRoom6);
|
5467
5499
|
const hmsActions = useHMSActions20();
|
5468
5500
|
const waitingViewerRole = useWaitingViewerRole();
|
5469
5501
|
const urlToIframe = useUrlToEmbed();
|
5470
5502
|
const pdfAnnotatorActive = usePDFAnnotator();
|
5471
|
-
|
5503
|
+
useEffect23(() => {
|
5472
5504
|
if (!isConnected) {
|
5473
5505
|
return;
|
5474
5506
|
}
|
@@ -5511,28 +5543,31 @@ var VideoStreamingSection = ({
|
|
5511
5543
|
};
|
5512
5544
|
|
5513
5545
|
// src/Prebuilt/components/RoleChangeRequestModal.tsx
|
5514
|
-
import React61, { useEffect as
|
5546
|
+
import React61, { useEffect as useEffect24 } from "react";
|
5515
5547
|
import {
|
5516
5548
|
selectLocalPeerName,
|
5517
5549
|
selectLocalPeerRoleName as selectLocalPeerRoleName3,
|
5518
5550
|
selectRoleChangeRequest,
|
5519
5551
|
useCustomEvent as useCustomEvent2,
|
5520
5552
|
useHMSActions as useHMSActions21,
|
5521
|
-
useHMSStore as
|
5553
|
+
useHMSStore as useHMSStore35
|
5522
5554
|
} from "@100mslive/react-sdk";
|
5523
5555
|
var RoleChangeRequestModal = () => {
|
5524
5556
|
const hmsActions = useHMSActions21();
|
5525
5557
|
const { updateMetaData } = useMyMetadata();
|
5526
|
-
const currentRole =
|
5527
|
-
const roleChangeRequest =
|
5528
|
-
const name =
|
5558
|
+
const currentRole = useHMSStore35(selectLocalPeerRoleName3);
|
5559
|
+
const roleChangeRequest = useHMSStore35(selectRoleChangeRequest);
|
5560
|
+
const name = useHMSStore35(selectLocalPeerName);
|
5529
5561
|
const { sendEvent } = useCustomEvent2({ type: ROLE_CHANGE_DECLINED });
|
5530
|
-
|
5562
|
+
useEffect24(() => {
|
5531
5563
|
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
5532
5564
|
return;
|
5533
5565
|
}
|
5534
|
-
|
5535
|
-
|
5566
|
+
(() => __async(void 0, null, function* () {
|
5567
|
+
yield updateMetaData({ prevRole: currentRole });
|
5568
|
+
yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
|
5569
|
+
}))();
|
5570
|
+
}, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
|
5536
5571
|
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
5537
5572
|
return null;
|
5538
5573
|
}
|
@@ -5566,7 +5601,7 @@ var RoleChangeRequestModal = () => {
|
|
5566
5601
|
body,
|
5567
5602
|
onAction: () => __async(void 0, null, function* () {
|
5568
5603
|
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
5569
|
-
yield updateMetaData({ isHandRaised: false
|
5604
|
+
yield updateMetaData({ isHandRaised: false });
|
5570
5605
|
}),
|
5571
5606
|
actionText: "Accept"
|
5572
5607
|
}
|
@@ -5589,12 +5624,12 @@ var Conference = () => {
|
|
5589
5624
|
const { userName, endpoints } = useHMSPrebuiltContext();
|
5590
5625
|
const screenProps = useRoomLayoutConferencingScreen();
|
5591
5626
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
5592
|
-
const roomState =
|
5627
|
+
const roomState = useHMSStore36(selectRoomState);
|
5593
5628
|
const prevState = usePrevious(roomState);
|
5594
|
-
const isConnectedToRoom =
|
5629
|
+
const isConnectedToRoom = useHMSStore36(selectIsConnectedToRoom7);
|
5595
5630
|
const hmsActions = useHMSActions22();
|
5596
5631
|
const [hideControls, setHideControls] = useState35(false);
|
5597
|
-
const dropdownList =
|
5632
|
+
const dropdownList = useHMSStore36(selectAppData4(APP_DATA.dropdownList));
|
5598
5633
|
const authTokenInAppData = useAuthToken();
|
5599
5634
|
const headerRef = useRef14();
|
5600
5635
|
const footerRef = useRef14();
|
@@ -5607,7 +5642,7 @@ var Conference = () => {
|
|
5607
5642
|
setHideControls((value) => !value);
|
5608
5643
|
}
|
5609
5644
|
};
|
5610
|
-
|
5645
|
+
useEffect25(() => {
|
5611
5646
|
let timeout = null;
|
5612
5647
|
dropdownListRef.current = dropdownList || [];
|
5613
5648
|
if (dropdownListRef.current.length === 0) {
|
@@ -5622,7 +5657,7 @@ var Conference = () => {
|
|
5622
5657
|
clearTimeout(timeout);
|
5623
5658
|
};
|
5624
5659
|
}, [dropdownList, hideControls, isMobileDevice]);
|
5625
|
-
|
5660
|
+
useEffect25(() => {
|
5626
5661
|
if (!roomId) {
|
5627
5662
|
navigate(`/`);
|
5628
5663
|
return;
|
@@ -5637,7 +5672,7 @@ var Conference = () => {
|
|
5637
5672
|
navigate(`/preview/${roomId || ""}`);
|
5638
5673
|
}
|
5639
5674
|
}, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);
|
5640
|
-
|
5675
|
+
useEffect25(() => {
|
5641
5676
|
if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting) {
|
5642
5677
|
hmsActions.join({
|
5643
5678
|
userName,
|
@@ -5651,7 +5686,7 @@ var Conference = () => {
|
|
5651
5686
|
}).catch(console.error);
|
5652
5687
|
}
|
5653
5688
|
}, [authTokenInAppData, endpoints == null ? void 0 : endpoints.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
|
5654
|
-
|
5689
|
+
useEffect25(() => {
|
5655
5690
|
return () => {
|
5656
5691
|
PictureInPicture.stop().catch((error) => console.error("stopping pip", error));
|
5657
5692
|
};
|
@@ -5724,4 +5759,4 @@ var conference_default = Conference;
|
|
5724
5759
|
export {
|
5725
5760
|
conference_default as default
|
5726
5761
|
};
|
5727
|
-
//# sourceMappingURL=conference-
|
5762
|
+
//# sourceMappingURL=conference-FJJQ4TXX.js.map
|