@100mslive/roomkit-react 0.1.8-alpha.0 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-IQRPLYNH.js → HLSView-DDGPZHA2.js} +3 -3
- package/dist/Prebuilt/App.d.ts +1 -0
- package/dist/Prebuilt/AppContext.d.ts +1 -0
- package/dist/Prebuilt/components/Footer/PaginatedParticipants.d.ts +5 -0
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +10 -3
- package/dist/Prebuilt/components/Notifications/HeadlessEndRoomListener.d.ts +2 -0
- package/dist/Prebuilt/components/PrebuiltTileElements.d.ts +2198 -0
- package/dist/{VirtualBackground-GP4ATXD3.js → VirtualBackground-UVZJVOA2.js} +3 -3
- package/dist/{chunk-Z3O2WGWV.js → chunk-6SQTFOK6.js} +2 -2
- package/dist/{chunk-Z3O2WGWV.js.map → chunk-6SQTFOK6.js.map} +1 -1
- package/dist/{chunk-2H5NIZB7.js → chunk-HUMNPIYI.js} +2 -2
- package/dist/{chunk-GLYGPYNS.js → chunk-PRM33R4R.js} +286 -251
- package/dist/chunk-PRM33R4R.js.map +7 -0
- package/dist/{conference-JD35TNH4.js → conference-N7S47TDK.js} +484 -385
- package/dist/conference-N7S47TDK.js.map +7 -0
- package/dist/index.cjs.js +1895 -1727
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +234 -42
- package/dist/meta.esbuild.json +267 -74
- package/package.json +6 -6
- package/src/AudioLevel/AudioLevel.tsx +1 -1
- package/src/Prebuilt/App.tsx +5 -0
- package/src/Prebuilt/AppContext.tsx +2 -0
- package/src/Prebuilt/common/constants.js +1 -1
- package/src/Prebuilt/components/AppData/AppData.jsx +1 -1
- package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
- package/src/Prebuilt/components/Chip.tsx +6 -2
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +94 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +53 -23
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +86 -84
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +1 -1
- package/src/Prebuilt/components/Notifications/HeadlessEndRoomListener.tsx +23 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +1 -1
- package/src/Prebuilt/components/PrebuiltTileElements.tsx +5 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +9 -6
- package/src/Prebuilt/components/SidePaneTabs.tsx +31 -5
- package/src/Prebuilt/components/VideoTile.jsx +19 -34
- package/src/Prebuilt/components/conference.jsx +4 -3
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +1 -1
- package/src/Prebuilt/layouts/SidePane.tsx +1 -0
- package/dist/chunk-GLYGPYNS.js.map +0 -7
- package/dist/conference-JD35TNH4.js.map +0 -7
- /package/dist/{HLSView-IQRPLYNH.js.map → HLSView-DDGPZHA2.js.map} +0 -0
- /package/dist/{VirtualBackground-GP4ATXD3.js.map → VirtualBackground-UVZJVOA2.js.map} +0 -0
- /package/dist/{chunk-2H5NIZB7.js.map → chunk-HUMNPIYI.js.map} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
ActionTile
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-HUMNPIYI.js";
|
4
4
|
import {
|
5
5
|
APP_DATA,
|
6
6
|
Accordion,
|
@@ -10,7 +10,6 @@ import {
|
|
10
10
|
Button,
|
11
11
|
CHAT_SELECTOR,
|
12
12
|
Checkbox,
|
13
|
-
Chip_default,
|
14
13
|
ConnectionIndicator,
|
15
14
|
Dialog,
|
16
15
|
DialogCol,
|
@@ -29,6 +28,8 @@ import {
|
|
29
28
|
Label,
|
30
29
|
PictureInPicture,
|
31
30
|
Popover,
|
31
|
+
PrebuiltAttributeBox,
|
32
|
+
PrebuiltAudioIndicator,
|
32
33
|
PrebuiltDialogPortal,
|
33
34
|
PreviewControls,
|
34
35
|
PreviewTile,
|
@@ -86,7 +87,7 @@ import {
|
|
86
87
|
useUrlToEmbed,
|
87
88
|
useUserPreferences,
|
88
89
|
useWaitingViewerRole
|
89
|
-
} from "./chunk-
|
90
|
+
} from "./chunk-PRM33R4R.js";
|
90
91
|
import {
|
91
92
|
Box,
|
92
93
|
Flex,
|
@@ -105,19 +106,19 @@ import {
|
|
105
106
|
slideLeftAndFade,
|
106
107
|
styled,
|
107
108
|
textEllipsis
|
108
|
-
} from "./chunk-
|
109
|
+
} from "./chunk-6SQTFOK6.js";
|
109
110
|
|
110
111
|
// src/Prebuilt/components/conference.jsx
|
111
|
-
import
|
112
|
+
import React69, { useEffect as useEffect28, useRef as useRef16, useState as useState39 } from "react";
|
112
113
|
import { useNavigate, useParams } from "react-router-dom";
|
113
114
|
import { usePrevious } from "react-use";
|
114
115
|
import {
|
115
116
|
HMSRoomState,
|
116
117
|
selectAppData as selectAppData4,
|
117
|
-
selectIsConnectedToRoom as
|
118
|
+
selectIsConnectedToRoom as selectIsConnectedToRoom8,
|
118
119
|
selectRoomState,
|
119
|
-
useHMSActions as
|
120
|
-
useHMSStore as
|
120
|
+
useHMSActions as useHMSActions24,
|
121
|
+
useHMSStore as useHMSStore41
|
121
122
|
} from "@100mslive/react-sdk";
|
122
123
|
|
123
124
|
// src/Prebuilt/components/Footer/Footer.tsx
|
@@ -2788,18 +2789,19 @@ var ChatToggle = () => {
|
|
2788
2789
|
};
|
2789
2790
|
|
2790
2791
|
// src/Prebuilt/components/Footer/ParticipantList.jsx
|
2791
|
-
import React37, { Fragment as Fragment7, useCallback as
|
2792
|
+
import React37, { Fragment as Fragment7, useCallback as useCallback6, useEffect as useEffect7, useState as useState19 } from "react";
|
2792
2793
|
import { useDebounce, useMedia as useMedia5 } from "react-use";
|
2793
2794
|
import {
|
2794
2795
|
selectHandRaisedPeers,
|
2795
2796
|
selectHasPeerHandRaised,
|
2797
|
+
selectIsLargeRoom as selectIsLargeRoom2,
|
2796
2798
|
selectIsPeerAudioEnabled,
|
2797
2799
|
selectLocalPeerID as selectLocalPeerID4,
|
2798
2800
|
selectPeerCount as selectPeerCount2,
|
2799
2801
|
selectPeerMetadata,
|
2800
2802
|
selectPermissions as selectPermissions8,
|
2801
|
-
useHMSActions as
|
2802
|
-
useHMSStore as
|
2803
|
+
useHMSActions as useHMSActions12,
|
2804
|
+
useHMSStore as useHMSStore17
|
2803
2805
|
} from "@100mslive/react-sdk";
|
2804
2806
|
import {
|
2805
2807
|
ChangeRoleIcon as ChangeRoleIcon2,
|
@@ -2812,11 +2814,11 @@ import {
|
|
2812
2814
|
} from "@100mslive/react-icons";
|
2813
2815
|
|
2814
2816
|
// src/Prebuilt/components/Footer/RoleAccordion.tsx
|
2815
|
-
import React36, {
|
2817
|
+
import React36, { useEffect as useEffect6 } from "react";
|
2816
2818
|
import { useMeasure } from "react-use";
|
2817
2819
|
import { FixedSizeList } from "react-window";
|
2818
|
-
import {
|
2819
|
-
import {
|
2820
|
+
import { selectIsLargeRoom, useHMSStore as useHMSStore16, usePaginatedParticipants } from "@100mslive/react-sdk";
|
2821
|
+
import { ChevronRightIcon as ChevronRightIcon2 } from "@100mslive/react-icons";
|
2820
2822
|
|
2821
2823
|
// src/Prebuilt/components/Footer/RoleOptions.tsx
|
2822
2824
|
import React35, { useState as useState18 } from "react";
|
@@ -2852,7 +2854,7 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
2852
2854
|
const canMuteRole = (permissions == null ? void 0 : permissions.mute) && roleName === on_stage_role;
|
2853
2855
|
const canRemoveRoleFromStage = (permissions == null ? void 0 : permissions.changeRole) && roleName === on_stage_role;
|
2854
2856
|
const canRemoveRoleFromRoom = (permissions == null ? void 0 : permissions.removeOthers) && (on_stage_role === roleName || (off_stage_roles == null ? void 0 : off_stage_roles.includes(roleName)));
|
2855
|
-
if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom)) {
|
2857
|
+
if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom) || peerList.length === 0) {
|
2856
2858
|
return null;
|
2857
2859
|
}
|
2858
2860
|
const removeAllFromStage = () => {
|
@@ -2938,6 +2940,7 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
2938
2940
|
|
2939
2941
|
// src/Prebuilt/components/Footer/RoleAccordion.tsx
|
2940
2942
|
var ROW_HEIGHT = 50;
|
2943
|
+
var ITER_TIMER = 5e3;
|
2941
2944
|
function itemKey(index, data3) {
|
2942
2945
|
return data3.peerList[index].id;
|
2943
2946
|
}
|
@@ -2949,104 +2952,113 @@ var RoleAccordion = ({
|
|
2949
2952
|
roleName,
|
2950
2953
|
isConnected,
|
2951
2954
|
filter,
|
2952
|
-
isHandRaisedAccordion = false
|
2955
|
+
isHandRaisedAccordion = false,
|
2956
|
+
offStageRoles,
|
2957
|
+
onActive
|
2953
2958
|
}) => {
|
2954
2959
|
const [ref, { width }] = useMeasure();
|
2955
|
-
const actions = useHMSActions12();
|
2956
2960
|
const showAcordion = (filter == null ? void 0 : filter.search) ? peerList.some((peer) => peer.name.toLowerCase().includes(filter.search)) : true;
|
2957
|
-
const
|
2958
|
-
const
|
2959
|
-
const
|
2960
|
-
|
2961
|
+
const isLargeRoom = useHMSStore16(selectIsLargeRoom);
|
2962
|
+
const { peers, total, loadPeers } = usePaginatedParticipants({ role: roleName, limit: 10 });
|
2963
|
+
const isOffStageRole = roleName && offStageRoles.includes(roleName);
|
2964
|
+
useEffect6(() => {
|
2965
|
+
if (!isOffStageRole || !isLargeRoom) {
|
2961
2966
|
return;
|
2962
2967
|
}
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
2968
|
-
|
2969
|
-
}, [actions, roleName]);
|
2970
|
-
useEffect6(() => {
|
2971
|
-
loadNext();
|
2972
|
-
}, [loadNext]);
|
2968
|
+
loadPeers();
|
2969
|
+
const interval = setInterval(() => {
|
2970
|
+
loadPeers();
|
2971
|
+
}, ITER_TIMER);
|
2972
|
+
return () => clearInterval(interval);
|
2973
|
+
}, [isOffStageRole, isLargeRoom]);
|
2973
2974
|
if (!showAcordion || isHandRaisedAccordion && (filter == null ? void 0 : filter.search) || peerList.length === 0 && (filter == null ? void 0 : filter.search)) {
|
2974
2975
|
return null;
|
2975
2976
|
}
|
2976
|
-
const height = ROW_HEIGHT * peerList.length;
|
2977
|
-
|
2978
|
-
|
2977
|
+
const height = ROW_HEIGHT * (peers.length || peerList.length);
|
2978
|
+
const peersInAccordion = isOffStageRole && isLargeRoom ? peers : peerList;
|
2979
|
+
const hasNext = total > peersInAccordion.length;
|
2980
|
+
if (peersInAccordion.length === 0) {
|
2981
|
+
return null;
|
2982
|
+
}
|
2983
|
+
return /* @__PURE__ */ React36.createElement(Accordion.Item, { value: roleName, css: { "&:hover .role_actions": { visibility: "visible" }, mb: "$8" }, ref }, /* @__PURE__ */ React36.createElement(
|
2984
|
+
Accordion.Header,
|
2979
2985
|
{
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2986
|
+
iconStyles: { c: "$on_surface_high" },
|
2987
|
+
css: {
|
2988
|
+
textTransform: "capitalize",
|
2989
|
+
p: "$6 $8",
|
2990
|
+
fontSize: "$sm",
|
2991
|
+
fontWeight: "$semiBold",
|
2992
|
+
c: "$on_surface_medium",
|
2993
|
+
borderRadius: "$1",
|
2994
|
+
border: "1px solid $border_default",
|
2995
|
+
'&[data-state="open"]': {
|
2996
|
+
borderBottomLeftRadius: 0,
|
2997
|
+
borderBottomRightRadius: 0
|
2998
|
+
}
|
2999
|
+
}
|
2984
3000
|
},
|
2985
|
-
/* @__PURE__ */ React36.createElement(
|
2986
|
-
|
3001
|
+
/* @__PURE__ */ React36.createElement(Flex, { justify: "between", css: { flexGrow: 1, pr: "$6" } }, /* @__PURE__ */ React36.createElement(
|
3002
|
+
Text,
|
2987
3003
|
{
|
2988
|
-
|
2989
|
-
css: {
|
2990
|
-
textTransform: "capitalize",
|
2991
|
-
p: "$6 $8",
|
2992
|
-
fontSize: "$sm",
|
2993
|
-
fontWeight: "$semiBold",
|
2994
|
-
c: "$on_surface_medium"
|
2995
|
-
}
|
3004
|
+
variant: "sm",
|
3005
|
+
css: { fontWeight: "$semiBold", textTransform: "capitalize", color: "$on_surface_medium" }
|
2996
3006
|
},
|
2997
|
-
|
2998
|
-
|
2999
|
-
|
3000
|
-
|
3001
|
-
|
3002
|
-
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3010
|
-
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3007
|
+
roleName,
|
3008
|
+
" ",
|
3009
|
+
`(${getFormattedCount(isLargeRoom && isOffStageRole ? total : peerList.length)})`
|
3010
|
+
), /* @__PURE__ */ React36.createElement(RoleOptions, { roleName, peerList: peersInAccordion }))
|
3011
|
+
), /* @__PURE__ */ React36.createElement(Accordion.Content, { contentStyles: { border: "1px solid $border_default", borderTop: "none" } }, /* @__PURE__ */ React36.createElement(
|
3012
|
+
FixedSizeList,
|
3013
|
+
{
|
3014
|
+
itemSize: ROW_HEIGHT,
|
3015
|
+
itemData: { peerList: peersInAccordion, isConnected },
|
3016
|
+
itemKey,
|
3017
|
+
itemCount: peersInAccordion.length,
|
3018
|
+
width,
|
3019
|
+
height
|
3020
|
+
},
|
3021
|
+
VirtualizedParticipantItem
|
3022
|
+
), (offStageRoles == null ? void 0 : offStageRoles.includes(roleName)) && hasNext ? /* @__PURE__ */ React36.createElement(
|
3023
|
+
Flex,
|
3024
|
+
{
|
3025
|
+
align: "center",
|
3026
|
+
justify: "end",
|
3027
|
+
css: {
|
3028
|
+
gap: "$1",
|
3029
|
+
cursor: "pointer",
|
3030
|
+
color: "$on_surface_high",
|
3031
|
+
p: "$6",
|
3032
|
+
borderTop: "1px solid $border_default"
|
3016
3033
|
},
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
content: "Load More",
|
3023
|
-
onClick: loadNext,
|
3024
|
-
backgroundColor: "$secondary_default",
|
3025
|
-
css: {
|
3026
|
-
w: "max-content",
|
3027
|
-
borderRadius: "$size$9",
|
3028
|
-
m: "$2 auto",
|
3029
|
-
p: "$4",
|
3030
|
-
cursor: "pointer"
|
3031
|
-
}
|
3032
|
-
}
|
3033
|
-
) : null))
|
3034
|
-
));
|
3034
|
+
onClick: () => onActive == null ? void 0 : onActive(roleName)
|
3035
|
+
},
|
3036
|
+
/* @__PURE__ */ React36.createElement(Text, { variant: "sm", css: { color: "inherit" } }, "View All"),
|
3037
|
+
/* @__PURE__ */ React36.createElement(ChevronRightIcon2, null)
|
3038
|
+
) : null));
|
3035
3039
|
};
|
3036
3040
|
|
3037
3041
|
// src/Prebuilt/components/Footer/ParticipantList.jsx
|
3038
|
-
var ParticipantList = () => {
|
3039
|
-
const [filter, setFilter] =
|
3042
|
+
var ParticipantList = ({ offStageRoles = [], onActive }) => {
|
3043
|
+
const [filter, setFilter] = useState19();
|
3040
3044
|
const { participants, isConnected, peerCount } = useParticipants(filter);
|
3045
|
+
const isLargeRoom = useHMSStore17(selectIsLargeRoom2);
|
3041
3046
|
const peersOrderedByRoles = {};
|
3042
|
-
const handRaisedPeers =
|
3047
|
+
const handRaisedPeers = useHMSStore17(selectHandRaisedPeers);
|
3043
3048
|
participants.forEach((participant) => {
|
3044
3049
|
if (peersOrderedByRoles[participant.roleName] === void 0) {
|
3045
3050
|
peersOrderedByRoles[participant.roleName] = [];
|
3046
3051
|
}
|
3047
3052
|
peersOrderedByRoles[participant.roleName].push(participant);
|
3048
3053
|
});
|
3049
|
-
|
3054
|
+
if (isLargeRoom) {
|
3055
|
+
offStageRoles.forEach((role) => {
|
3056
|
+
if (!peersOrderedByRoles[role]) {
|
3057
|
+
peersOrderedByRoles[role] = [];
|
3058
|
+
}
|
3059
|
+
});
|
3060
|
+
}
|
3061
|
+
const onSearch = useCallback6((value) => {
|
3050
3062
|
setFilter((filterValue) => {
|
3051
3063
|
if (!filterValue) {
|
3052
3064
|
filterValue = {};
|
@@ -3064,12 +3076,15 @@ var ParticipantList = () => {
|
|
3064
3076
|
peersOrderedByRoles,
|
3065
3077
|
handRaisedList: handRaisedPeers,
|
3066
3078
|
isConnected,
|
3067
|
-
filter
|
3079
|
+
filter,
|
3080
|
+
offStageRoles,
|
3081
|
+
isLargeRoom,
|
3082
|
+
onActive
|
3068
3083
|
}
|
3069
3084
|
)));
|
3070
3085
|
};
|
3071
3086
|
var ParticipantCount = () => {
|
3072
|
-
const peerCount =
|
3087
|
+
const peerCount = useHMSStore17(selectPeerCount2);
|
3073
3088
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
3074
3089
|
const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
3075
3090
|
useEffect7(() => {
|
@@ -3100,7 +3115,15 @@ var ParticipantCount = () => {
|
|
3100
3115
|
/* @__PURE__ */ React37.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, getFormattedCount(peerCount))
|
3101
3116
|
);
|
3102
3117
|
};
|
3103
|
-
var VirtualizedParticipants = ({
|
3118
|
+
var VirtualizedParticipants = ({
|
3119
|
+
peersOrderedByRoles = {},
|
3120
|
+
isConnected,
|
3121
|
+
filter,
|
3122
|
+
handRaisedList = [],
|
3123
|
+
offStageRoles,
|
3124
|
+
isLargeRoom,
|
3125
|
+
onActive
|
3126
|
+
}) => {
|
3104
3127
|
return /* @__PURE__ */ React37.createElement(
|
3105
3128
|
Flex,
|
3106
3129
|
{
|
@@ -3114,30 +3137,32 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
3114
3137
|
flex: "1 1 0"
|
3115
3138
|
}
|
3116
3139
|
},
|
3117
|
-
handRaisedList.length > 0 ? /* @__PURE__ */ React37.createElement(
|
3140
|
+
/* @__PURE__ */ React37.createElement(Accordion.Root, { type: isLargeRoom ? "single" : "multiple", collapsible: true }, handRaisedList.length > 0 ? /* @__PURE__ */ React37.createElement(
|
3118
3141
|
RoleAccordion,
|
3119
3142
|
{
|
3120
3143
|
peerList: handRaisedList,
|
3121
3144
|
roleName: "Hand Raised",
|
3122
3145
|
filter,
|
3123
3146
|
isConnected,
|
3124
|
-
isHandRaisedAccordion: true
|
3147
|
+
isHandRaisedAccordion: true,
|
3148
|
+
offStageRoles
|
3125
3149
|
}
|
3126
|
-
) : null,
|
3127
|
-
Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */ React37.createElement(
|
3150
|
+
) : null, Object.keys(peersOrderedByRoles).map((role) => /* @__PURE__ */ React37.createElement(
|
3128
3151
|
RoleAccordion,
|
3129
3152
|
{
|
3130
3153
|
key: role,
|
3131
3154
|
peerList: peersOrderedByRoles[role],
|
3132
3155
|
roleName: role,
|
3133
3156
|
isConnected,
|
3134
|
-
filter
|
3157
|
+
filter,
|
3158
|
+
offStageRoles,
|
3159
|
+
onActive
|
3135
3160
|
}
|
3136
|
-
))
|
3161
|
+
)))
|
3137
3162
|
);
|
3138
3163
|
};
|
3139
3164
|
var Participant = ({ peer, isConnected }) => {
|
3140
|
-
const localPeerId =
|
3165
|
+
const localPeerId = useHMSStore17(selectLocalPeerID4);
|
3141
3166
|
return /* @__PURE__ */ React37.createElement(
|
3142
3167
|
Flex,
|
3143
3168
|
{
|
@@ -3153,19 +3178,28 @@ var Participant = ({ peer, isConnected }) => {
|
|
3153
3178
|
justify: "between",
|
3154
3179
|
"data-testid": "participant_" + peer.name
|
3155
3180
|
},
|
3156
|
-
/* @__PURE__ */ React37.createElement(
|
3181
|
+
/* @__PURE__ */ React37.createElement(
|
3182
|
+
Text,
|
3183
|
+
{
|
3184
|
+
variant: "sm",
|
3185
|
+
css: __spreadProps(__spreadValues({}, textEllipsis("100%")), { flex: "1 1 0", mr: "$8", fontWeight: "$semiBold", color: "$on_surface_high" })
|
3186
|
+
},
|
3187
|
+
peer.name,
|
3188
|
+
" ",
|
3189
|
+
localPeerId === peer.id ? "(You)" : ""
|
3190
|
+
),
|
3157
3191
|
isConnected ? /* @__PURE__ */ React37.createElement(ParticipantActions, { peerId: peer.id, isLocal: peer.id === localPeerId, role: peer.roleName }) : null
|
3158
3192
|
);
|
3159
3193
|
};
|
3160
3194
|
var ParticipantActions = React37.memo(({ peerId, role, isLocal }) => {
|
3161
3195
|
var _a, _b;
|
3162
|
-
const isHandRaised =
|
3163
|
-
const canChangeRole = (_a =
|
3164
|
-
const canRemoveOthers = (_b =
|
3196
|
+
const isHandRaised = useHMSStore17(selectHasPeerHandRaised(peerId));
|
3197
|
+
const canChangeRole = (_a = useHMSStore17(selectPermissions8)) == null ? void 0 : _a.changeRole;
|
3198
|
+
const canRemoveOthers = (_b = useHMSStore17(selectPermissions8)) == null ? void 0 : _b.removeOthers;
|
3165
3199
|
const { elements } = useRoomLayoutConferencingScreen();
|
3166
3200
|
const { on_stage_exp } = elements || {};
|
3167
3201
|
const shouldShowMoreActions = on_stage_exp && canChangeRole || canRemoveOthers;
|
3168
|
-
const isAudioMuted = !
|
3202
|
+
const isAudioMuted = !useHMSStore17(selectIsPeerAudioEnabled(peerId));
|
3169
3203
|
return /* @__PURE__ */ React37.createElement(
|
3170
3204
|
Flex,
|
3171
3205
|
{
|
@@ -3208,7 +3242,7 @@ var ParticipantActions = React37.memo(({ peerId, role, isLocal }) => {
|
|
3208
3242
|
});
|
3209
3243
|
var ParticipantMoreActions = ({ peerId, role, elements, canChangeRole, canRemoveOthers }) => {
|
3210
3244
|
var _a;
|
3211
|
-
const hmsActions =
|
3245
|
+
const hmsActions = useHMSActions12();
|
3212
3246
|
const {
|
3213
3247
|
bring_to_stage_label,
|
3214
3248
|
remove_from_stage_label,
|
@@ -3217,10 +3251,10 @@ var ParticipantMoreActions = ({ peerId, role, elements, canChangeRole, canRemove
|
|
3217
3251
|
} = elements.on_stage_exp || {};
|
3218
3252
|
const isInStage = role === on_stage_role;
|
3219
3253
|
const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
|
3220
|
-
const prevRole = (_a =
|
3221
|
-
const localPeerId =
|
3254
|
+
const prevRole = (_a = useHMSStore17(selectPeerMetadata(peerId))) == null ? void 0 : _a.prevRole;
|
3255
|
+
const localPeerId = useHMSStore17(selectLocalPeerID4);
|
3222
3256
|
const isLocal = localPeerId === peerId;
|
3223
|
-
const [open, setOpen] =
|
3257
|
+
const [open, setOpen] = useState19(false);
|
3224
3258
|
const handleStageAction = () => __async(void 0, null, function* () {
|
3225
3259
|
if (isInStage) {
|
3226
3260
|
prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);
|
@@ -3294,7 +3328,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3294
3328
|
{
|
3295
3329
|
type: "text",
|
3296
3330
|
placeholder: placeholder || "Search for participants",
|
3297
|
-
css: { w: "100%", p: "$6", pl: "$
|
3331
|
+
css: { w: "100%", p: "$6", pl: "$14", bg: inSidePane ? "$surface_default" : "$surface_dim" },
|
3298
3332
|
value,
|
3299
3333
|
onKeyDown: (event) => {
|
3300
3334
|
event.stopPropagation();
|
@@ -3310,7 +3344,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3310
3344
|
};
|
3311
3345
|
|
3312
3346
|
// src/Prebuilt/components/Footer/Footer.tsx
|
3313
|
-
var VirtualBackground = React38.lazy(() => import("./VirtualBackground-
|
3347
|
+
var VirtualBackground = React38.lazy(() => import("./VirtualBackground-UVZJVOA2.js"));
|
3314
3348
|
var Footer2 = ({
|
3315
3349
|
screenType,
|
3316
3350
|
elements
|
@@ -3374,14 +3408,14 @@ var Footer2 = ({
|
|
3374
3408
|
};
|
3375
3409
|
|
3376
3410
|
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
3377
|
-
import React39, { useCallback as
|
3378
|
-
import { selectHLSState as selectHLSState2, useHMSActions as
|
3411
|
+
import React39, { useCallback as useCallback7, useState as useState20 } from "react";
|
3412
|
+
import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions13, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
3379
3413
|
function HLSFailureModal() {
|
3380
|
-
const { hlsError } =
|
3381
|
-
const [openModal, setOpenModal] =
|
3382
|
-
const hmsActions =
|
3414
|
+
const { hlsError } = useHMSStore18(selectHLSState2).error || false;
|
3415
|
+
const [openModal, setOpenModal] = useState20(!!hlsError);
|
3416
|
+
const hmsActions = useHMSActions13();
|
3383
3417
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
3384
|
-
const startHLS =
|
3418
|
+
const startHLS = useCallback7(() => __async(this, null, function* () {
|
3385
3419
|
try {
|
3386
3420
|
if (isHLSStarted) {
|
3387
3421
|
return;
|
@@ -3429,8 +3463,8 @@ import {
|
|
3429
3463
|
selectLocalPeerRoleName,
|
3430
3464
|
selectRoleChangeRequest,
|
3431
3465
|
useCustomEvent as useCustomEvent2,
|
3432
|
-
useHMSActions as
|
3433
|
-
useHMSStore as
|
3466
|
+
useHMSActions as useHMSActions14,
|
3467
|
+
useHMSStore as useHMSStore19
|
3434
3468
|
} from "@100mslive/react-sdk";
|
3435
3469
|
|
3436
3470
|
// src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx
|
@@ -3454,11 +3488,11 @@ var RequestActions = ({ onAction, actionText }) => /* @__PURE__ */ React40.creat
|
|
3454
3488
|
|
3455
3489
|
// src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
|
3456
3490
|
var RoleChangeRequestModal = () => {
|
3457
|
-
const hmsActions =
|
3491
|
+
const hmsActions = useHMSActions14();
|
3458
3492
|
const { updateMetaData } = useMyMetadata();
|
3459
|
-
const currentRole =
|
3460
|
-
const roleChangeRequest =
|
3461
|
-
const name =
|
3493
|
+
const currentRole = useHMSStore19(selectLocalPeerRoleName);
|
3494
|
+
const roleChangeRequest = useHMSStore19(selectRoleChangeRequest);
|
3495
|
+
const name = useHMSStore19(selectLocalPeerName2);
|
3462
3496
|
const { sendEvent } = useCustomEvent2({ type: ROLE_CHANGE_DECLINED });
|
3463
3497
|
useEffect9(() => {
|
3464
3498
|
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
@@ -3522,27 +3556,27 @@ var RoleChangeRequestModal = () => {
|
|
3522
3556
|
};
|
3523
3557
|
|
3524
3558
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
3525
|
-
import
|
3526
|
-
import { selectIsConnectedToRoom as
|
3559
|
+
import React68, { Suspense as Suspense2, useEffect as useEffect27 } from "react";
|
3560
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom7, selectLocalPeerRoleName as selectLocalPeerRoleName3, useHMSActions as useHMSActions23, useHMSStore as useHMSStore40 } from "@100mslive/react-sdk";
|
3527
3561
|
|
3528
3562
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
3529
|
-
import React56, { useEffect as useEffect17, useMemo as
|
3530
|
-
import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as
|
3563
|
+
import React56, { useEffect as useEffect17, useMemo as useMemo6, useState as useState29 } from "react";
|
3564
|
+
import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as useHMSStore28, useHMSVanillaStore as useHMSVanillaStore4 } from "@100mslive/react-sdk";
|
3531
3565
|
|
3532
3566
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3533
|
-
import React49, { useEffect as useEffect13, useMemo as
|
3567
|
+
import React49, { useEffect as useEffect13, useMemo as useMemo3, useState as useState24 } from "react";
|
3534
3568
|
import { useMedia as useMedia13 } from "react-use";
|
3535
|
-
import { selectLocalPeer as selectLocalPeer2, useHMSStore as
|
3569
|
+
import { selectLocalPeer as selectLocalPeer2, useHMSStore as useHMSStore24 } from "@100mslive/react-sdk";
|
3536
3570
|
|
3537
3571
|
// src/Prebuilt/components/InsetTile.tsx
|
3538
|
-
import React46, { useEffect as useEffect10, useRef as
|
3572
|
+
import React46, { useEffect as useEffect10, useRef as useRef7 } from "react";
|
3539
3573
|
import Draggable from "react-draggable";
|
3540
3574
|
import { useMedia as useMedia11 } from "react-use";
|
3541
|
-
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID as selectVideoTrackByID2, useHMSStore as
|
3575
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID as selectVideoTrackByID2, useHMSStore as useHMSStore23 } from "@100mslive/react-sdk";
|
3542
3576
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
3543
3577
|
|
3544
3578
|
// src/Prebuilt/components/VideoTile.jsx
|
3545
|
-
import React44, { Fragment as Fragment9, useCallback as
|
3579
|
+
import React44, { Fragment as Fragment9, useCallback as useCallback8, useRef as useRef6, useState as useState22 } from "react";
|
3546
3580
|
import { useMedia as useMedia10 } from "react-use";
|
3547
3581
|
import {
|
3548
3582
|
selectAudioTrackByPeerID,
|
@@ -3554,12 +3588,12 @@ import {
|
|
3554
3588
|
selectSessionStore as selectSessionStore2,
|
3555
3589
|
selectVideoTrackByID,
|
3556
3590
|
selectVideoTrackByPeerID as selectVideoTrackByPeerID2,
|
3557
|
-
useHMSStore as
|
3591
|
+
useHMSStore as useHMSStore22
|
3558
3592
|
} from "@100mslive/react-sdk";
|
3559
3593
|
import { BrbTileIcon, HandIcon as HandIcon4, MicOffIcon as MicOffIcon5 } from "@100mslive/react-icons";
|
3560
3594
|
|
3561
3595
|
// src/Prebuilt/components/TileMenu/TileMenu.jsx
|
3562
|
-
import React43, { useState as
|
3596
|
+
import React43, { useState as useState21 } from "react";
|
3563
3597
|
import { useMedia as useMedia9 } from "react-use";
|
3564
3598
|
import {
|
3565
3599
|
selectLocalPeerID as selectLocalPeerID5,
|
@@ -3567,7 +3601,7 @@ import {
|
|
3567
3601
|
selectPermissions as selectPermissions10,
|
3568
3602
|
selectTrackByID as selectTrackByID2,
|
3569
3603
|
selectVideoTrackByPeerID,
|
3570
|
-
useHMSStore as
|
3604
|
+
useHMSStore as useHMSStore21,
|
3571
3605
|
useRemoteAVToggle as useRemoteAVToggle2
|
3572
3606
|
} from "@100mslive/react-sdk";
|
3573
3607
|
import { CrossIcon as CrossIcon6, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
|
@@ -3580,8 +3614,8 @@ import {
|
|
3580
3614
|
selectSessionStore,
|
3581
3615
|
selectTrackByID,
|
3582
3616
|
useCustomEvent as useCustomEvent3,
|
3583
|
-
useHMSActions as
|
3584
|
-
useHMSStore as
|
3617
|
+
useHMSActions as useHMSActions15,
|
3618
|
+
useHMSStore as useHMSStore20,
|
3585
3619
|
useRemoteAVToggle
|
3586
3620
|
} from "@100mslive/react-sdk";
|
3587
3621
|
import {
|
@@ -3605,8 +3639,8 @@ var SpotlightActions = ({
|
|
3605
3639
|
return;
|
3606
3640
|
}
|
3607
3641
|
}) => {
|
3608
|
-
const hmsActions =
|
3609
|
-
const spotlightPeerId =
|
3642
|
+
const hmsActions = useHMSActions15();
|
3643
|
+
const spotlightPeerId = useHMSStore20(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
|
3610
3644
|
const isTileSpotlighted = spotlightPeerId === peerId;
|
3611
3645
|
const setSpotlightPeerId = (peer) => hmsActions.sessionStore.set(SESSION_STORE_KEY.SPOTLIGHT, peer).catch((err) => ToastManager.addToast({ title: err.description }));
|
3612
3646
|
return /* @__PURE__ */ React42.createElement(
|
@@ -3649,8 +3683,8 @@ var MinimiseInset = () => {
|
|
3649
3683
|
};
|
3650
3684
|
var SimulcastLayers = ({ trackId }) => {
|
3651
3685
|
var _a;
|
3652
|
-
const track =
|
3653
|
-
const actions =
|
3686
|
+
const track = useHMSStore20(selectTrackByID(trackId));
|
3687
|
+
const actions = useHMSActions15();
|
3654
3688
|
const bg = useDropdownSelection();
|
3655
3689
|
if (!((_a = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _a.length) || track.degraded || !track.enabled) {
|
3656
3690
|
return null;
|
@@ -3715,8 +3749,8 @@ var SimulcastLayers = ({ trackId }) => {
|
|
3715
3749
|
))));
|
3716
3750
|
};
|
3717
3751
|
var TileMenuContent = (props) => {
|
3718
|
-
const actions =
|
3719
|
-
const { removeOthers } =
|
3752
|
+
const actions = useHMSActions15();
|
3753
|
+
const { removeOthers } = useHMSStore20(selectPermissions9);
|
3720
3754
|
const {
|
3721
3755
|
videoTrackID,
|
3722
3756
|
audioTrackID,
|
@@ -3814,20 +3848,20 @@ var TileMenu = ({
|
|
3814
3848
|
enableSpotlightingPeer = true
|
3815
3849
|
}) => {
|
3816
3850
|
var _a, _b;
|
3817
|
-
const [open, setOpen] =
|
3851
|
+
const [open, setOpen] = useState21(false);
|
3818
3852
|
const { theme } = useTheme();
|
3819
|
-
const localPeerID =
|
3853
|
+
const localPeerID = useHMSStore21(selectLocalPeerID5);
|
3820
3854
|
const isLocal = localPeerID === peerID;
|
3821
|
-
const { removeOthers } =
|
3855
|
+
const { removeOthers } = useHMSStore21(selectPermissions10);
|
3822
3856
|
const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle2(audioTrackID, videoTrackID);
|
3823
3857
|
const showSpotlight = enableSpotlightingPeer;
|
3824
|
-
const isPrimaryVideoTrack = ((_a =
|
3858
|
+
const isPrimaryVideoTrack = ((_a = useHMSStore21(selectVideoTrackByPeerID(peerID))) == null ? void 0 : _a.id) === videoTrackID;
|
3825
3859
|
const showPinAction = audioTrackID || videoTrackID && isPrimaryVideoTrack;
|
3826
|
-
const track =
|
3860
|
+
const track = useHMSStore21(selectTrackByID2(videoTrackID));
|
3827
3861
|
const hideSimulcastLayers = !((_b = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _b.length) || track.degraded || !track.enabled;
|
3828
3862
|
const isMobile = useMedia9(config.media.md);
|
3829
|
-
const peer =
|
3830
|
-
const [showNameChangeModal, setShowNameChangeModal] =
|
3863
|
+
const peer = useHMSStore21(selectPeerByID2(peerID));
|
3864
|
+
const [showNameChangeModal, setShowNameChangeModal] = useState21(false);
|
3831
3865
|
useDropdownList({ open, name: "TileMenu" });
|
3832
3866
|
if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {
|
3833
3867
|
return null;
|
@@ -3900,6 +3934,7 @@ var getVideoTileLabel = ({ peerName, isLocal, track }) => {
|
|
3900
3934
|
};
|
3901
3935
|
|
3902
3936
|
// src/Prebuilt/components/VideoTile.jsx
|
3937
|
+
var iconDims = { height: "1rem", width: "1rem" };
|
3903
3938
|
var Tile = ({
|
3904
3939
|
peerId,
|
3905
3940
|
trackId,
|
@@ -3918,17 +3953,17 @@ var Tile = ({
|
|
3918
3953
|
}) => {
|
3919
3954
|
var _a, _b;
|
3920
3955
|
const trackSelector = trackId ? selectVideoTrackByID(trackId) : selectVideoTrackByPeerID2(peerId);
|
3921
|
-
const track =
|
3956
|
+
const track = useHMSStore22(trackSelector);
|
3922
3957
|
const isMobile = useMedia10(config.media.md);
|
3923
|
-
const peerName =
|
3924
|
-
const audioTrack =
|
3925
|
-
const localPeerID =
|
3958
|
+
const peerName = useHMSStore22(selectPeerNameByID(peerId));
|
3959
|
+
const audioTrack = useHMSStore22(selectAudioTrackByPeerID(peerId));
|
3960
|
+
const localPeerID = useHMSStore22(selectLocalPeerID6);
|
3926
3961
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
3927
3962
|
const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
|
3928
3963
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
3929
|
-
const isAudioMuted = !
|
3964
|
+
const isAudioMuted = !useHMSStore22(selectIsPeerAudioEnabled2(peerId));
|
3930
3965
|
const isVideoMuted = !(track == null ? void 0 : track.enabled);
|
3931
|
-
const [isMouseHovered, setIsMouseHovered] =
|
3966
|
+
const [isMouseHovered, setIsMouseHovered] = useState22(false);
|
3932
3967
|
const isVideoDegraded = track == null ? void 0 : track.degraded;
|
3933
3968
|
const isLocal = localPeerID === peerId;
|
3934
3969
|
const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);
|
@@ -3937,35 +3972,20 @@ var Tile = ({
|
|
3937
3972
|
videoTrackID: track == null ? void 0 : track.id,
|
3938
3973
|
audioTrackID: audioTrack == null ? void 0 : audioTrack.id
|
3939
3974
|
});
|
3940
|
-
const spotlighted =
|
3975
|
+
const spotlighted = useHMSStore22(selectSessionStore2(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;
|
3941
3976
|
const label = getVideoTileLabel({
|
3942
3977
|
peerName,
|
3943
3978
|
track,
|
3944
3979
|
isLocal
|
3945
3980
|
});
|
3946
|
-
const onHoverHandler =
|
3981
|
+
const onHoverHandler = useCallback8((event) => {
|
3947
3982
|
setIsMouseHovered(event.type === "mouseenter");
|
3948
3983
|
}, []);
|
3949
|
-
const ref =
|
3984
|
+
const ref = useRef6(null);
|
3950
3985
|
const calculatedHeight = ((_a = ref.current) == null ? void 0 : _a.clientHeight) || "";
|
3951
3986
|
const calculatedWidth = ((_b = ref.current) == null ? void 0 : _b.clientWidth) || "";
|
3952
3987
|
const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;
|
3953
|
-
const
|
3954
|
-
if (!calculatedWidth || !calculatedHeight) {
|
3955
|
-
return [void 0, void 0];
|
3956
|
-
}
|
3957
|
-
let avatarSize2 = "large";
|
3958
|
-
if (calculatedWidth <= 150 || calculatedHeight <= 150) {
|
3959
|
-
avatarSize2 = "small";
|
3960
|
-
} else if (calculatedWidth <= 300 || calculatedHeight <= 300) {
|
3961
|
-
avatarSize2 = "medium";
|
3962
|
-
}
|
3963
|
-
let attribBoxSize2 = "medium";
|
3964
|
-
if (calculatedWidth <= 180 || calculatedHeight <= 180) {
|
3965
|
-
attribBoxSize2 = "small";
|
3966
|
-
}
|
3967
|
-
return [avatarSize2, attribBoxSize2];
|
3968
|
-
}, [calculatedWidth, calculatedHeight]);
|
3988
|
+
const avatarSize = "medium";
|
3969
3989
|
return /* @__PURE__ */ React44.createElement(
|
3970
3990
|
StyledVideoTile.Root,
|
3971
3991
|
{
|
@@ -4001,7 +4021,7 @@ var Tile = ({
|
|
4001
4021
|
}
|
4002
4022
|
),
|
4003
4023
|
isVideoMuted || !isLocal && isAudioOnly ? /* @__PURE__ */ React44.createElement(StyledVideoTile.AvatarContainer, null, /* @__PURE__ */ React44.createElement(Avatar, { name: peerName || "", "data-testid": "participant_avatar_icon", size: avatarSize })) : null,
|
4004
|
-
!hideAudioMuteOnTile ? isAudioMuted ? /* @__PURE__ */ React44.createElement(
|
4024
|
+
!hideAudioMuteOnTile ? isAudioMuted ? /* @__PURE__ */ React44.createElement(PrebuiltAudioIndicator, { "data-testid": "participant_audio_mute_icon" }, /* @__PURE__ */ React44.createElement(MicOffIcon5, { style: iconDims })) : /* @__PURE__ */ React44.createElement(PrebuiltAudioIndicator, null, /* @__PURE__ */ React44.createElement(AudioLevel, { trackId: audioTrack == null ? void 0 : audioTrack.id })) : null,
|
4005
4025
|
isMouseHovered || isDragabble && isMobile ? /* @__PURE__ */ React44.createElement(
|
4006
4026
|
TileMenu_default,
|
4007
4027
|
{
|
@@ -4012,7 +4032,7 @@ var Tile = ({
|
|
4012
4032
|
enableSpotlightingPeer
|
4013
4033
|
}
|
4014
4034
|
) : null,
|
4015
|
-
!hideMetadataOnTile && /* @__PURE__ */ React44.createElement(PeerMetadata, { peerId
|
4035
|
+
!hideMetadataOnTile && /* @__PURE__ */ React44.createElement(PeerMetadata, { peerId }),
|
4016
4036
|
/* @__PURE__ */ React44.createElement(
|
4017
4037
|
TileConnection_default,
|
4018
4038
|
{
|
@@ -4028,11 +4048,11 @@ var Tile = ({
|
|
4028
4048
|
) : null
|
4029
4049
|
);
|
4030
4050
|
};
|
4031
|
-
var PeerMetadata = ({ peerId
|
4032
|
-
const metaData =
|
4051
|
+
var PeerMetadata = ({ peerId }) => {
|
4052
|
+
const metaData = useHMSStore22(selectPeerMetadata2(peerId));
|
4033
4053
|
const isBRB = (metaData == null ? void 0 : metaData.isBRBOn) || false;
|
4034
|
-
const isHandRaised =
|
4035
|
-
return /* @__PURE__ */ React44.createElement(Fragment9, null, isHandRaised ? /* @__PURE__ */ React44.createElement(
|
4054
|
+
const isHandRaised = useHMSStore22(selectHasPeerHandRaised2(peerId));
|
4055
|
+
return /* @__PURE__ */ React44.createElement(Fragment9, null, isHandRaised ? /* @__PURE__ */ React44.createElement(PrebuiltAttributeBox, { "data-testid": "raiseHand_icon_onTile" }, /* @__PURE__ */ React44.createElement(HandIcon4, { style: iconDims })) : null, isBRB ? /* @__PURE__ */ React44.createElement(PrebuiltAttributeBox, { "data-testid": "brb_icon_onTile" }, /* @__PURE__ */ React44.createElement(BrbTileIcon, { style: iconDims })) : null);
|
4036
4056
|
};
|
4037
4057
|
var VideoTile = React44.memo(Tile);
|
4038
4058
|
var VideoTile_default = VideoTile;
|
@@ -4072,10 +4092,10 @@ var desktopAspectRatio = 1 / defaultMobileAspectRatio;
|
|
4072
4092
|
var InsetTile = () => {
|
4073
4093
|
const isMobile = useMedia11(config.media.md);
|
4074
4094
|
const isLandscape = useMedia11(config.media.ls);
|
4075
|
-
const localPeer =
|
4095
|
+
const localPeer = useHMSStore23(selectLocalPeer);
|
4076
4096
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
4077
|
-
const videoTrack =
|
4078
|
-
const isAllowedToPublish =
|
4097
|
+
const videoTrack = useHMSStore23(selectVideoTrackByID2(localPeer == null ? void 0 : localPeer.videoTrack));
|
4098
|
+
const isAllowedToPublish = useHMSStore23(selectIsAllowedToPublish2);
|
4079
4099
|
const videoTileProps = useVideoTileContext();
|
4080
4100
|
let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;
|
4081
4101
|
if ((videoTrack == null ? void 0 : videoTrack.width) && (videoTrack == null ? void 0 : videoTrack.height) && !isMobile) {
|
@@ -4087,7 +4107,7 @@ var InsetTile = () => {
|
|
4087
4107
|
width = 240;
|
4088
4108
|
height = width / aspectRatio;
|
4089
4109
|
}
|
4090
|
-
const nodeRef =
|
4110
|
+
const nodeRef = useRef7(null);
|
4091
4111
|
useEffect10(() => {
|
4092
4112
|
const node = nodeRef.current;
|
4093
4113
|
if (!node || !window.ResizeObserver) {
|
@@ -4148,7 +4168,7 @@ var InsetTile = () => {
|
|
4148
4168
|
|
4149
4169
|
// src/Prebuilt/components/Pagination.tsx
|
4150
4170
|
import React47, { useEffect as useEffect11 } from "react";
|
4151
|
-
import { ChevronLeftIcon as ChevronLeftIcon3, ChevronRightIcon as
|
4171
|
+
import { ChevronLeftIcon as ChevronLeftIcon3, ChevronRightIcon as ChevronRightIcon3 } from "@100mslive/react-icons";
|
4152
4172
|
var Pagination = ({
|
4153
4173
|
page,
|
4154
4174
|
onPageChange,
|
@@ -4182,7 +4202,7 @@ var Pagination = ({
|
|
4182
4202
|
onPageChange(i);
|
4183
4203
|
}
|
4184
4204
|
}
|
4185
|
-
))) : null, /* @__PURE__ */ React47.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React47.createElement(
|
4205
|
+
))) : null, /* @__PURE__ */ React47.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React47.createElement(ChevronRightIcon3, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
|
4186
4206
|
};
|
4187
4207
|
|
4188
4208
|
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
@@ -4226,7 +4246,7 @@ var Grid = React48.forwardRef(
|
|
4226
4246
|
);
|
4227
4247
|
|
4228
4248
|
// src/Prebuilt/components/hooks/useTileLayout.tsx
|
4229
|
-
import { useEffect as useEffect12, useMemo as
|
4249
|
+
import { useEffect as useEffect12, useMemo as useMemo2, useState as useState23 } from "react";
|
4230
4250
|
import { useMeasure as useMeasure2, useMedia as useMedia12 } from "react-use";
|
4231
4251
|
import {
|
4232
4252
|
getPeersWithTiles,
|
@@ -4237,12 +4257,12 @@ var aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4
|
|
4237
4257
|
var usePagesWithTiles = ({ peers, maxTileCount }) => {
|
4238
4258
|
const vanillaStore = useHMSVanillaStore3();
|
4239
4259
|
const tracksMap = vanillaStore.getState(selectTracksMap3);
|
4240
|
-
const peersWithTiles =
|
4260
|
+
const peersWithTiles = useMemo2(
|
4241
4261
|
() => getPeersWithTiles(peers, tracksMap, () => false),
|
4242
4262
|
[peers, tracksMap]
|
4243
4263
|
);
|
4244
4264
|
const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);
|
4245
|
-
const pagesList =
|
4265
|
+
const pagesList = useMemo2(() => {
|
4246
4266
|
let sliceStart = 0;
|
4247
4267
|
let remaining = peersWithTiles.length;
|
4248
4268
|
const list = [];
|
@@ -4264,7 +4284,7 @@ var useTileLayout = ({
|
|
4264
4284
|
const vanillaStore = useHMSVanillaStore3();
|
4265
4285
|
const [ref, { width, height }] = useMeasure2();
|
4266
4286
|
const isMobile = useMedia12(config.media.lg);
|
4267
|
-
const [pagesWithTiles, setPagesWithTiles] =
|
4287
|
+
const [pagesWithTiles, setPagesWithTiles] = useState23([]);
|
4268
4288
|
useEffect12(() => {
|
4269
4289
|
if (width === 0 || height === 0) {
|
4270
4290
|
return;
|
@@ -4332,7 +4352,7 @@ var useTileLayout = ({
|
|
4332
4352
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
4333
4353
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
4334
4354
|
var _a;
|
4335
|
-
const localPeer =
|
4355
|
+
const localPeer = useHMSStore24(selectLocalPeer2);
|
4336
4356
|
const isMobile = useMedia13(config.media.md);
|
4337
4357
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
4338
4358
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
@@ -4340,7 +4360,7 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
4340
4360
|
peers,
|
4341
4361
|
maxTileCount
|
4342
4362
|
});
|
4343
|
-
const inputPeers =
|
4363
|
+
const inputPeers = useMemo3(
|
4344
4364
|
() => pageList.length === 0 ? localPeer ? [localPeer] : [] : peers,
|
4345
4365
|
[pageList.length, peers, localPeer]
|
4346
4366
|
);
|
@@ -4353,7 +4373,7 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
4353
4373
|
maxTileCount,
|
4354
4374
|
edgeToEdge
|
4355
4375
|
});
|
4356
|
-
const [page, setPage] =
|
4376
|
+
const [page, setPage] = useState24(0);
|
4357
4377
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
4358
4378
|
useEffect13(() => {
|
4359
4379
|
if (pageSize > 0) {
|
@@ -4374,11 +4394,11 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
4374
4394
|
}
|
4375
4395
|
|
4376
4396
|
// src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
|
4377
|
-
import React52, { useEffect as useEffect15, useState as
|
4378
|
-
import { selectLocalPeer as selectLocalPeer3, useHMSStore as
|
4397
|
+
import React52, { useEffect as useEffect15, useState as useState26 } from "react";
|
4398
|
+
import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore25 } from "@100mslive/react-sdk";
|
4379
4399
|
|
4380
4400
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
4381
|
-
import React51, { useEffect as useEffect14, useState as
|
4401
|
+
import React51, { useEffect as useEffect14, useState as useState25 } from "react";
|
4382
4402
|
import { useMedia as useMedia14 } from "react-use";
|
4383
4403
|
|
4384
4404
|
// src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
|
@@ -4450,7 +4470,7 @@ var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
4450
4470
|
const isMobile = useMedia14(config.media.md);
|
4451
4471
|
const maxTileCount = isMobile ? 2 : 4;
|
4452
4472
|
const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });
|
4453
|
-
const [page, setPage] =
|
4473
|
+
const [page, setPage] = useState25(0);
|
4454
4474
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
4455
4475
|
useEffect14(() => {
|
4456
4476
|
if (pageSize > 0) {
|
@@ -4471,10 +4491,10 @@ var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
4471
4491
|
};
|
4472
4492
|
|
4473
4493
|
// src/Prebuilt/components/hooks/useRoleProminencePeers.tsx
|
4474
|
-
import { useMemo as
|
4494
|
+
import { useMemo as useMemo4 } from "react";
|
4475
4495
|
var useRoleProminencePeers = (prominentRoles, peers, isInsetEnabled) => {
|
4476
4496
|
const pinnedTrack = usePinnedTrack();
|
4477
|
-
const [prominentPeers, secondaryPeers] =
|
4497
|
+
const [prominentPeers, secondaryPeers] = useMemo4(() => {
|
4478
4498
|
return peers.reduce(
|
4479
4499
|
(acc, peer) => {
|
4480
4500
|
if (pinnedTrack) {
|
@@ -4515,7 +4535,7 @@ function RoleProminence({
|
|
4515
4535
|
}) {
|
4516
4536
|
var _a;
|
4517
4537
|
const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);
|
4518
|
-
const localPeer =
|
4538
|
+
const localPeer = useHMSStore25(selectLocalPeer3);
|
4519
4539
|
const maxTileCount = 4;
|
4520
4540
|
const pageList = usePagesWithTiles({
|
4521
4541
|
peers: prominentPeers,
|
@@ -4525,7 +4545,7 @@ function RoleProminence({
|
|
4525
4545
|
pageList,
|
4526
4546
|
maxTileCount
|
4527
4547
|
});
|
4528
|
-
const [page, setPage] =
|
4548
|
+
const [page, setPage] = useState26(0);
|
4529
4549
|
const pageSize = ((_a = pagesWithTiles[0]) == null ? void 0 : _a.length) || 0;
|
4530
4550
|
useEffect15(() => {
|
4531
4551
|
if (pageSize > 0) {
|
@@ -4546,12 +4566,12 @@ function RoleProminence({
|
|
4546
4566
|
}
|
4547
4567
|
|
4548
4568
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
4549
|
-
import React55, { useEffect as useEffect16, useMemo as
|
4569
|
+
import React55, { useEffect as useEffect16, useMemo as useMemo5, useState as useState28 } from "react";
|
4550
4570
|
import { useMedia as useMedia15 } from "react-use";
|
4551
|
-
import { selectPeersScreenSharing, useHMSStore as
|
4571
|
+
import { selectPeersScreenSharing, useHMSStore as useHMSStore27 } from "@100mslive/react-sdk";
|
4552
4572
|
|
4553
4573
|
// src/Prebuilt/components/ScreenshareTile.jsx
|
4554
|
-
import React54, { useRef as
|
4574
|
+
import React54, { useRef as useRef8, useState as useState27 } from "react";
|
4555
4575
|
import { useFullscreen as useFullscreen2 } from "react-use";
|
4556
4576
|
import screenfull2 from "screenfull";
|
4557
4577
|
import {
|
@@ -4559,16 +4579,16 @@ import {
|
|
4559
4579
|
selectPeerByID as selectPeerByID3,
|
4560
4580
|
selectScreenShareAudioByPeerID,
|
4561
4581
|
selectScreenShareByPeerID,
|
4562
|
-
useHMSStore as
|
4582
|
+
useHMSStore as useHMSStore26
|
4563
4583
|
} from "@100mslive/react-sdk";
|
4564
4584
|
import { ExpandIcon as ExpandIcon3, ShrinkIcon as ShrinkIcon2 } from "@100mslive/react-icons";
|
4565
4585
|
|
4566
4586
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
4567
4587
|
import React53 from "react";
|
4568
|
-
import { useHMSActions as
|
4588
|
+
import { useHMSActions as useHMSActions16 } from "@100mslive/react-sdk";
|
4569
4589
|
import { CrossIcon as CrossIcon7, ShareScreenIcon as ShareScreenIcon3 } from "@100mslive/react-icons";
|
4570
4590
|
var ScreenshareDisplay = () => {
|
4571
|
-
const hmsActions =
|
4591
|
+
const hmsActions = useHMSActions16();
|
4572
4592
|
return /* @__PURE__ */ React53.createElement(
|
4573
4593
|
Flex,
|
4574
4594
|
{
|
@@ -4609,19 +4629,19 @@ var labelStyles = {
|
|
4609
4629
|
flexShrink: 0
|
4610
4630
|
};
|
4611
4631
|
var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
4612
|
-
const isLocal =
|
4613
|
-
const track =
|
4614
|
-
const peer =
|
4632
|
+
const isLocal = useHMSStore26(selectLocalPeerID7) === peerId;
|
4633
|
+
const track = useHMSStore26(selectScreenShareByPeerID(peerId));
|
4634
|
+
const peer = useHMSStore26(selectPeerByID3(peerId));
|
4615
4635
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
4616
|
-
const [isMouseHovered, setIsMouseHovered] =
|
4636
|
+
const [isMouseHovered, setIsMouseHovered] = useState27(false);
|
4617
4637
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
4618
|
-
const fullscreenRef =
|
4619
|
-
const [fullscreen, setFullscreen] =
|
4638
|
+
const fullscreenRef = useRef8(null);
|
4639
|
+
const [fullscreen, setFullscreen] = useState27(false);
|
4620
4640
|
const isFullscreen = useFullscreen2(fullscreenRef, fullscreen, {
|
4621
4641
|
onClose: () => setFullscreen(false)
|
4622
4642
|
});
|
4623
4643
|
const isFullScreenSupported = screenfull2.isEnabled;
|
4624
|
-
const audioTrack =
|
4644
|
+
const audioTrack = useHMSStore26(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
|
4625
4645
|
if (isLocal && !["browser", "window", "application"].includes(track == null ? void 0 : track.displaySurface)) {
|
4626
4646
|
return /* @__PURE__ */ React54.createElement(ScreenshareDisplay, null);
|
4627
4647
|
}
|
@@ -4675,12 +4695,12 @@ var ScreenshareTile_default = ScreenshareTile;
|
|
4675
4695
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
4676
4696
|
var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
4677
4697
|
var _a;
|
4678
|
-
const peersSharing =
|
4698
|
+
const peersSharing = useHMSStore27(selectPeersScreenSharing);
|
4679
4699
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
4680
|
-
const [page, setPage] =
|
4700
|
+
const [page, setPage] = useState28(0);
|
4681
4701
|
const activeSharePeer = peersSharing[page];
|
4682
4702
|
const isMobile = useMedia15(config.media.md);
|
4683
|
-
const secondaryPeers =
|
4703
|
+
const secondaryPeers = useMemo5(
|
4684
4704
|
() => isMobile ? activeSharePeer ? [activeSharePeer, ...peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id))] : peers : peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id)),
|
4685
4705
|
[activeSharePeer, peers, isMobile]
|
4686
4706
|
);
|
@@ -4795,23 +4815,23 @@ var GridLayout = ({
|
|
4795
4815
|
edge_to_edge = false,
|
4796
4816
|
hide_metadata_on_tile = false
|
4797
4817
|
}) => {
|
4798
|
-
const peerSharing =
|
4818
|
+
const peerSharing = useHMSStore28(selectPeerScreenSharing);
|
4799
4819
|
const pinnedTrack = usePinnedTrack();
|
4800
|
-
const peers =
|
4820
|
+
const peers = useHMSStore28(selectPeers2);
|
4801
4821
|
const isRoleProminence = prominentRoles.length && peers.some(
|
4802
4822
|
(peer) => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack)
|
4803
4823
|
) || pinnedTrack;
|
4804
|
-
const updatedPeers =
|
4824
|
+
const updatedPeers = useMemo6(() => {
|
4805
4825
|
if (isInsetEnabled && !isRoleProminence && !peerSharing) {
|
4806
4826
|
return peers.filter((peer) => !peer.isLocal);
|
4807
4827
|
}
|
4808
4828
|
return peers;
|
4809
4829
|
}, [isInsetEnabled, isRoleProminence, peerSharing, peers]);
|
4810
4830
|
const vanillaStore = useHMSVanillaStore4();
|
4811
|
-
const [sortedPeers, setSortedPeers] =
|
4812
|
-
const peersSorter =
|
4813
|
-
const [pageSize, setPageSize] =
|
4814
|
-
const [mainPage, setMainPage] =
|
4831
|
+
const [sortedPeers, setSortedPeers] = useState29(updatedPeers);
|
4832
|
+
const peersSorter = useMemo6(() => new PeersSorter_default(vanillaStore), [vanillaStore]);
|
4833
|
+
const [pageSize, setPageSize] = useState29(0);
|
4834
|
+
const [mainPage, setMainPage] = useState29(0);
|
4815
4835
|
const tileLayout = {
|
4816
4836
|
enableSpotlightingPeer: enable_spotlighting_peer,
|
4817
4837
|
hideParticipantNameOnTile: hide_participant_name_on_tile,
|
@@ -4866,22 +4886,22 @@ var GridLayout = ({
|
|
4866
4886
|
};
|
4867
4887
|
|
4868
4888
|
// src/Prebuilt/layouts/EmbedView.jsx
|
4869
|
-
import React57, { useCallback as
|
4889
|
+
import React57, { useCallback as useCallback9, useEffect as useEffect18, useMemo as useMemo7, useRef as useRef9, useState as useState30 } from "react";
|
4870
4890
|
import {
|
4871
4891
|
selectPeers as selectPeers3,
|
4872
4892
|
selectPeerScreenSharing as selectPeerScreenSharing2,
|
4873
4893
|
throwErrorHandler,
|
4874
|
-
useHMSStore as
|
4894
|
+
useHMSStore as useHMSStore29,
|
4875
4895
|
useScreenShare as useScreenShare3
|
4876
4896
|
} from "@100mslive/react-sdk";
|
4877
4897
|
var EmbedView = () => {
|
4878
4898
|
return /* @__PURE__ */ React57.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React57.createElement(EmbedComponent, null));
|
4879
4899
|
};
|
4880
4900
|
var EmbebScreenShareView = ({ children }) => {
|
4881
|
-
const peers =
|
4882
|
-
const peerPresenting =
|
4901
|
+
const peers = useHMSStore29(selectPeers3);
|
4902
|
+
const peerPresenting = useHMSStore29(selectPeerScreenSharing2);
|
4883
4903
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
4884
|
-
const smallTilePeers =
|
4904
|
+
const smallTilePeers = useMemo7(() => {
|
4885
4905
|
const smallTilePeers2 = peers.filter((peer) => peer.id !== (peerPresenting == null ? void 0 : peerPresenting.id));
|
4886
4906
|
return smallTilePeers2;
|
4887
4907
|
}, [peers, peerPresenting]);
|
@@ -4896,11 +4916,11 @@ var EmbebScreenShareView = ({ children }) => {
|
|
4896
4916
|
var EmbedComponent = () => {
|
4897
4917
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare3(throwErrorHandler);
|
4898
4918
|
const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
|
4899
|
-
const [wasScreenShared, setWasScreenShared] =
|
4900
|
-
const screenShareAttemptInProgress =
|
4919
|
+
const [wasScreenShared, setWasScreenShared] = useState30(false);
|
4920
|
+
const screenShareAttemptInProgress = useRef9(false);
|
4901
4921
|
const src = embedConfig.url;
|
4902
|
-
const iframeRef =
|
4903
|
-
const resetEmbedConfig =
|
4922
|
+
const iframeRef = useRef9();
|
4923
|
+
const resetEmbedConfig = useCallback9(() => {
|
4904
4924
|
if (src) {
|
4905
4925
|
setEmbedConfig({ url: "" });
|
4906
4926
|
}
|
@@ -4942,25 +4962,25 @@ var EmbedComponent = () => {
|
|
4942
4962
|
};
|
4943
4963
|
|
4944
4964
|
// src/Prebuilt/layouts/PDFView.jsx
|
4945
|
-
import React58, { useCallback as
|
4965
|
+
import React58, { useCallback as useCallback10, useEffect as useEffect19, useRef as useRef10, useState as useState31 } from "react";
|
4946
4966
|
import { throwErrorHandler as throwErrorHandler2, useScreenShare as useScreenShare4 } from "@100mslive/react-sdk";
|
4947
4967
|
var PDFView = () => {
|
4948
4968
|
return /* @__PURE__ */ React58.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React58.createElement(PDFEmbedComponent, null));
|
4949
4969
|
};
|
4950
4970
|
var PDFEmbedComponent = () => {
|
4951
|
-
const ref =
|
4971
|
+
const ref = useRef10();
|
4952
4972
|
const themeType = useTheme().themeType;
|
4953
|
-
const [isPDFLoaded, setIsPDFLoaded] =
|
4973
|
+
const [isPDFLoaded, setIsPDFLoaded] = useState31(false);
|
4954
4974
|
let pdfJSURL = define_process_env_default.REACT_APP_PDFJS_IFRAME_URL;
|
4955
4975
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare4(throwErrorHandler2);
|
4956
4976
|
const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
|
4957
4977
|
if (pdfConfig.url && !pdfConfig.file) {
|
4958
4978
|
pdfJSURL = pdfJSURL + "?file=" + encodeURIComponent(pdfConfig.url);
|
4959
4979
|
}
|
4960
|
-
const [wasScreenShared, setWasScreenShared] =
|
4961
|
-
const screenShareAttemptInProgress =
|
4962
|
-
const iframeRef =
|
4963
|
-
const resetEmbedConfig =
|
4980
|
+
const [wasScreenShared, setWasScreenShared] = useState31(false);
|
4981
|
+
const screenShareAttemptInProgress = useRef10(false);
|
4982
|
+
const iframeRef = useRef10();
|
4983
|
+
const resetEmbedConfig = useCallback10(() => {
|
4964
4984
|
setPDFConfig({ state: false });
|
4965
4985
|
}, [setPDFConfig]);
|
4966
4986
|
useEffect19(() => {
|
@@ -5031,18 +5051,18 @@ var PDFEmbedComponent = () => {
|
|
5031
5051
|
};
|
5032
5052
|
|
5033
5053
|
// src/Prebuilt/layouts/SidePane.tsx
|
5034
|
-
import
|
5054
|
+
import React66 from "react";
|
5035
5055
|
import { useMedia as useMedia20 } from "react-use";
|
5036
|
-
import { selectAppData as selectAppData3, selectVideoTrackByPeerID as selectVideoTrackByPeerID3, useHMSStore as
|
5056
|
+
import { selectAppData as selectAppData3, selectVideoTrackByPeerID as selectVideoTrackByPeerID3, useHMSStore as useHMSStore39 } from "@100mslive/react-sdk";
|
5037
5057
|
|
5038
5058
|
// src/Prebuilt/components/SidePaneTabs.tsx
|
5039
|
-
import
|
5059
|
+
import React63, { useEffect as useEffect25, useState as useState36 } from "react";
|
5040
5060
|
import { useMedia as useMedia19 } from "react-use";
|
5041
|
-
import { selectPeerCount as selectPeerCount3, useHMSStore as
|
5042
|
-
import { CrossIcon as
|
5061
|
+
import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore36 } from "@100mslive/react-sdk";
|
5062
|
+
import { CrossIcon as CrossIcon10 } from "@100mslive/react-icons";
|
5043
5063
|
|
5044
5064
|
// src/Prebuilt/components/Chat/Chat.jsx
|
5045
|
-
import React61, { useCallback as
|
5065
|
+
import React61, { useCallback as useCallback15, useEffect as useEffect23, useRef as useRef14, useState as useState34 } from "react";
|
5046
5066
|
import { useMedia as useMedia18 } from "react-use";
|
5047
5067
|
import {
|
5048
5068
|
HMSNotificationTypes,
|
@@ -5050,14 +5070,14 @@ import {
|
|
5050
5070
|
selectPeerNameByID as selectPeerNameByID4,
|
5051
5071
|
selectPermissions as selectPermissions12,
|
5052
5072
|
selectSessionStore as selectSessionStore3,
|
5053
|
-
useHMSActions as
|
5073
|
+
useHMSActions as useHMSActions21,
|
5054
5074
|
useHMSNotifications,
|
5055
|
-
useHMSStore as
|
5075
|
+
useHMSStore as useHMSStore34
|
5056
5076
|
} from "@100mslive/react-sdk";
|
5057
5077
|
import { ChevronDownIcon as ChevronDownIcon2, CrossIcon as CrossIcon8, PinIcon as PinIcon3 } from "@100mslive/react-icons";
|
5058
5078
|
|
5059
5079
|
// src/Prebuilt/components/Chat/ChatBody.jsx
|
5060
|
-
import React59, { Fragment as Fragment10, useCallback as
|
5080
|
+
import React59, { Fragment as Fragment10, useCallback as useCallback12, useEffect as useEffect20, useLayoutEffect, useMemo as useMemo8, useRef as useRef11, useState as useState32 } from "react";
|
5061
5081
|
import { useInView } from "react-intersection-observer";
|
5062
5082
|
import { useMedia as useMedia16 } from "react-use";
|
5063
5083
|
import AutoSizer from "react-virtualized-auto-sizer";
|
@@ -5070,8 +5090,8 @@ import {
|
|
5070
5090
|
selectMessagesByRole,
|
5071
5091
|
selectPeerNameByID as selectPeerNameByID3,
|
5072
5092
|
selectPermissions as selectPermissions11,
|
5073
|
-
useHMSActions as
|
5074
|
-
useHMSStore as
|
5093
|
+
useHMSActions as useHMSActions18,
|
5094
|
+
useHMSStore as useHMSStore32
|
5075
5095
|
} from "@100mslive/react-sdk";
|
5076
5096
|
import { PinIcon as PinIcon2, VerticalMenuIcon as VerticalMenuIcon6 } from "@100mslive/react-icons";
|
5077
5097
|
|
@@ -5079,19 +5099,19 @@ import { PinIcon as PinIcon2, VerticalMenuIcon as VerticalMenuIcon6 } from "@100
|
|
5079
5099
|
var empty_chat_default = 'data:image/svg+xml,<svg width="184" height="133" viewBox="0 0 184 133" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M144.885 91.3998C145.318 91.023 145.861 90.7947 146.433 90.7483L146.446 90.7473L169.355 89.1614C169.702 89.1376 170.049 89.2101 170.358 89.3712C170.662 89.5305 170.918 89.7702 171.096 90.0642C171.098 90.0672 171.1 90.0703 171.102 90.0734L171.104 90.0766C171.281 90.3744 171.373 90.7154 171.369 91.062C171.365 91.4097 171.265 91.7496 171.08 92.044L158.85 111.504C158.539 111.986 158.081 112.356 157.544 112.56C157.007 112.764 156.419 112.791 155.866 112.636C155.313 112.482 154.823 112.155 154.469 111.703C154.115 111.25 153.915 110.697 153.898 110.123C153.898 110.109 153.898 110.094 153.898 110.08L153.996 100.307L145.347 95.7858C145.334 95.779 145.321 95.7721 145.308 95.7649C144.811 95.4785 144.417 95.0404 144.186 94.5146C143.955 93.9888 143.898 93.4029 144.024 92.8425C144.15 92.2821 144.451 91.7765 144.885 91.3998ZM167.441 91.0088L146.603 92.8952C146.49 92.9053 146.383 92.9508 146.298 93.0251C146.211 93.1005 146.151 93.2016 146.125 93.3137C146.1 93.4257 146.112 93.5429 146.158 93.6481C146.202 93.7484 146.276 93.8327 146.369 93.89L155.26 98.296L167.441 91.0088ZM156.32 100.171L168.547 92.8564L157.039 110.339C156.976 110.434 156.886 110.506 156.78 110.547C156.673 110.587 156.555 110.593 156.444 110.562C156.334 110.531 156.236 110.466 156.165 110.375C156.097 110.289 156.058 110.184 156.052 110.075L156.32 100.171Z" fill="%23444954"/>%0A<path d="M83.3248 35.4156C71.7182 47.1017 51.2098 75.5175 62.0292 95.6918C75.5536 120.91 140.453 79.2983 115.364 67.6657C90.2756 56.0331 65.8818 122.018 101.568 120.391C116.398 118.62 131.221 114.699 145.703 105.512" stroke="%23293042" stroke-width="2.25" stroke-dasharray="6 6"/>%0A<rect x="0.00256348" y="0.5" width="173.524" height="58.3398" rx="29.1699" fill="%23272A31"/>%0A<g opacity="0.4">%0A<rect x="24.7526" y="20.9312" width="111" height="4.5" rx="2.25" fill="%23444954"/>%0A</g>%0A<g opacity="0.4">%0A<rect x="38.2526" y="34.4312" width="110.25" height="4.5" rx="2.25" fill="%23444954"/>%0A</g>%0A<path d="M40.3918 71.5547L28.4246 55.0999L52.3589 55.0999L40.3918 71.5547Z" fill="%23272A31"/>%0A</svg>%0A';
|
5080
5100
|
|
5081
5101
|
// src/Prebuilt/components/hooks/useSetPinnedMessage.js
|
5082
|
-
import { useCallback as
|
5102
|
+
import { useCallback as useCallback11 } from "react";
|
5083
5103
|
import {
|
5084
5104
|
selectPeerNameByID as selectPeerNameByID2,
|
5085
5105
|
selectSessionMetadata,
|
5086
|
-
useHMSActions as
|
5087
|
-
useHMSStore as
|
5106
|
+
useHMSActions as useHMSActions17,
|
5107
|
+
useHMSStore as useHMSStore30,
|
5088
5108
|
useHMSVanillaStore as useHMSVanillaStore5
|
5089
5109
|
} from "@100mslive/react-sdk";
|
5090
5110
|
var useSetPinnedMessage = () => {
|
5091
|
-
const hmsActions =
|
5111
|
+
const hmsActions = useHMSActions17();
|
5092
5112
|
const vanillaStore = useHMSVanillaStore5();
|
5093
|
-
const pinnedMessage =
|
5094
|
-
const setPinnedMessage =
|
5113
|
+
const pinnedMessage = useHMSStore30(selectSessionMetadata);
|
5114
|
+
const setPinnedMessage = useCallback11(
|
5095
5115
|
/**
|
5096
5116
|
* @param {import("@100mslive/react-sdk").HMSMessage | undefined} message
|
5097
5117
|
*/
|
@@ -5112,11 +5132,11 @@ import {
|
|
5112
5132
|
selectMessagesUnreadCountByPeerID,
|
5113
5133
|
selectMessagesUnreadCountByRole,
|
5114
5134
|
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
|
5115
|
-
useHMSStore as
|
5135
|
+
useHMSStore as useHMSStore31
|
5116
5136
|
} from "@100mslive/react-sdk";
|
5117
5137
|
var useUnreadCount = ({ role, peerId }) => {
|
5118
5138
|
const unreadCountSelector = role ? selectMessagesUnreadCountByRole(role) : peerId ? selectMessagesUnreadCountByPeerID(peerId) : selectUnreadHMSMessagesCount2;
|
5119
|
-
const unreadCount =
|
5139
|
+
const unreadCount = useHMSStore31(unreadCountSelector);
|
5120
5140
|
return unreadCount;
|
5121
5141
|
};
|
5122
5142
|
|
@@ -5155,8 +5175,8 @@ var MessageTypeContainer = ({ left, right }) => {
|
|
5155
5175
|
);
|
5156
5176
|
};
|
5157
5177
|
var MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
5158
|
-
const peerName =
|
5159
|
-
const localPeerRoleName =
|
5178
|
+
const peerName = useHMSStore32(selectPeerNameByID3(receiver));
|
5179
|
+
const localPeerRoleName = useHMSStore32(selectLocalPeerRoleName2);
|
5160
5180
|
if (receiver) {
|
5161
5181
|
return /* @__PURE__ */ React59.createElement(
|
5162
5182
|
MessageTypeContainer,
|
@@ -5194,7 +5214,7 @@ var getMessageType = ({ roles, receiver }) => {
|
|
5194
5214
|
return receiver ? "private" : "";
|
5195
5215
|
};
|
5196
5216
|
var ChatActions = ({ onPin, showPinAction }) => {
|
5197
|
-
const [open, setOpen] =
|
5217
|
+
const [open, setOpen] = useState32(false);
|
5198
5218
|
if (!showPinAction) {
|
5199
5219
|
return null;
|
5200
5220
|
}
|
@@ -5221,7 +5241,7 @@ var ChatMessage = React59.memo(
|
|
5221
5241
|
({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {
|
5222
5242
|
var _a, _b;
|
5223
5243
|
const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });
|
5224
|
-
const rowRef =
|
5244
|
+
const rowRef = useRef11(null);
|
5225
5245
|
useEffect20(() => {
|
5226
5246
|
if (rowRef.current) {
|
5227
5247
|
setRowHeight(index, rowRef.current.clientHeight);
|
@@ -5230,9 +5250,9 @@ var ChatMessage = React59.memo(
|
|
5230
5250
|
const isMobile = useMedia16(config.media.md);
|
5231
5251
|
const { elements } = useRoomLayoutConferencingScreen();
|
5232
5252
|
const isOverlay = ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
5233
|
-
const hmsActions =
|
5234
|
-
const localPeerId =
|
5235
|
-
const permissions =
|
5253
|
+
const hmsActions = useHMSActions18();
|
5254
|
+
const localPeerId = useHMSStore32(selectLocalPeerID8);
|
5255
|
+
const permissions = useHMSStore32(selectPermissions11);
|
5236
5256
|
const messageType = getMessageType({
|
5237
5257
|
roles: message.recipientRoles,
|
5238
5258
|
receiver: message.recipientPeer
|
@@ -5367,11 +5387,11 @@ var ChatList = React59.forwardRef(
|
|
5367
5387
|
}
|
5368
5388
|
);
|
5369
5389
|
var VirtualizedChatMessages = React59.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {
|
5370
|
-
const rowHeights =
|
5390
|
+
const rowHeights = useRef11({});
|
5371
5391
|
function getRowHeight(index) {
|
5372
5392
|
return rowHeights.current[index] + 16 || 72;
|
5373
5393
|
}
|
5374
|
-
const setRowHeight =
|
5394
|
+
const setRowHeight = useCallback12(
|
5375
5395
|
(index, size) => {
|
5376
5396
|
listRef.current.resetAfterIndex(0);
|
5377
5397
|
rowHeights.current = __spreadProps(__spreadValues({}, rowHeights.current), { [index]: size });
|
@@ -5413,8 +5433,8 @@ var VirtualizedChatMessages = React59.forwardRef(({ messages, unreadCount = 0, s
|
|
5413
5433
|
var ChatBody = React59.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
|
5414
5434
|
var _a;
|
5415
5435
|
const storeMessageSelector = role ? selectMessagesByRole(role) : peerId ? selectMessagesByPeerID(peerId) : selectHMSMessages;
|
5416
|
-
let messages =
|
5417
|
-
messages =
|
5436
|
+
let messages = useHMSStore32(storeMessageSelector);
|
5437
|
+
messages = useMemo8(() => (messages == null ? void 0 : messages.filter((message) => message.type === "chat")) || [], [messages]);
|
5418
5438
|
const isMobile = useMedia16(config.media.md);
|
5419
5439
|
const { elements } = useRoomLayoutConferencingScreen();
|
5420
5440
|
const unreadCount = useUnreadCount({ role, peerId });
|
@@ -5453,23 +5473,23 @@ var ChatBody = React59.forwardRef(({ role, peerId, scrollToBottom }, listRef) =>
|
|
5453
5473
|
});
|
5454
5474
|
|
5455
5475
|
// src/Prebuilt/components/Chat/ChatFooter.tsx
|
5456
|
-
import React60, { useCallback as
|
5476
|
+
import React60, { useCallback as useCallback14, useEffect as useEffect22, useRef as useRef13, useState as useState33 } from "react";
|
5457
5477
|
import { useMedia as useMedia17 } from "react-use";
|
5458
5478
|
import data2 from "@emoji-mart/data";
|
5459
5479
|
import Picker from "@emoji-mart/react";
|
5460
|
-
import { useHMSActions as
|
5480
|
+
import { useHMSActions as useHMSActions20 } from "@100mslive/react-sdk";
|
5461
5481
|
import { EmojiIcon as EmojiIcon3, SendIcon } from "@100mslive/react-icons";
|
5462
5482
|
|
5463
5483
|
// src/Prebuilt/components/AppData/useChatState.js
|
5464
|
-
import { useCallback as
|
5465
|
-
import { selectAppData as selectAppData2, useHMSActions as
|
5484
|
+
import { useCallback as useCallback13 } from "react";
|
5485
|
+
import { selectAppData as selectAppData2, useHMSActions as useHMSActions19, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
|
5466
5486
|
var useChatDraftMessage = () => {
|
5467
|
-
const hmsActions =
|
5468
|
-
let chatDraftMessage =
|
5487
|
+
const hmsActions = useHMSActions19();
|
5488
|
+
let chatDraftMessage = useHMSStore33(selectAppData2(APP_DATA.chatDraft));
|
5469
5489
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
5470
5490
|
chatDraftMessage = "";
|
5471
5491
|
}
|
5472
|
-
const setDraftMessage =
|
5492
|
+
const setDraftMessage = useCallback13(
|
5473
5493
|
(message) => {
|
5474
5494
|
hmsActions.setAppData(APP_DATA.chatDraft, message, true);
|
5475
5495
|
},
|
@@ -5479,9 +5499,9 @@ var useChatDraftMessage = () => {
|
|
5479
5499
|
};
|
5480
5500
|
|
5481
5501
|
// src/Prebuilt/components/Chat/useEmojiPickerStyles.js
|
5482
|
-
import { useEffect as useEffect21, useRef as
|
5502
|
+
import { useEffect as useEffect21, useRef as useRef12 } from "react";
|
5483
5503
|
var useEmojiPickerStyles = (showing) => {
|
5484
|
-
const ref =
|
5504
|
+
const ref = useRef12(null);
|
5485
5505
|
useEffect21(() => {
|
5486
5506
|
if (showing) {
|
5487
5507
|
setTimeout(() => {
|
@@ -5530,7 +5550,7 @@ var TextArea = styled("textarea", {
|
|
5530
5550
|
}
|
5531
5551
|
});
|
5532
5552
|
function EmojiPicker({ onSelect }) {
|
5533
|
-
const [showEmoji, setShowEmoji] =
|
5553
|
+
const [showEmoji, setShowEmoji] = useState33(false);
|
5534
5554
|
const ref = useEmojiPickerStyles(showEmoji);
|
5535
5555
|
return /* @__PURE__ */ React60.createElement(Popover.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React60.createElement(Popover.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React60.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React60.createElement(EmojiIcon3, null))), /* @__PURE__ */ React60.createElement(Popover.Portal, null, /* @__PURE__ */ React60.createElement(
|
5536
5556
|
Popover.Content,
|
@@ -5562,13 +5582,13 @@ var ChatFooter = ({
|
|
5562
5582
|
children
|
5563
5583
|
}) => {
|
5564
5584
|
var _a;
|
5565
|
-
const hmsActions =
|
5566
|
-
const inputRef =
|
5585
|
+
const hmsActions = useHMSActions20();
|
5586
|
+
const inputRef = useRef13(null);
|
5567
5587
|
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
5568
5588
|
const isMobile = useMedia17(config.media.md);
|
5569
5589
|
const { elements } = useRoomLayoutConferencingScreen();
|
5570
5590
|
const isOverlayChat = (_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay;
|
5571
|
-
const sendMessage =
|
5591
|
+
const sendMessage = useCallback14(() => __async(void 0, null, function* () {
|
5572
5592
|
var _a2;
|
5573
5593
|
const message = (_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value;
|
5574
5594
|
if (!message || !message.trim().length) {
|
@@ -5683,8 +5703,8 @@ var ChatFooter = ({
|
|
5683
5703
|
// src/Prebuilt/components/Chat/Chat.jsx
|
5684
5704
|
var PINNED_MESSAGE_LENGTH = 80;
|
5685
5705
|
var PinnedMessage = ({ clearPinnedMessage }) => {
|
5686
|
-
const permissions =
|
5687
|
-
const pinnedMessage =
|
5706
|
+
const permissions = useHMSStore34(selectPermissions12);
|
5707
|
+
const pinnedMessage = useHMSStore34(selectSessionStore3(SESSION_STORE_KEY.PINNED_MESSAGE));
|
5688
5708
|
const formattedPinnedMessage = (pinnedMessage == null ? void 0 : pinnedMessage.length) && pinnedMessage.length > PINNED_MESSAGE_LENGTH ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...` : pinnedMessage;
|
5689
5709
|
return pinnedMessage ? /* @__PURE__ */ React61.createElement(
|
5690
5710
|
Flex,
|
@@ -5722,15 +5742,15 @@ var Chat = ({ screenType }) => {
|
|
5722
5742
|
const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);
|
5723
5743
|
const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);
|
5724
5744
|
const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
5725
|
-
const peerName =
|
5726
|
-
const [chatOptions, setChatOptions] =
|
5745
|
+
const peerName = useHMSStore34(selectPeerNameByID4(peerSelector));
|
5746
|
+
const [chatOptions, setChatOptions] = useState34({
|
5727
5747
|
role: roleSelector || "",
|
5728
5748
|
peerId: peerSelector && peerName ? peerSelector : "",
|
5729
5749
|
selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : "Everyone"
|
5730
5750
|
});
|
5731
|
-
const [isSelectorOpen] =
|
5732
|
-
const listRef =
|
5733
|
-
const hmsActions =
|
5751
|
+
const [isSelectorOpen] = useState34(false);
|
5752
|
+
const listRef = useRef14(null);
|
5753
|
+
const hmsActions = useHMSActions21();
|
5734
5754
|
const { setPinnedMessage } = useSetPinnedMessage();
|
5735
5755
|
useEffect23(() => {
|
5736
5756
|
if (notification && notification.data && peerSelector === notification.data.id) {
|
@@ -5750,8 +5770,8 @@ var Chat = ({ screenType }) => {
|
|
5750
5770
|
const currentRef = listRef.current._outerRef;
|
5751
5771
|
isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;
|
5752
5772
|
}
|
5753
|
-
const messagesCount =
|
5754
|
-
const scrollToBottom =
|
5773
|
+
const messagesCount = useHMSStore34(storeMessageSelector) || 0;
|
5774
|
+
const scrollToBottom = useCallback15(
|
5755
5775
|
(unreadCount = 0) => {
|
5756
5776
|
var _a2;
|
5757
5777
|
if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {
|
@@ -5851,6 +5871,65 @@ var NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {
|
|
5851
5871
|
);
|
5852
5872
|
};
|
5853
5873
|
|
5874
|
+
// src/Prebuilt/components/Footer/PaginatedParticipants.tsx
|
5875
|
+
import React62, { useEffect as useEffect24, useRef as useRef15, useState as useState35 } from "react";
|
5876
|
+
import { useMeasure as useMeasure3 } from "react-use";
|
5877
|
+
import { FixedSizeList as FixedSizeList2 } from "react-window";
|
5878
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, useHMSStore as useHMSStore35, usePaginatedParticipants as usePaginatedParticipants2 } from "@100mslive/react-sdk";
|
5879
|
+
import { ChevronLeftIcon as ChevronLeftIcon4, CrossIcon as CrossIcon9 } from "@100mslive/react-icons";
|
5880
|
+
var PaginatedParticipants = ({ roleName, onBack }) => {
|
5881
|
+
const { peers, total, loadPeers, loadMorePeers } = usePaginatedParticipants2({ role: roleName, limit: 20 });
|
5882
|
+
const [search, setSearch] = useState35("");
|
5883
|
+
const [isLoading, setIsLoading] = useState35(false);
|
5884
|
+
const filteredPeers = peers.filter((p) => {
|
5885
|
+
var _a;
|
5886
|
+
return (_a = p.name) == null ? void 0 : _a.toLowerCase().includes(search);
|
5887
|
+
});
|
5888
|
+
const isConnected = useHMSStore35(selectIsConnectedToRoom6);
|
5889
|
+
const [ref, { width }] = useMeasure3();
|
5890
|
+
const containerRef = useRef15(null);
|
5891
|
+
const height = ROW_HEIGHT * peers.length;
|
5892
|
+
const resetSidePane = useSidepaneReset();
|
5893
|
+
const hasNext = total > peers.length;
|
5894
|
+
useEffect24(() => {
|
5895
|
+
loadPeers();
|
5896
|
+
}, []);
|
5897
|
+
return /* @__PURE__ */ React62.createElement(Flex, { ref, direction: "column", css: { size: "100%", gap: "$4" } }, /* @__PURE__ */ React62.createElement(Flex, { align: "center" }, /* @__PURE__ */ React62.createElement(Flex, { align: "center", css: { flex: "1 1 0", cursor: "pointer" }, onClick: onBack }, /* @__PURE__ */ React62.createElement(ChevronLeftIcon4, null), /* @__PURE__ */ React62.createElement(Text, { variant: "lg", css: { flex: "1 1 0" } }, "Participants")), /* @__PURE__ */ React62.createElement(
|
5898
|
+
IconButton,
|
5899
|
+
{
|
5900
|
+
onClick: (e) => {
|
5901
|
+
e.stopPropagation();
|
5902
|
+
resetSidePane();
|
5903
|
+
},
|
5904
|
+
"data-testid": "close_sidepane"
|
5905
|
+
},
|
5906
|
+
/* @__PURE__ */ React62.createElement(CrossIcon9, null)
|
5907
|
+
)), /* @__PURE__ */ React62.createElement(ParticipantSearch, { onSearch: (search2) => setSearch(search2), placeholder: `Search for ${roleName}` }), /* @__PURE__ */ React62.createElement(Flex, { direction: "column", css: { border: "1px solid $border_default", borderRadius: "$1", flex: "1 1 0" } }, /* @__PURE__ */ React62.createElement(Flex, { align: "center", css: { height: ROW_HEIGHT, borderBottom: "1px solid $border_default", px: "$8" } }, /* @__PURE__ */ React62.createElement(Text, { css: { fontSize: "$space$7" } }, roleName, "(", getFormattedCount(peers.length), "/", getFormattedCount(total), ")")), /* @__PURE__ */ React62.createElement(Box, { css: { flex: "1 1 0", overflowY: "auto", overflowX: "hidden", mr: "-$10" } }, /* @__PURE__ */ React62.createElement(
|
5908
|
+
FixedSizeList2,
|
5909
|
+
{
|
5910
|
+
itemSize: ROW_HEIGHT,
|
5911
|
+
itemData: { peerList: filteredPeers, isConnected: isConnected === true },
|
5912
|
+
itemKey,
|
5913
|
+
itemCount: filteredPeers.length,
|
5914
|
+
width,
|
5915
|
+
height,
|
5916
|
+
outerRef: containerRef
|
5917
|
+
},
|
5918
|
+
VirtualizedParticipantItem
|
5919
|
+
), hasNext ? /* @__PURE__ */ React62.createElement(Flex, { justify: "center", css: { w: "100%" } }, /* @__PURE__ */ React62.createElement(
|
5920
|
+
Button,
|
5921
|
+
{
|
5922
|
+
css: { w: "max-content", p: "$4" },
|
5923
|
+
onClick: () => {
|
5924
|
+
setIsLoading(true);
|
5925
|
+
loadMorePeers().catch(console.error).finally(() => setIsLoading(false));
|
5926
|
+
},
|
5927
|
+
disabled: isLoading
|
5928
|
+
},
|
5929
|
+
isLoading ? /* @__PURE__ */ React62.createElement(Loading, { size: 16 }) : "Load More"
|
5930
|
+
)) : null)));
|
5931
|
+
};
|
5932
|
+
|
5854
5933
|
// src/Prebuilt/components/SidePaneTabs.tsx
|
5855
5934
|
var tabTriggerCSS = {
|
5856
5935
|
color: "$on_surface_high",
|
@@ -5861,23 +5940,25 @@ var tabTriggerCSS = {
|
|
5861
5940
|
justifyContent: "center"
|
5862
5941
|
};
|
5863
5942
|
var ParticipantCount2 = ({ count }) => {
|
5864
|
-
return count < 1e3 ? /* @__PURE__ */
|
5943
|
+
return count < 1e3 ? /* @__PURE__ */ React63.createElement("span", null, "(", count, ")") : /* @__PURE__ */ React63.createElement(Tooltip, { title: count }, /* @__PURE__ */ React63.createElement("span", null, "(", getFormattedCount(count), ")"));
|
5865
5944
|
};
|
5866
|
-
var SidePaneTabs =
|
5945
|
+
var SidePaneTabs = React63.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
|
5867
5946
|
var _a;
|
5868
5947
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
5869
5948
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
5870
5949
|
const resetSidePane = useSidepaneReset();
|
5871
5950
|
const [activeTab, setActiveTab] = useState36(active);
|
5872
|
-
const
|
5951
|
+
const [activeRole, setActiveRole] = useState36("");
|
5952
|
+
const peerCount = useHMSStore36(selectPeerCount3);
|
5873
5953
|
const { elements } = useRoomLayoutConferencingScreen();
|
5874
5954
|
const showChat = !!(elements == null ? void 0 : elements.chat);
|
5875
5955
|
const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
|
5876
5956
|
const hideTabs = !(showChat && showParticipants);
|
5877
5957
|
const isMobile = useMedia19(config.media.md);
|
5878
5958
|
const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
5959
|
+
const { off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
|
5879
5960
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
5880
|
-
|
5961
|
+
useEffect25(() => {
|
5881
5962
|
if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
|
5882
5963
|
setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
5883
5964
|
} else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {
|
@@ -5886,10 +5967,26 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5886
5967
|
resetSidePane();
|
5887
5968
|
}
|
5888
5969
|
}, [showChat, activeTab, showParticipants, resetSidePane]);
|
5889
|
-
|
5970
|
+
useEffect25(() => {
|
5890
5971
|
setActiveTab(active);
|
5891
5972
|
}, [active]);
|
5892
|
-
|
5973
|
+
if (activeRole) {
|
5974
|
+
return /* @__PURE__ */ React63.createElement(
|
5975
|
+
Flex,
|
5976
|
+
{
|
5977
|
+
direction: "column",
|
5978
|
+
css: {
|
5979
|
+
color: "$on_primary_high",
|
5980
|
+
h: "100%",
|
5981
|
+
marginTop: hideControls && isOverlayChat ? "$17" : "0",
|
5982
|
+
transition: "margin 0.3s ease-in-out",
|
5983
|
+
position: "relative"
|
5984
|
+
}
|
5985
|
+
},
|
5986
|
+
/* @__PURE__ */ React63.createElement(Box, { css: { position: "absolute", left: 0, top: 0, size: "100%", zIndex: 21, bg: "$surface_dim" } }, /* @__PURE__ */ React63.createElement(PaginatedParticipants, { roleName: activeRole, onBack: () => setActiveRole("") }))
|
5987
|
+
);
|
5988
|
+
}
|
5989
|
+
return /* @__PURE__ */ React63.createElement(
|
5893
5990
|
Flex,
|
5894
5991
|
{
|
5895
5992
|
direction: "column",
|
@@ -5900,7 +5997,7 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5900
5997
|
transition: "margin 0.3s ease-in-out"
|
5901
5998
|
}
|
5902
5999
|
},
|
5903
|
-
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */
|
6000
|
+
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React63.createElement(Chat, { screenType }) : /* @__PURE__ */ React63.createElement(React63.Fragment, null, hideTabs ? /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ React63.createElement("span", null, "Participants ", /* @__PURE__ */ React63.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ React63.createElement(Chat, { screenType }) : /* @__PURE__ */ React63.createElement(ParticipantList, { offStageRoles: off_stage_roles, onActive: setActiveRole })) : /* @__PURE__ */ React63.createElement(
|
5904
6001
|
Tabs.Root,
|
5905
6002
|
{
|
5906
6003
|
value: activeTab,
|
@@ -5910,7 +6007,7 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5910
6007
|
size: "100%"
|
5911
6008
|
}
|
5912
6009
|
},
|
5913
|
-
/* @__PURE__ */
|
6010
|
+
/* @__PURE__ */ React63.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ React63.createElement(
|
5914
6011
|
Tabs.Trigger,
|
5915
6012
|
{
|
5916
6013
|
value: SIDE_PANE_OPTIONS.CHAT,
|
@@ -5920,7 +6017,7 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5920
6017
|
})
|
5921
6018
|
},
|
5922
6019
|
"Chat"
|
5923
|
-
), /* @__PURE__ */
|
6020
|
+
), /* @__PURE__ */ React63.createElement(
|
5924
6021
|
Tabs.Trigger,
|
5925
6022
|
{
|
5926
6023
|
value: SIDE_PANE_OPTIONS.PARTICIPANTS,
|
@@ -5930,15 +6027,15 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5930
6027
|
})
|
5931
6028
|
},
|
5932
6029
|
"Participants ",
|
5933
|
-
/* @__PURE__ */
|
6030
|
+
/* @__PURE__ */ React63.createElement(ParticipantCount2, { count: peerCount })
|
5934
6031
|
)),
|
5935
|
-
/* @__PURE__ */
|
5936
|
-
/* @__PURE__ */
|
6032
|
+
/* @__PURE__ */ React63.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React63.createElement(ParticipantList, { offStageRoles: off_stage_roles, onActive: setActiveRole })),
|
6033
|
+
/* @__PURE__ */ React63.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React63.createElement(Chat, { screenType }))
|
5937
6034
|
)),
|
5938
|
-
isOverlayChat && isChatOpen ? null : /* @__PURE__ */
|
6035
|
+
isOverlayChat && isChatOpen ? null : /* @__PURE__ */ React63.createElement(
|
5939
6036
|
IconButton,
|
5940
6037
|
{
|
5941
|
-
css: { position: "absolute", right: "$
|
6038
|
+
css: { position: "absolute", right: "$9", top: "$11", "@md": { top: "$8", right: "$6" } },
|
5942
6039
|
onClick: (e) => {
|
5943
6040
|
e.stopPropagation();
|
5944
6041
|
if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
|
@@ -5949,22 +6046,22 @@ var SidePaneTabs = React62.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5949
6046
|
},
|
5950
6047
|
"data-testid": "close_chat"
|
5951
6048
|
},
|
5952
|
-
/* @__PURE__ */
|
6049
|
+
/* @__PURE__ */ React63.createElement(CrossIcon10, null)
|
5953
6050
|
)
|
5954
6051
|
);
|
5955
6052
|
});
|
5956
6053
|
|
5957
6054
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
5958
|
-
import
|
5959
|
-
import { selectPermissions as selectPermissions13, useHMSStore as
|
5960
|
-
import { ColoredHandIcon, CrossIcon as
|
6055
|
+
import React65, { Fragment as Fragment12, useState as useState38 } from "react";
|
6056
|
+
import { selectPermissions as selectPermissions13, useHMSStore as useHMSStore38, useRecordingStreaming as useRecordingStreaming7 } from "@100mslive/react-sdk";
|
6057
|
+
import { ColoredHandIcon, CrossIcon as CrossIcon11, GoLiveIcon as GoLiveIcon3 } from "@100mslive/react-icons";
|
5961
6058
|
|
5962
6059
|
// src/Prebuilt/images/rtmp.png
|
5963
6060
|
var rtmp_default = "data:image/png;base64,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";
|
5964
6061
|
|
5965
6062
|
// src/Prebuilt/components/Streaming/HLSStreaming.jsx
|
5966
|
-
import
|
5967
|
-
import { selectRoomID, useHMSActions as
|
6063
|
+
import React64, { Fragment as Fragment11, useCallback as useCallback16, useEffect as useEffect26, useState as useState37 } from "react";
|
6064
|
+
import { selectRoomID, useHMSActions as useHMSActions22, useHMSStore as useHMSStore37, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
|
5968
6065
|
import {
|
5969
6066
|
EndStreamIcon as EndStreamIcon2,
|
5970
6067
|
EyeOpenIcon,
|
@@ -5983,7 +6080,7 @@ var getCardData = (roleName, roomId) => {
|
|
5983
6080
|
data3 = {
|
5984
6081
|
title: formattedRoleName,
|
5985
6082
|
content: "Broadcasters can livestream audio or video, manage stream appearance and control the room via HLS.",
|
5986
|
-
icon: /* @__PURE__ */
|
6083
|
+
icon: /* @__PURE__ */ React64.createElement(SupportIcon, null)
|
5987
6084
|
};
|
5988
6085
|
break;
|
5989
6086
|
}
|
@@ -5991,7 +6088,7 @@ var getCardData = (roleName, roomId) => {
|
|
5991
6088
|
data3 = {
|
5992
6089
|
title: "HLS Viewer",
|
5993
6090
|
content: "Viewers can view and send chat messages, but need to be made broadcasters to participate with audio or video.",
|
5994
|
-
icon: /* @__PURE__ */
|
6091
|
+
icon: /* @__PURE__ */ React64.createElement(EyeOpenIcon, null)
|
5995
6092
|
};
|
5996
6093
|
break;
|
5997
6094
|
}
|
@@ -5999,7 +6096,7 @@ var getCardData = (roleName, roomId) => {
|
|
5999
6096
|
data3 = {
|
6000
6097
|
title: formattedRoleName,
|
6001
6098
|
content: `${formattedRoleName} is customised with specific permissions, which will determine how it interacts with this room.`,
|
6002
|
-
icon: /* @__PURE__ */
|
6099
|
+
icon: /* @__PURE__ */ React64.createElement(WrenchIcon, null),
|
6003
6100
|
order: 1
|
6004
6101
|
};
|
6005
6102
|
}
|
@@ -6008,7 +6105,7 @@ var getCardData = (roleName, roomId) => {
|
|
6008
6105
|
};
|
6009
6106
|
var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
6010
6107
|
const [copied, setCopied] = useState37(false);
|
6011
|
-
return isHLSRunning ? /* @__PURE__ */
|
6108
|
+
return isHLSRunning ? /* @__PURE__ */ React64.createElement(
|
6012
6109
|
Box,
|
6013
6110
|
{
|
6014
6111
|
key: title,
|
@@ -6019,9 +6116,9 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
|
6019
6116
|
borderRadius: "$2"
|
6020
6117
|
}
|
6021
6118
|
},
|
6022
|
-
/* @__PURE__ */
|
6023
|
-
/* @__PURE__ */
|
6024
|
-
/* @__PURE__ */
|
6119
|
+
/* @__PURE__ */ React64.createElement(Flex, { align: "center", gap: "2", css: { color: "$primary_bright" } }, icon, /* @__PURE__ */ React64.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, title)),
|
6120
|
+
/* @__PURE__ */ React64.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", mt: "$6" } }, content),
|
6121
|
+
/* @__PURE__ */ React64.createElement(
|
6025
6122
|
Button,
|
6026
6123
|
{
|
6027
6124
|
variant: "standard",
|
@@ -6033,24 +6130,24 @@ var Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
|
6033
6130
|
css: { w: "100%", r: "$1", mt: "$10", fontWeight: "$semiBold" },
|
6034
6131
|
icon: true
|
6035
6132
|
},
|
6036
|
-
copied ? /* @__PURE__ */
|
6133
|
+
copied ? /* @__PURE__ */ React64.createElement(React64.Fragment, null, "Link copied!") : /* @__PURE__ */ React64.createElement(React64.Fragment, null, /* @__PURE__ */ React64.createElement(LinkIcon, { style: { color: "inherit" } }), "Copy Invite Link")
|
6037
6134
|
)
|
6038
6135
|
) : null;
|
6039
6136
|
};
|
6040
6137
|
var HLSStreaming = ({ onBack }) => {
|
6041
6138
|
const roleNames = useFilteredRoles();
|
6042
|
-
const roomId =
|
6139
|
+
const roomId = useHMSStore37(selectRoomID);
|
6043
6140
|
const cards = roleNames.map((roleName) => getCardData(roleName, roomId));
|
6044
6141
|
const { isHLSRunning } = useRecordingStreaming6();
|
6045
6142
|
const [showLinks, setShowLinks] = useState37(false);
|
6046
|
-
return !showLinks ? /* @__PURE__ */
|
6143
|
+
return !showLinks ? /* @__PURE__ */ React64.createElement(Container, { rounded: true }, /* @__PURE__ */ React64.createElement(ContentHeader, { title: "Start Streaming", content: "HLS", onBack }), /* @__PURE__ */ React64.createElement(ContentBody, { title: "HLS Streaming", Icon: GoLiveIcon2, removeVerticalPadding: true }, "Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this platform."), isHLSRunning ? /* @__PURE__ */ React64.createElement(EndHLS, { setShowLinks }) : /* @__PURE__ */ React64.createElement(StartHLS, null)) : /* @__PURE__ */ React64.createElement(Container, { rounded: true }, /* @__PURE__ */ React64.createElement(ContentHeader, { title: "Invite People", content: "Start the conversation", onBack: () => setShowLinks(false) }), /* @__PURE__ */ React64.createElement(Flex, { direction: "column", css: { gap: "$10", p: "$0 $10", overflowY: "auto", mb: "$10" } }, cards.map((card) => /* @__PURE__ */ React64.createElement(Card, __spreadProps(__spreadValues({ key: card.title }, card), { isHLSRunning })))));
|
6047
6144
|
};
|
6048
6145
|
var StartHLS = () => {
|
6049
6146
|
const [record, setRecord] = useState37(false);
|
6050
6147
|
const [error, setError] = useState37(false);
|
6051
|
-
const hmsActions =
|
6148
|
+
const hmsActions = useHMSActions22();
|
6052
6149
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
6053
|
-
const startHLS =
|
6150
|
+
const startHLS = useCallback16(
|
6054
6151
|
(variants) => __async(void 0, null, function* () {
|
6055
6152
|
try {
|
6056
6153
|
if (isHLSStarted) {
|
@@ -6069,7 +6166,7 @@ var StartHLS = () => {
|
|
6069
6166
|
}),
|
6070
6167
|
[hmsActions, record, isHLSStarted, setHLSStarted]
|
6071
6168
|
);
|
6072
|
-
return /* @__PURE__ */
|
6169
|
+
return /* @__PURE__ */ React64.createElement(Fragment11, null, /* @__PURE__ */ React64.createElement(RecordStream, { record, setRecord, testId: "hls-recording" }), /* @__PURE__ */ React64.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(ErrorText, { error }), /* @__PURE__ */ React64.createElement(
|
6073
6170
|
Button,
|
6074
6171
|
{
|
6075
6172
|
"data-testid": "start_hls",
|
@@ -6078,21 +6175,21 @@ var StartHLS = () => {
|
|
6078
6175
|
onClick: () => startHLS(),
|
6079
6176
|
disabled: isHLSStarted
|
6080
6177
|
},
|
6081
|
-
isHLSStarted ? /* @__PURE__ */
|
6178
|
+
isHLSStarted ? /* @__PURE__ */ React64.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ React64.createElement(GoLiveIcon2, null),
|
6082
6179
|
isHLSStarted ? "Starting stream..." : "Go Live"
|
6083
|
-
)), /* @__PURE__ */
|
6180
|
+
)), /* @__PURE__ */ React64.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(Text, null, /* @__PURE__ */ React64.createElement(InfoIcon4, { width: 16, height: 16 })), /* @__PURE__ */ React64.createElement(Text, { variant: "tiny", color: "$on_surface_medium", css: { mx: "$8" } }, "You cannot start recording once the stream starts, you will have to stop the stream to enable recording.")));
|
6084
6181
|
};
|
6085
6182
|
var EndHLS = ({ setShowLinks }) => {
|
6086
|
-
const hmsActions =
|
6183
|
+
const hmsActions = useHMSActions22();
|
6087
6184
|
const [inProgress, setInProgress] = useState37(false);
|
6088
6185
|
const [error, setError] = useState37("");
|
6089
6186
|
const { isHLSRunning } = useRecordingStreaming6();
|
6090
|
-
|
6187
|
+
useEffect26(() => {
|
6091
6188
|
if (inProgress && !isHLSRunning) {
|
6092
6189
|
setInProgress(false);
|
6093
6190
|
}
|
6094
6191
|
}, [inProgress, isHLSRunning]);
|
6095
|
-
return /* @__PURE__ */
|
6192
|
+
return /* @__PURE__ */ React64.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ React64.createElement(ErrorText, { error }), /* @__PURE__ */ React64.createElement(
|
6096
6193
|
Button,
|
6097
6194
|
{
|
6098
6195
|
"data-testid": "stop_hls",
|
@@ -6111,23 +6208,23 @@ var EndHLS = ({ setShowLinks }) => {
|
|
6111
6208
|
}
|
6112
6209
|
})
|
6113
6210
|
},
|
6114
|
-
/* @__PURE__ */
|
6211
|
+
/* @__PURE__ */ React64.createElement(EndStreamIcon2, null),
|
6115
6212
|
"End Stream"
|
6116
|
-
), /* @__PURE__ */
|
6213
|
+
), /* @__PURE__ */ React64.createElement(Button, { icon: true, css: { w: "100%", r: "$0", mt: "$8" }, onClick: () => setShowLinks(true) }, /* @__PURE__ */ React64.createElement(PeopleIcon3, null), " Invite People"));
|
6117
6214
|
};
|
6118
6215
|
|
6119
6216
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
6120
6217
|
var StreamingLanding = () => {
|
6121
6218
|
const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);
|
6122
6219
|
const { isHLSRunning, isRTMPRunning } = useRecordingStreaming7();
|
6123
|
-
const permissions =
|
6220
|
+
const permissions = useHMSStore38(selectPermissions13);
|
6124
6221
|
const [showHLS, setShowHLS] = useState38(isHLSRunning);
|
6125
6222
|
const [showRTMP, setShowRTMP] = useState38(isRTMPRunning);
|
6126
6223
|
if (!(permissions == null ? void 0 : permissions.hlsStreaming) && !(permissions == null ? void 0 : permissions.rtmpStreaming)) {
|
6127
6224
|
toggleStreaming();
|
6128
6225
|
return null;
|
6129
6226
|
}
|
6130
|
-
return /* @__PURE__ */
|
6227
|
+
return /* @__PURE__ */ React65.createElement(Fragment12, null, /* @__PURE__ */ React65.createElement(Flex, { css: { w: "100%", py: "$8" } }, /* @__PURE__ */ React65.createElement(
|
6131
6228
|
Box,
|
6132
6229
|
{
|
6133
6230
|
css: {
|
@@ -6137,8 +6234,8 @@ var StreamingLanding = () => {
|
|
6137
6234
|
r: "$round"
|
6138
6235
|
}
|
6139
6236
|
},
|
6140
|
-
/* @__PURE__ */
|
6141
|
-
), /* @__PURE__ */
|
6237
|
+
/* @__PURE__ */ React65.createElement(ColoredHandIcon, { width: 40, height: 40 })
|
6238
|
+
), /* @__PURE__ */ React65.createElement(Box, { css: { flex: "1 1 0", mx: "$8" } }, /* @__PURE__ */ React65.createElement(Text, { variant: "sm" }, "Welcome !"), /* @__PURE__ */ React65.createElement(Text, { variant: "h6" }, "Let\u2019s get you started")), /* @__PURE__ */ React65.createElement(IconButton_default, { onClick: toggleStreaming, css: { alignSelf: "flex-start" }, "data-testid": "close_streaming" }, /* @__PURE__ */ React65.createElement(CrossIcon11, null))), /* @__PURE__ */ React65.createElement(Text, { variant: "tiny", color: "$on_surface_medium" }, "Start Streaming"), (permissions == null ? void 0 : permissions.hlsStreaming) && /* @__PURE__ */ React65.createElement(
|
6142
6239
|
StreamCard,
|
6143
6240
|
{
|
6144
6241
|
testId: "hls_stream",
|
@@ -6148,7 +6245,7 @@ var StreamingLanding = () => {
|
|
6148
6245
|
onClick: () => setShowHLS(true),
|
6149
6246
|
Icon: GoLiveIcon3
|
6150
6247
|
}
|
6151
|
-
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */
|
6248
|
+
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */ React65.createElement(
|
6152
6249
|
StreamCard,
|
6153
6250
|
{
|
6154
6251
|
testId: "rtmp_stream",
|
@@ -6160,7 +6257,7 @@ var StreamingLanding = () => {
|
|
6160
6257
|
},
|
6161
6258
|
imgSrc: rtmp_default
|
6162
6259
|
}
|
6163
|
-
), showHLS && /* @__PURE__ */
|
6260
|
+
), showHLS && /* @__PURE__ */ React65.createElement(HLSStreaming, { onBack: () => setShowHLS(false) }), showRTMP && /* @__PURE__ */ React65.createElement(RTMPStreaming, { onBack: () => setShowRTMP(false) }));
|
6164
6261
|
};
|
6165
6262
|
|
6166
6263
|
// src/Prebuilt/layouts/SidePane.tsx
|
@@ -6171,15 +6268,15 @@ var SidePane = ({
|
|
6171
6268
|
}) => {
|
6172
6269
|
var _a, _b;
|
6173
6270
|
const isMobile = useMedia20(config.media.md);
|
6174
|
-
const sidepane =
|
6175
|
-
const activeScreensharePeerId =
|
6176
|
-
const trackId = (_a =
|
6271
|
+
const sidepane = useHMSStore39(selectAppData3(APP_DATA.sidePane));
|
6272
|
+
const activeScreensharePeerId = useHMSStore39(selectAppData3(APP_DATA.activeScreensharePeerId));
|
6273
|
+
const trackId = (_a = useHMSStore39(selectVideoTrackByPeerID3(activeScreensharePeerId))) == null ? void 0 : _a.id;
|
6177
6274
|
const { elements } = useRoomLayoutConferencingScreen();
|
6178
6275
|
let ViewComponent;
|
6179
6276
|
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
6180
|
-
ViewComponent = /* @__PURE__ */
|
6277
|
+
ViewComponent = /* @__PURE__ */ React66.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
|
6181
6278
|
} else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
|
6182
|
-
ViewComponent = /* @__PURE__ */
|
6279
|
+
ViewComponent = /* @__PURE__ */ React66.createElement(StreamingLanding, null);
|
6183
6280
|
}
|
6184
6281
|
if (!ViewComponent && !trackId) {
|
6185
6282
|
return null;
|
@@ -6192,7 +6289,7 @@ var SidePane = ({
|
|
6192
6289
|
objectFit: tileProps == null ? void 0 : tileProps.video_object_fit
|
6193
6290
|
};
|
6194
6291
|
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay);
|
6195
|
-
return /* @__PURE__ */
|
6292
|
+
return /* @__PURE__ */ React66.createElement(
|
6196
6293
|
Flex,
|
6197
6294
|
{
|
6198
6295
|
direction: "column",
|
@@ -6205,16 +6302,17 @@ var SidePane = ({
|
|
6205
6302
|
"@md": { position: mwebStreamingChat ? "absolute" : "", zIndex: 12 }
|
6206
6303
|
}
|
6207
6304
|
},
|
6208
|
-
trackId && /* @__PURE__ */
|
6305
|
+
trackId && /* @__PURE__ */ React66.createElement(
|
6209
6306
|
VideoTile_default,
|
6210
6307
|
__spreadValues({
|
6211
6308
|
peerId: activeScreensharePeerId,
|
6212
6309
|
trackId,
|
6310
|
+
width: "100%",
|
6213
6311
|
height: 225,
|
6214
6312
|
rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
|
6215
6313
|
}, tileLayout)
|
6216
6314
|
),
|
6217
|
-
!!ViewComponent && /* @__PURE__ */
|
6315
|
+
!!ViewComponent && /* @__PURE__ */ React66.createElement(
|
6218
6316
|
Box,
|
6219
6317
|
{
|
6220
6318
|
css: {
|
@@ -6250,10 +6348,10 @@ var SidePane = ({
|
|
6250
6348
|
var SidePane_default = SidePane;
|
6251
6349
|
|
6252
6350
|
// src/Prebuilt/layouts/WaitingView.jsx
|
6253
|
-
import
|
6351
|
+
import React67 from "react";
|
6254
6352
|
import { ColoredTimeIcon } from "@100mslive/react-icons";
|
6255
|
-
var WaitingView =
|
6256
|
-
return /* @__PURE__ */
|
6353
|
+
var WaitingView = React67.memo(() => {
|
6354
|
+
return /* @__PURE__ */ React67.createElement(
|
6257
6355
|
Box,
|
6258
6356
|
{
|
6259
6357
|
css: {
|
@@ -6267,7 +6365,7 @@ var WaitingView = React66.memo(() => {
|
|
6267
6365
|
},
|
6268
6366
|
"data-testid": "waiting_view"
|
6269
6367
|
},
|
6270
|
-
/* @__PURE__ */
|
6368
|
+
/* @__PURE__ */ React67.createElement(
|
6271
6369
|
Flex,
|
6272
6370
|
{
|
6273
6371
|
align: "center",
|
@@ -6281,8 +6379,8 @@ var WaitingView = React66.memo(() => {
|
|
6281
6379
|
gap: "$8"
|
6282
6380
|
}
|
6283
6381
|
},
|
6284
|
-
/* @__PURE__ */
|
6285
|
-
/* @__PURE__ */
|
6382
|
+
/* @__PURE__ */ React67.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
|
6383
|
+
/* @__PURE__ */ React67.createElement(
|
6286
6384
|
Flex,
|
6287
6385
|
{
|
6288
6386
|
direction: "column",
|
@@ -6292,28 +6390,28 @@ var WaitingView = React66.memo(() => {
|
|
6292
6390
|
gap: "$4"
|
6293
6391
|
}
|
6294
6392
|
},
|
6295
|
-
/* @__PURE__ */
|
6296
|
-
/* @__PURE__ */
|
6393
|
+
/* @__PURE__ */ React67.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
|
6394
|
+
/* @__PURE__ */ React67.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
|
6297
6395
|
)
|
6298
6396
|
)
|
6299
6397
|
);
|
6300
6398
|
});
|
6301
6399
|
|
6302
6400
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
6303
|
-
var HLSView =
|
6401
|
+
var HLSView = React68.lazy(() => import("./HLSView-DDGPZHA2.js"));
|
6304
6402
|
var VideoStreamingSection = ({
|
6305
6403
|
screenType,
|
6306
6404
|
elements,
|
6307
6405
|
hideControls = false
|
6308
6406
|
}) => {
|
6309
6407
|
var _a, _b;
|
6310
|
-
const localPeerRole =
|
6311
|
-
const isConnected =
|
6312
|
-
const hmsActions =
|
6408
|
+
const localPeerRole = useHMSStore40(selectLocalPeerRoleName3);
|
6409
|
+
const isConnected = useHMSStore40(selectIsConnectedToRoom7);
|
6410
|
+
const hmsActions = useHMSActions23();
|
6313
6411
|
const waitingViewerRole = useWaitingViewerRole();
|
6314
6412
|
const urlToIframe = useUrlToEmbed();
|
6315
6413
|
const pdfAnnotatorActive = usePDFAnnotator();
|
6316
|
-
|
6414
|
+
useEffect27(() => {
|
6317
6415
|
if (!isConnected) {
|
6318
6416
|
return;
|
6319
6417
|
}
|
@@ -6324,17 +6422,17 @@ var VideoStreamingSection = ({
|
|
6324
6422
|
}
|
6325
6423
|
let ViewComponent;
|
6326
6424
|
if (screenType === "hls_live_streaming") {
|
6327
|
-
ViewComponent = /* @__PURE__ */
|
6425
|
+
ViewComponent = /* @__PURE__ */ React68.createElement(HLSView, null);
|
6328
6426
|
} else if (localPeerRole === waitingViewerRole) {
|
6329
|
-
ViewComponent = /* @__PURE__ */
|
6427
|
+
ViewComponent = /* @__PURE__ */ React68.createElement(WaitingView, null);
|
6330
6428
|
} else if (pdfAnnotatorActive) {
|
6331
|
-
ViewComponent = /* @__PURE__ */
|
6429
|
+
ViewComponent = /* @__PURE__ */ React68.createElement(PDFView, null);
|
6332
6430
|
} else if (urlToIframe) {
|
6333
|
-
ViewComponent = /* @__PURE__ */
|
6431
|
+
ViewComponent = /* @__PURE__ */ React68.createElement(EmbedView, null);
|
6334
6432
|
} else {
|
6335
|
-
ViewComponent = /* @__PURE__ */
|
6433
|
+
ViewComponent = /* @__PURE__ */ React68.createElement(GridLayout, __spreadValues({}, (_a = elements == null ? void 0 : elements.video_tile_layout) == null ? void 0 : _a.grid));
|
6336
6434
|
}
|
6337
|
-
return /* @__PURE__ */
|
6435
|
+
return /* @__PURE__ */ React68.createElement(Suspense2, { fallback: /* @__PURE__ */ React68.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React68.createElement(
|
6338
6436
|
Flex,
|
6339
6437
|
{
|
6340
6438
|
css: {
|
@@ -6344,7 +6442,7 @@ var VideoStreamingSection = ({
|
|
6344
6442
|
}
|
6345
6443
|
},
|
6346
6444
|
ViewComponent,
|
6347
|
-
/* @__PURE__ */
|
6445
|
+
/* @__PURE__ */ React68.createElement(
|
6348
6446
|
SidePane_default,
|
6349
6447
|
{
|
6350
6448
|
screenType,
|
@@ -6360,15 +6458,15 @@ var Conference = () => {
|
|
6360
6458
|
var _a, _b, _c, _d, _e;
|
6361
6459
|
const navigate = useNavigate();
|
6362
6460
|
const { roomId, role } = useParams();
|
6363
|
-
const { userName, endpoints } = useHMSPrebuiltContext();
|
6461
|
+
const { userName, endpoints, onJoin: onJoinFunc } = useHMSPrebuiltContext();
|
6364
6462
|
const screenProps = useRoomLayoutConferencingScreen();
|
6365
6463
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
6366
|
-
const roomState =
|
6464
|
+
const roomState = useHMSStore41(selectRoomState);
|
6367
6465
|
const prevState = usePrevious(roomState);
|
6368
|
-
const isConnectedToRoom =
|
6369
|
-
const hmsActions =
|
6466
|
+
const isConnectedToRoom = useHMSStore41(selectIsConnectedToRoom8);
|
6467
|
+
const hmsActions = useHMSActions24();
|
6370
6468
|
const [hideControls, setHideControls] = useState39(false);
|
6371
|
-
const dropdownList =
|
6469
|
+
const dropdownList = useHMSStore41(selectAppData4(APP_DATA.dropdownList));
|
6372
6470
|
const authTokenInAppData = useAuthToken();
|
6373
6471
|
const headerRef = useRef16();
|
6374
6472
|
const footerRef = useRef16();
|
@@ -6382,7 +6480,7 @@ var Conference = () => {
|
|
6382
6480
|
}
|
6383
6481
|
};
|
6384
6482
|
const autoRoomJoined = useRef16(isPreviewScreenEnabled);
|
6385
|
-
|
6483
|
+
useEffect28(() => {
|
6386
6484
|
let timeout = null;
|
6387
6485
|
dropdownListRef.current = dropdownList || [];
|
6388
6486
|
if (dropdownListRef.current.length === 0) {
|
@@ -6397,7 +6495,7 @@ var Conference = () => {
|
|
6397
6495
|
clearTimeout(timeout);
|
6398
6496
|
};
|
6399
6497
|
}, [dropdownList, hideControls, isMobileDevice]);
|
6400
|
-
|
6498
|
+
useEffect28(() => {
|
6401
6499
|
if (!roomId) {
|
6402
6500
|
navigate(`/`);
|
6403
6501
|
return;
|
@@ -6412,7 +6510,7 @@ var Conference = () => {
|
|
6412
6510
|
navigate(`/preview/${roomId || ""}`);
|
6413
6511
|
}
|
6414
6512
|
}, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);
|
6415
|
-
|
6513
|
+
useEffect28(() => {
|
6416
6514
|
if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting && !autoRoomJoined.current) {
|
6417
6515
|
hmsActions.join({
|
6418
6516
|
userName,
|
@@ -6427,15 +6525,16 @@ var Conference = () => {
|
|
6427
6525
|
autoRoomJoined.current = true;
|
6428
6526
|
}
|
6429
6527
|
}, [authTokenInAppData, endpoints == null ? void 0 : endpoints.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
|
6430
|
-
|
6528
|
+
useEffect28(() => {
|
6529
|
+
onJoinFunc == null ? void 0 : onJoinFunc();
|
6431
6530
|
return () => {
|
6432
6531
|
PictureInPicture.stop().catch((error) => console.error("stopping pip", error));
|
6433
6532
|
};
|
6434
6533
|
}, []);
|
6435
|
-
if (!isConnectedToRoom) {
|
6436
|
-
return /* @__PURE__ */
|
6534
|
+
if (!isConnectedToRoom && ![HMSRoomState.Reconnecting, HMSRoomState.Disconnected].includes(roomState)) {
|
6535
|
+
return /* @__PURE__ */ React69.createElement(FullPageProgress_default, { text: roomState === HMSRoomState.Connecting ? "Joining..." : "" });
|
6437
6536
|
}
|
6438
|
-
return /* @__PURE__ */
|
6537
|
+
return /* @__PURE__ */ React69.createElement(React69.Fragment, null, isHLSStarted ? /* @__PURE__ */ React69.createElement(Box, { css: { position: "fixed", zIndex: 100, w: "100%", h: "100%", left: 0, top: 0 } }, /* @__PURE__ */ React69.createElement(FullPageProgress_default, { text: "Starting live stream...", css: { opacity: 0.8, bg: "$background_dim" } })) : null, /* @__PURE__ */ React69.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !screenProps.hideSections.includes("header") && /* @__PURE__ */ React69.createElement(
|
6439
6538
|
Box,
|
6440
6539
|
{
|
6441
6540
|
ref: headerRef,
|
@@ -6449,8 +6548,8 @@ var Conference = () => {
|
|
6449
6548
|
},
|
6450
6549
|
"data-testid": "header"
|
6451
6550
|
},
|
6452
|
-
/* @__PURE__ */
|
6453
|
-
), /* @__PURE__ */
|
6551
|
+
/* @__PURE__ */ React69.createElement(Header, { elements: screenProps.elements, screenType: screenProps.screenType })
|
6552
|
+
), /* @__PURE__ */ React69.createElement(
|
6454
6553
|
Box,
|
6455
6554
|
{
|
6456
6555
|
css: {
|
@@ -6468,7 +6567,7 @@ var Conference = () => {
|
|
6468
6567
|
"data-testid": "conferencing",
|
6469
6568
|
onClick: toggleControls
|
6470
6569
|
},
|
6471
|
-
/* @__PURE__ */
|
6570
|
+
/* @__PURE__ */ React69.createElement(
|
6472
6571
|
VideoStreamingSection,
|
6473
6572
|
{
|
6474
6573
|
screenType: screenProps.screenType,
|
@@ -6476,7 +6575,7 @@ var Conference = () => {
|
|
6476
6575
|
hideControls
|
6477
6576
|
}
|
6478
6577
|
)
|
6479
|
-
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */
|
6578
|
+
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */ React69.createElement(
|
6480
6579
|
Box,
|
6481
6580
|
{
|
6482
6581
|
ref: footerRef,
|
@@ -6493,11 +6592,11 @@ var Conference = () => {
|
|
6493
6592
|
},
|
6494
6593
|
"data-testid": "footer"
|
6495
6594
|
},
|
6496
|
-
/* @__PURE__ */
|
6497
|
-
), /* @__PURE__ */
|
6595
|
+
/* @__PURE__ */ React69.createElement(Footer2, { elements: screenProps.elements, screenType: screenProps.screenType })
|
6596
|
+
), /* @__PURE__ */ React69.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ React69.createElement(HLSFailureModal, null), /* @__PURE__ */ React69.createElement(ActivatedPIP, null)));
|
6498
6597
|
};
|
6499
6598
|
var conference_default = Conference;
|
6500
6599
|
export {
|
6501
6600
|
conference_default as default
|
6502
6601
|
};
|
6503
|
-
//# sourceMappingURL=conference-
|
6602
|
+
//# sourceMappingURL=conference-N7S47TDK.js.map
|