@100mslive/roomkit-react 0.1.6 → 0.1.7-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HLSView-4NSE37G7.js → HLSView-F5BDZVT2.js} +22 -4
- package/dist/HLSView-F5BDZVT2.js.map +7 -0
- package/dist/{VirtualBackground-A5UM363O.js → VirtualBackground-THDRYDRA.js} +3 -3
- package/dist/{chunk-Q6U22HIE.js → chunk-CDYRVICT.js} +189 -174
- package/dist/chunk-CDYRVICT.js.map +7 -0
- package/dist/{chunk-BUWIMYLW.js → chunk-JSH7SKEH.js} +2 -2
- package/dist/{chunk-NMOZ33TX.js → chunk-U3G743OY.js} +3 -2
- package/dist/{chunk-NMOZ33TX.js.map → chunk-U3G743OY.js.map} +2 -2
- package/dist/{conference-S7R3O4OC.js → conference-6IVZHILI.js} +89 -75
- package/dist/conference-6IVZHILI.js.map +7 -0
- package/dist/index.cjs.js +332 -281
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +78 -63
- package/dist/meta.esbuild.json +111 -97
- package/package.json +6 -6
- package/src/Prebuilt/common/hooks.js +1 -2
- package/src/Prebuilt/common/utils.js +0 -2
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -0
- package/src/Prebuilt/components/Footer/Footer.tsx +4 -1
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +7 -8
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +9 -12
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +4 -2
- package/src/Prebuilt/components/Notifications/Notifications.jsx +14 -1
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +4 -15
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +8 -3
- package/src/Prebuilt/components/RaiseHand.jsx +10 -6
- package/src/Prebuilt/components/RoleChangeRequestModal.tsx +3 -2
- package/src/Prebuilt/components/SidePaneTabs.tsx +21 -2
- package/src/Prebuilt/components/VideoTile.jsx +6 -3
- package/src/Prebuilt/components/hooks/useMetadata.jsx +14 -4
- package/src/Prebuilt/layouts/HLSView.jsx +19 -1
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/src/fixtures/peers.ts +5 -3
- package/dist/HLSView-4NSE37G7.js.map +0 -7
- package/dist/chunk-Q6U22HIE.js.map +0 -7
- package/dist/conference-S7R3O4OC.js.map +0 -7
- /package/dist/{VirtualBackground-A5UM363O.js.map → VirtualBackground-THDRYDRA.js.map} +0 -0
- /package/dist/{chunk-BUWIMYLW.js.map → chunk-JSH7SKEH.js.map} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
ActionTile
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-JSH7SKEH.js";
|
4
4
|
import {
|
5
5
|
APP_DATA,
|
6
6
|
Accordion,
|
@@ -58,7 +58,6 @@ import {
|
|
58
58
|
isChrome,
|
59
59
|
isIOS,
|
60
60
|
isIPadOS,
|
61
|
-
isInternalRole,
|
62
61
|
isMacOS,
|
63
62
|
isScreenshareSupported,
|
64
63
|
useAuthToken,
|
@@ -84,7 +83,7 @@ import {
|
|
84
83
|
useUrlToEmbed,
|
85
84
|
useUserPreferences,
|
86
85
|
useWaitingViewerRole
|
87
|
-
} from "./chunk-
|
86
|
+
} from "./chunk-CDYRVICT.js";
|
88
87
|
import {
|
89
88
|
Box,
|
90
89
|
Flex,
|
@@ -103,7 +102,7 @@ import {
|
|
103
102
|
slideLeftAndFade,
|
104
103
|
styled,
|
105
104
|
textEllipsis
|
106
|
-
} from "./chunk-
|
105
|
+
} from "./chunk-U3G743OY.js";
|
107
106
|
|
108
107
|
// src/Prebuilt/components/conference.jsx
|
109
108
|
import React62, { useEffect as useEffect25, useRef as useRef14, useState as useState35 } from "react";
|
@@ -114,7 +113,7 @@ import {
|
|
114
113
|
selectAppData as selectAppData4,
|
115
114
|
selectIsConnectedToRoom as selectIsConnectedToRoom7,
|
116
115
|
selectRoomState,
|
117
|
-
useHMSActions as
|
116
|
+
useHMSActions as useHMSActions23,
|
118
117
|
useHMSStore as useHMSStore36
|
119
118
|
} from "@100mslive/react-sdk";
|
120
119
|
|
@@ -122,6 +121,7 @@ import {
|
|
122
121
|
import React36, { Suspense, useEffect as useEffect6 } from "react";
|
123
122
|
import { useMedia as useMedia5 } from "react-use";
|
124
123
|
import { Chat_ChatState } from "@100mslive/types-prebuilt/elements/chat";
|
124
|
+
import { useAVToggle as useAVToggle2 } from "@100mslive/react-sdk";
|
125
125
|
|
126
126
|
// src/Prebuilt/components/EmojiReaction.jsx
|
127
127
|
import React2, { Fragment, useState } from "react";
|
@@ -1881,6 +1881,7 @@ import {
|
|
1881
1881
|
selectIsConnectedToRoom as selectIsConnectedToRoom5,
|
1882
1882
|
selectPeerCount,
|
1883
1883
|
selectPermissions as selectPermissions6,
|
1884
|
+
useAVToggle,
|
1884
1885
|
useHMSActions as useHMSActions9,
|
1885
1886
|
useHMSStore as useHMSStore11,
|
1886
1887
|
useRecordingStreaming as useRecordingStreaming5
|
@@ -1925,6 +1926,8 @@ var MwebOptions = ({
|
|
1925
1926
|
const peerCount = useHMSStore11(selectPeerCount);
|
1926
1927
|
const emojiCardRef = useRef5(null);
|
1927
1928
|
const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();
|
1929
|
+
const { toggleAudio, toggleVideo } = useAVToggle();
|
1930
|
+
const noAVPermissions = !(toggleAudio || toggleVideo);
|
1928
1931
|
useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: "MoreSettings" });
|
1929
1932
|
const updateState = (modalName, value) => {
|
1930
1933
|
setOpenModals((modals) => {
|
@@ -1981,7 +1984,7 @@ var MwebOptions = ({
|
|
1981
1984
|
/* @__PURE__ */ React22.createElement(PeopleIcon, null),
|
1982
1985
|
/* @__PURE__ */ React22.createElement(ActionTile.Title, null, "Participants")
|
1983
1986
|
),
|
1984
|
-
|
1987
|
+
!noAVPermissions ? /* @__PURE__ */ React22.createElement(
|
1985
1988
|
ActionTile.Root,
|
1986
1989
|
{
|
1987
1990
|
active: isHandRaised,
|
@@ -2079,7 +2082,6 @@ var MwebOptions = ({
|
|
2079
2082
|
), showEmojiCard && /* @__PURE__ */ React22.createElement(
|
2080
2083
|
Box,
|
2081
2084
|
{
|
2082
|
-
onClick: () => setShowEmojiCard(false),
|
2083
2085
|
ref: emojiCardRef,
|
2084
2086
|
css: {
|
2085
2087
|
maxWidth: "100%",
|
@@ -2128,14 +2130,22 @@ var MoreSettings = ({
|
|
2128
2130
|
|
2129
2131
|
// src/Prebuilt/components/RaiseHand.jsx
|
2130
2132
|
import React24 from "react";
|
2131
|
-
import {
|
2133
|
+
import { selectHasPeerHandRaised, selectLocalPeerID as selectLocalPeerID4, useHMSActions as useHMSActions10, useHMSStore as useHMSStore12 } from "@100mslive/react-sdk";
|
2132
2134
|
import { HandIcon as HandIcon2 } from "@100mslive/react-icons";
|
2133
2135
|
var RaiseHand = () => {
|
2134
|
-
|
2135
|
-
const
|
2136
|
-
const
|
2137
|
-
|
2138
|
-
|
2136
|
+
const localPeerId = useHMSStore12(selectLocalPeerID4);
|
2137
|
+
const isHandRaised = useHMSStore12(selectHasPeerHandRaised(localPeerId));
|
2138
|
+
const actions = useHMSActions10();
|
2139
|
+
return /* @__PURE__ */ React24.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ React24.createElement(
|
2140
|
+
IconButton_default,
|
2141
|
+
{
|
2142
|
+
active: !isHandRaised,
|
2143
|
+
onClick: () => {
|
2144
|
+
isHandRaised ? actions.lowerLocalPeerHand() : actions.raiseLocalPeerHand();
|
2145
|
+
}
|
2146
|
+
},
|
2147
|
+
/* @__PURE__ */ React24.createElement(HandIcon2, null)
|
2148
|
+
));
|
2139
2149
|
};
|
2140
2150
|
|
2141
2151
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
@@ -2660,13 +2670,14 @@ var ChatToggle = () => {
|
|
2660
2670
|
import React35, { Fragment as Fragment7, useCallback as useCallback6, useEffect as useEffect5, useState as useState18 } from "react";
|
2661
2671
|
import { useDebounce, useMedia as useMedia4 } from "react-use";
|
2662
2672
|
import {
|
2673
|
+
selectHandRaisedPeers,
|
2674
|
+
selectHasPeerHandRaised as selectHasPeerHandRaised2,
|
2663
2675
|
selectIsPeerAudioEnabled,
|
2664
|
-
selectLocalPeerID as
|
2676
|
+
selectLocalPeerID as selectLocalPeerID5,
|
2665
2677
|
selectPeerCount as selectPeerCount2,
|
2666
|
-
selectPeerMetadata
|
2667
|
-
selectPeersByCondition as selectPeersByCondition2,
|
2678
|
+
selectPeerMetadata,
|
2668
2679
|
selectPermissions as selectPermissions8,
|
2669
|
-
useHMSActions as
|
2680
|
+
useHMSActions as useHMSActions12,
|
2670
2681
|
useHMSStore as useHMSStore16
|
2671
2682
|
} from "@100mslive/react-sdk";
|
2672
2683
|
import {
|
@@ -2686,7 +2697,7 @@ import { FixedSizeList } from "react-window";
|
|
2686
2697
|
|
2687
2698
|
// src/Prebuilt/components/Footer/RoleOptions.tsx
|
2688
2699
|
import React33, { useState as useState17 } from "react";
|
2689
|
-
import { selectPermissions as selectPermissions7, useHMSActions as
|
2700
|
+
import { selectPermissions as selectPermissions7, useHMSActions as useHMSActions11, useHMSStore as useHMSStore15, useHMSVanillaStore as useHMSVanillaStore2 } from "@100mslive/react-sdk";
|
2690
2701
|
import {
|
2691
2702
|
MicOffIcon as MicOffIcon2,
|
2692
2703
|
MicOnIcon,
|
@@ -2701,7 +2712,7 @@ var optionTextCSS = { fontWeight: "$semiBold", color: "$on_surface_high", textTr
|
|
2701
2712
|
var RoleOptions = ({ roleName, peerList }) => {
|
2702
2713
|
const [openOptions, setOpenOptions] = useState17(false);
|
2703
2714
|
const permissions = useHMSStore15(selectPermissions7);
|
2704
|
-
const hmsActions =
|
2715
|
+
const hmsActions = useHMSActions11();
|
2705
2716
|
const { elements } = useRoomLayoutConferencingScreen();
|
2706
2717
|
const { on_stage_role, off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
|
2707
2718
|
const vanillaStore = useHMSVanillaStore2();
|
@@ -2873,10 +2884,7 @@ var ParticipantList = () => {
|
|
2873
2884
|
const [filter, setFilter] = useState18();
|
2874
2885
|
const { participants, isConnected, peerCount } = useParticipants(filter);
|
2875
2886
|
const peersOrderedByRoles = {};
|
2876
|
-
const handRaisedPeers = useHMSStore16(
|
2877
|
-
var _a;
|
2878
|
-
return (_a = JSON.parse(peer.metadata || "{}")) == null ? void 0 : _a.isHandRaised;
|
2879
|
-
}));
|
2887
|
+
const handRaisedPeers = useHMSStore16(selectHandRaisedPeers);
|
2880
2888
|
participants.forEach((participant) => {
|
2881
2889
|
if (peersOrderedByRoles[participant.roleName] === void 0) {
|
2882
2890
|
peersOrderedByRoles[participant.roleName] = [];
|
@@ -2934,7 +2942,7 @@ var ParticipantCount = () => {
|
|
2934
2942
|
"data-testid": "participant_list"
|
2935
2943
|
},
|
2936
2944
|
/* @__PURE__ */ React35.createElement(PeopleIcon2, null),
|
2937
|
-
/* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, peerCount)
|
2945
|
+
/* @__PURE__ */ React35.createElement(Text, { variant: "sm", css: { mx: "$4", c: "inherit" } }, getFormattedCount(peerCount))
|
2938
2946
|
);
|
2939
2947
|
};
|
2940
2948
|
var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter, handRaisedList = [] }) => {
|
@@ -2974,7 +2982,7 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
|
|
2974
2982
|
);
|
2975
2983
|
};
|
2976
2984
|
var Participant = ({ peer, isConnected }) => {
|
2977
|
-
const localPeerId = useHMSStore16(
|
2985
|
+
const localPeerId = useHMSStore16(selectLocalPeerID5);
|
2978
2986
|
return /* @__PURE__ */ React35.createElement(
|
2979
2987
|
Flex,
|
2980
2988
|
{
|
@@ -2995,9 +3003,9 @@ var Participant = ({ peer, isConnected }) => {
|
|
2995
3003
|
);
|
2996
3004
|
};
|
2997
3005
|
var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
|
2998
|
-
var _a
|
2999
|
-
const isHandRaised =
|
3000
|
-
const canChangeRole = (
|
3006
|
+
var _a;
|
3007
|
+
const isHandRaised = useHMSStore16(selectHasPeerHandRaised2(peerId));
|
3008
|
+
const canChangeRole = (_a = useHMSStore16(selectPermissions8)) == null ? void 0 : _a.changeRole;
|
3001
3009
|
const shouldShowMoreActions = canChangeRole;
|
3002
3010
|
const isAudioMuted = !useHMSStore16(selectIsPeerAudioEnabled(peerId));
|
3003
3011
|
return /* @__PURE__ */ React35.createElement(
|
@@ -3028,12 +3036,12 @@ var ParticipantActions = React35.memo(({ peerId, role, isLocal }) => {
|
|
3028
3036
|
},
|
3029
3037
|
/* @__PURE__ */ React35.createElement(MicOffIcon3, { height: 19, width: 19 })
|
3030
3038
|
) : null,
|
3031
|
-
shouldShowMoreActions && !
|
3039
|
+
shouldShowMoreActions && !isLocal ? /* @__PURE__ */ React35.createElement(ParticipantMoreActions, { peerId, role }) : null
|
3032
3040
|
);
|
3033
3041
|
});
|
3034
3042
|
var ParticipantMoreActions = ({ peerId, role }) => {
|
3035
3043
|
var _a;
|
3036
|
-
const hmsActions =
|
3044
|
+
const hmsActions = useHMSActions12();
|
3037
3045
|
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = useHMSStore16(selectPermissions8);
|
3038
3046
|
const { elements } = useRoomLayoutConferencingScreen();
|
3039
3047
|
const {
|
@@ -3044,8 +3052,8 @@ var ParticipantMoreActions = ({ peerId, role }) => {
|
|
3044
3052
|
} = elements.on_stage_exp || {};
|
3045
3053
|
const isInStage = role === on_stage_role;
|
3046
3054
|
const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
|
3047
|
-
const prevRole = (_a = useHMSStore16(
|
3048
|
-
const localPeerId = useHMSStore16(
|
3055
|
+
const prevRole = (_a = useHMSStore16(selectPeerMetadata(peerId))) == null ? void 0 : _a.prevRole;
|
3056
|
+
const localPeerId = useHMSStore16(selectLocalPeerID5);
|
3049
3057
|
const isLocal = localPeerId === peerId;
|
3050
3058
|
const [open, setOpen] = useState18(false);
|
3051
3059
|
const handleStageAction = () => __async(void 0, null, function* () {
|
@@ -3137,7 +3145,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
|
|
3137
3145
|
};
|
3138
3146
|
|
3139
3147
|
// src/Prebuilt/components/Footer/Footer.tsx
|
3140
|
-
var VirtualBackground = React36.lazy(() => import("./VirtualBackground-
|
3148
|
+
var VirtualBackground = React36.lazy(() => import("./VirtualBackground-THDRYDRA.js"));
|
3141
3149
|
var Footer2 = ({
|
3142
3150
|
screenType,
|
3143
3151
|
elements
|
@@ -3146,6 +3154,8 @@ var Footer2 = ({
|
|
3146
3154
|
const isMobile = useMedia5(config.media.md);
|
3147
3155
|
const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay);
|
3148
3156
|
const openByDefault = ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.initial_state) === Chat_ChatState.CHAT_STATE_OPEN;
|
3157
|
+
const { toggleAudio, toggleVideo } = useAVToggle2();
|
3158
|
+
const noAVPermissions = !(toggleAudio || toggleVideo);
|
3149
3159
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
3150
3160
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
3151
3161
|
useEffect6(() => {
|
@@ -3192,7 +3202,7 @@ var Footer2 = ({
|
|
3192
3202
|
}
|
3193
3203
|
}
|
3194
3204
|
},
|
3195
|
-
isMobile ? /* @__PURE__ */ React36.createElement(React36.Fragment, null,
|
3205
|
+
isMobile ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, noAVPermissions ? /* @__PURE__ */ React36.createElement(RaiseHand, null) : null, (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType })) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ScreenshareToggle, null), /* @__PURE__ */ React36.createElement(RaiseHand, null), (elements == null ? void 0 : elements.emoji_reactions) && /* @__PURE__ */ React36.createElement(EmojiReaction, null), /* @__PURE__ */ React36.createElement(LeaveRoom, { screenType }))
|
3196
3206
|
),
|
3197
3207
|
/* @__PURE__ */ React36.createElement(Footer.Right, null, !isMobile && (elements == null ? void 0 : elements.chat) && /* @__PURE__ */ React36.createElement(ChatToggle, null), (elements == null ? void 0 : elements.participant_list) && /* @__PURE__ */ React36.createElement(ParticipantCount, null), /* @__PURE__ */ React36.createElement(MoreSettings, { elements, screenType }))
|
3198
3208
|
);
|
@@ -3200,11 +3210,11 @@ var Footer2 = ({
|
|
3200
3210
|
|
3201
3211
|
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
3202
3212
|
import React37, { useCallback as useCallback7, useState as useState19 } from "react";
|
3203
|
-
import { selectHLSState as selectHLSState2, useHMSActions as
|
3213
|
+
import { selectHLSState as selectHLSState2, useHMSActions as useHMSActions13, useHMSStore as useHMSStore17 } from "@100mslive/react-sdk";
|
3204
3214
|
function HLSFailureModal() {
|
3205
3215
|
const { hlsError } = useHMSStore17(selectHLSState2).error || false;
|
3206
3216
|
const [openModal, setOpenModal] = useState19(!!hlsError);
|
3207
|
-
const hmsActions =
|
3217
|
+
const hmsActions = useHMSActions13();
|
3208
3218
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
3209
3219
|
const startHLS = useCallback7(() => __async(this, null, function* () {
|
3210
3220
|
try {
|
@@ -3249,7 +3259,7 @@ function HLSFailureModal() {
|
|
3249
3259
|
|
3250
3260
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
3251
3261
|
import React60, { Suspense as Suspense2, useEffect as useEffect23 } from "react";
|
3252
|
-
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName2, useHMSActions as
|
3262
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom6, selectLocalPeerRoleName as selectLocalPeerRoleName2, useHMSActions as useHMSActions21, useHMSStore as useHMSStore34 } from "@100mslive/react-sdk";
|
3253
3263
|
|
3254
3264
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
3255
3265
|
import React49, { useEffect as useEffect14, useMemo as useMemo6, useState as useState26 } from "react";
|
@@ -3258,13 +3268,13 @@ import { selectPeers as selectPeers2, selectPeerScreenSharing, useHMSStore as us
|
|
3258
3268
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3259
3269
|
import React42, { useEffect as useEffect10, useMemo as useMemo3, useState as useState21 } from "react";
|
3260
3270
|
import { useMedia as useMedia8 } from "react-use";
|
3261
|
-
import { selectLocalPeer as
|
3271
|
+
import { selectLocalPeer as selectLocalPeer2, useHMSStore as useHMSStore19 } from "@100mslive/react-sdk";
|
3262
3272
|
|
3263
3273
|
// src/Prebuilt/components/InsetTile.tsx
|
3264
3274
|
import React39, { useEffect as useEffect7, useRef as useRef6 } from "react";
|
3265
3275
|
import Draggable from "react-draggable";
|
3266
3276
|
import { useMedia as useMedia6 } from "react-use";
|
3267
|
-
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer
|
3277
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, selectLocalPeer, selectVideoTrackByID, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
3268
3278
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
3269
3279
|
|
3270
3280
|
// src/Prebuilt/components/hooks/useVideoTileLayout.ts
|
@@ -3302,7 +3312,7 @@ var desktopAspectRatio = 1 / defaultMobileAspectRatio;
|
|
3302
3312
|
var InsetTile = () => {
|
3303
3313
|
const isMobile = useMedia6(config.media.md);
|
3304
3314
|
const isLandscape = useMedia6(config.media.ls);
|
3305
|
-
const localPeer = useHMSStore18(
|
3315
|
+
const localPeer = useHMSStore18(selectLocalPeer);
|
3306
3316
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
3307
3317
|
const videoTrack = useHMSStore18(selectVideoTrackByID(localPeer == null ? void 0 : localPeer.videoTrack));
|
3308
3318
|
const isAllowedToPublish = useHMSStore18(selectIsAllowedToPublish2);
|
@@ -3562,7 +3572,7 @@ var useTileLayout = ({
|
|
3562
3572
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
3563
3573
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
3564
3574
|
var _a;
|
3565
|
-
const localPeer = useHMSStore19(
|
3575
|
+
const localPeer = useHMSStore19(selectLocalPeer2);
|
3566
3576
|
const isMobile = useMedia8(config.media.md);
|
3567
3577
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
3568
3578
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
@@ -3605,7 +3615,7 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
3605
3615
|
|
3606
3616
|
// src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
|
3607
3617
|
import React45, { useEffect as useEffect12, useState as useState23 } from "react";
|
3608
|
-
import { selectLocalPeer as
|
3618
|
+
import { selectLocalPeer as selectLocalPeer3, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
|
3609
3619
|
|
3610
3620
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
3611
3621
|
import React44, { useEffect as useEffect11, useState as useState22 } from "react";
|
@@ -3745,7 +3755,7 @@ function RoleProminence({
|
|
3745
3755
|
}) {
|
3746
3756
|
var _a;
|
3747
3757
|
const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);
|
3748
|
-
const localPeer = useHMSStore20(
|
3758
|
+
const localPeer = useHMSStore20(selectLocalPeer3);
|
3749
3759
|
const maxTileCount = 4;
|
3750
3760
|
const pageList = usePagesWithTiles({
|
3751
3761
|
peers: prominentPeers,
|
@@ -3785,7 +3795,7 @@ import React47, { useRef as useRef7, useState as useState24 } from "react";
|
|
3785
3795
|
import { useFullscreen as useFullscreen2 } from "react-use";
|
3786
3796
|
import screenfull2 from "screenfull";
|
3787
3797
|
import {
|
3788
|
-
selectLocalPeerID as
|
3798
|
+
selectLocalPeerID as selectLocalPeerID6,
|
3789
3799
|
selectPeerByID as selectPeerByID2,
|
3790
3800
|
selectScreenShareAudioByPeerID,
|
3791
3801
|
selectScreenShareByPeerID,
|
@@ -3795,10 +3805,10 @@ import { ExpandIcon as ExpandIcon3, ShrinkIcon } from "@100mslive/react-icons";
|
|
3795
3805
|
|
3796
3806
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
3797
3807
|
import React46 from "react";
|
3798
|
-
import { useHMSActions as
|
3808
|
+
import { useHMSActions as useHMSActions14 } from "@100mslive/react-sdk";
|
3799
3809
|
import { CrossIcon as CrossIcon5, ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
|
3800
3810
|
var ScreenshareDisplay = () => {
|
3801
|
-
const hmsActions =
|
3811
|
+
const hmsActions = useHMSActions14();
|
3802
3812
|
return /* @__PURE__ */ React46.createElement(
|
3803
3813
|
Flex,
|
3804
3814
|
{
|
@@ -3839,7 +3849,7 @@ var labelStyles = {
|
|
3839
3849
|
flexShrink: 0
|
3840
3850
|
};
|
3841
3851
|
var Tile = ({ peerId, width = "100%", height = "100%" }) => {
|
3842
|
-
const isLocal = useHMSStore21(
|
3852
|
+
const isLocal = useHMSStore21(selectLocalPeerID6) === peerId;
|
3843
3853
|
const track = useHMSStore21(selectScreenShareByPeerID(peerId));
|
3844
3854
|
const peer = useHMSStore21(selectPeerByID2(peerId));
|
3845
3855
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
@@ -4280,7 +4290,7 @@ import {
|
|
4280
4290
|
selectPeerNameByID as selectPeerNameByID3,
|
4281
4291
|
selectPermissions as selectPermissions10,
|
4282
4292
|
selectSessionStore,
|
4283
|
-
useHMSActions as
|
4293
|
+
useHMSActions as useHMSActions19,
|
4284
4294
|
useHMSNotifications,
|
4285
4295
|
useHMSStore as useHMSStore29
|
4286
4296
|
} from "@100mslive/react-sdk";
|
@@ -4294,13 +4304,13 @@ import AutoSizer from "react-virtualized-auto-sizer";
|
|
4294
4304
|
import { VariableSizeList } from "react-window";
|
4295
4305
|
import {
|
4296
4306
|
selectHMSMessages,
|
4297
|
-
selectLocalPeerID as
|
4307
|
+
selectLocalPeerID as selectLocalPeerID7,
|
4298
4308
|
selectLocalPeerRoleName,
|
4299
4309
|
selectMessagesByPeerID,
|
4300
4310
|
selectMessagesByRole,
|
4301
4311
|
selectPeerNameByID as selectPeerNameByID2,
|
4302
4312
|
selectPermissions as selectPermissions9,
|
4303
|
-
useHMSActions as
|
4313
|
+
useHMSActions as useHMSActions16,
|
4304
4314
|
useHMSStore as useHMSStore26
|
4305
4315
|
} from "@100mslive/react-sdk";
|
4306
4316
|
import { PinIcon, VerticalMenuIcon as VerticalMenuIcon5 } from "@100mslive/react-icons";
|
@@ -4313,12 +4323,12 @@ import { useCallback as useCallback10 } from "react";
|
|
4313
4323
|
import {
|
4314
4324
|
selectPeerNameByID,
|
4315
4325
|
selectSessionMetadata,
|
4316
|
-
useHMSActions as
|
4326
|
+
useHMSActions as useHMSActions15,
|
4317
4327
|
useHMSStore as useHMSStore25,
|
4318
4328
|
useHMSVanillaStore as useHMSVanillaStore5
|
4319
4329
|
} from "@100mslive/react-sdk";
|
4320
4330
|
var useSetPinnedMessage = () => {
|
4321
|
-
const hmsActions =
|
4331
|
+
const hmsActions = useHMSActions15();
|
4322
4332
|
const vanillaStore = useHMSVanillaStore5();
|
4323
4333
|
const pinnedMessage = useHMSStore25(selectSessionMetadata);
|
4324
4334
|
const setPinnedMessage = useCallback10(
|
@@ -4446,8 +4456,8 @@ var ChatMessage = React52.memo(({ index, style = {}, message, setRowHeight, onPi
|
|
4446
4456
|
const isMobile = useMedia11(config.media.md);
|
4447
4457
|
const { elements } = useRoomLayoutConferencingScreen();
|
4448
4458
|
const isOverlay = ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
|
4449
|
-
const hmsActions =
|
4450
|
-
const localPeerId = useHMSStore26(
|
4459
|
+
const hmsActions = useHMSActions16();
|
4460
|
+
const localPeerId = useHMSStore26(selectLocalPeerID7);
|
4451
4461
|
const permissions = useHMSStore26(selectPermissions9);
|
4452
4462
|
const messageType = getMessageType({
|
4453
4463
|
roles: message.recipientRoles,
|
@@ -4654,14 +4664,14 @@ import React53, { useCallback as useCallback13, useEffect as useEffect19, useRef
|
|
4654
4664
|
import { useMedia as useMedia12 } from "react-use";
|
4655
4665
|
import data2 from "@emoji-mart/data";
|
4656
4666
|
import Picker from "@emoji-mart/react";
|
4657
|
-
import { useHMSActions as
|
4667
|
+
import { useHMSActions as useHMSActions18 } from "@100mslive/react-sdk";
|
4658
4668
|
import { EmojiIcon as EmojiIcon3, SendIcon } from "@100mslive/react-icons";
|
4659
4669
|
|
4660
4670
|
// src/Prebuilt/components/AppData/useChatState.js
|
4661
4671
|
import { useCallback as useCallback12 } from "react";
|
4662
|
-
import { selectAppData as selectAppData2, useHMSActions as
|
4672
|
+
import { selectAppData as selectAppData2, useHMSActions as useHMSActions17, useHMSStore as useHMSStore27 } from "@100mslive/react-sdk";
|
4663
4673
|
var useChatDraftMessage = () => {
|
4664
|
-
const hmsActions =
|
4674
|
+
const hmsActions = useHMSActions17();
|
4665
4675
|
let chatDraftMessage = useHMSStore27(selectAppData2(APP_DATA.chatDraft));
|
4666
4676
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
4667
4677
|
chatDraftMessage = "";
|
@@ -4759,7 +4769,7 @@ var ChatFooter = ({
|
|
4759
4769
|
children
|
4760
4770
|
}) => {
|
4761
4771
|
var _a;
|
4762
|
-
const hmsActions =
|
4772
|
+
const hmsActions = useHMSActions18();
|
4763
4773
|
const inputRef = useRef12(null);
|
4764
4774
|
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
4765
4775
|
const isMobile = useMedia12(config.media.md);
|
@@ -4827,7 +4837,8 @@ var ChatFooter = ({
|
|
4827
4837
|
css: {
|
4828
4838
|
c: "$on_surface_high",
|
4829
4839
|
"&:valid ~ .send-msg": { color: "$on_surface_high" },
|
4830
|
-
"& ~ .send-msg": { color: "$on_surface_low" }
|
4840
|
+
"& ~ .send-msg": { color: "$on_surface_low" },
|
4841
|
+
"&::placeholder": { color: "$on_surface_medium" }
|
4831
4842
|
},
|
4832
4843
|
placeholder: "Send a message....",
|
4833
4844
|
ref: inputRef,
|
@@ -4939,7 +4950,7 @@ var Chat = ({ screenType }) => {
|
|
4939
4950
|
});
|
4940
4951
|
const [isSelectorOpen] = useState31(false);
|
4941
4952
|
const listRef = useRef13(null);
|
4942
|
-
const hmsActions =
|
4953
|
+
const hmsActions = useHMSActions19();
|
4943
4954
|
const { setPinnedMessage } = useSetPinnedMessage();
|
4944
4955
|
useEffect20(() => {
|
4945
4956
|
if (notification && notification.data && peerSelector === notification.data.id) {
|
@@ -5069,6 +5080,9 @@ var tabTriggerCSS = {
|
|
5069
5080
|
w: "100%",
|
5070
5081
|
justifyContent: "center"
|
5071
5082
|
};
|
5083
|
+
var ParticipantCount2 = ({ count }) => {
|
5084
|
+
return count < 1e3 ? /* @__PURE__ */ React55.createElement("span", null, "(", count, ")") : /* @__PURE__ */ React55.createElement(Tooltip, { title: count }, /* @__PURE__ */ React55.createElement("span", null, "(", getFormattedCount(count), ")"));
|
5085
|
+
};
|
5072
5086
|
var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
|
5073
5087
|
var _a;
|
5074
5088
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
@@ -5106,7 +5120,7 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5106
5120
|
transition: "margin 0.3s ease-in-out"
|
5107
5121
|
}
|
5108
5122
|
},
|
5109
|
-
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType }) : /* @__PURE__ */ React55.createElement(React55.Fragment, null, hideTabs ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" :
|
5123
|
+
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType }) : /* @__PURE__ */ React55.createElement(React55.Fragment, null, hideTabs ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ React55.createElement("span", null, "Participants ", /* @__PURE__ */ React55.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType }) : /* @__PURE__ */ React55.createElement(ParticipantList, null)) : /* @__PURE__ */ React55.createElement(
|
5110
5124
|
Tabs.Root,
|
5111
5125
|
{
|
5112
5126
|
value: activeTab,
|
@@ -5135,9 +5149,8 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
|
|
5135
5149
|
color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? "$on_surface_low" : "$on_surface_high"
|
5136
5150
|
})
|
5137
5151
|
},
|
5138
|
-
"Participants
|
5139
|
-
peerCount
|
5140
|
-
")"
|
5152
|
+
"Participants ",
|
5153
|
+
/* @__PURE__ */ React55.createElement(ParticipantCount2, { count: peerCount })
|
5141
5154
|
)),
|
5142
5155
|
/* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(ParticipantList, null)),
|
5143
5156
|
/* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(Chat, { screenType }))
|
@@ -5171,7 +5184,7 @@ var rtmp_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABlCAYAAA
|
|
5171
5184
|
|
5172
5185
|
// src/Prebuilt/components/Streaming/HLSStreaming.jsx
|
5173
5186
|
import React56, { Fragment as Fragment9, useCallback as useCallback15, useEffect as useEffect22, useState as useState33 } from "react";
|
5174
|
-
import { selectRoomID, useHMSActions as
|
5187
|
+
import { selectRoomID, useHMSActions as useHMSActions20, useHMSStore as useHMSStore31, useRecordingStreaming as useRecordingStreaming6 } from "@100mslive/react-sdk";
|
5175
5188
|
import {
|
5176
5189
|
EndStreamIcon as EndStreamIcon2,
|
5177
5190
|
EyeOpenIcon,
|
@@ -5255,7 +5268,7 @@ var HLSStreaming = ({ onBack }) => {
|
|
5255
5268
|
var StartHLS = () => {
|
5256
5269
|
const [record, setRecord] = useState33(false);
|
5257
5270
|
const [error, setError] = useState33(false);
|
5258
|
-
const hmsActions =
|
5271
|
+
const hmsActions = useHMSActions20();
|
5259
5272
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
5260
5273
|
const startHLS = useCallback15(
|
5261
5274
|
(variants) => __async(void 0, null, function* () {
|
@@ -5290,7 +5303,7 @@ var StartHLS = () => {
|
|
5290
5303
|
)), /* @__PURE__ */ React56.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ React56.createElement(Text, null, /* @__PURE__ */ React56.createElement(InfoIcon4, { width: 16, height: 16 })), /* @__PURE__ */ React56.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.")));
|
5291
5304
|
};
|
5292
5305
|
var EndHLS = ({ setShowLinks }) => {
|
5293
|
-
const hmsActions =
|
5306
|
+
const hmsActions = useHMSActions20();
|
5294
5307
|
const [inProgress, setInProgress] = useState33(false);
|
5295
5308
|
const [error, setError] = useState33("");
|
5296
5309
|
const { isHLSRunning } = useRecordingStreaming6();
|
@@ -5508,7 +5521,7 @@ var WaitingView = React59.memo(() => {
|
|
5508
5521
|
});
|
5509
5522
|
|
5510
5523
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
5511
|
-
var HLSView = React60.lazy(() => import("./HLSView-
|
5524
|
+
var HLSView = React60.lazy(() => import("./HLSView-F5BDZVT2.js"));
|
5512
5525
|
var VideoStreamingSection = ({
|
5513
5526
|
screenType,
|
5514
5527
|
elements,
|
@@ -5517,7 +5530,7 @@ var VideoStreamingSection = ({
|
|
5517
5530
|
var _a, _b;
|
5518
5531
|
const localPeerRole = useHMSStore34(selectLocalPeerRoleName2);
|
5519
5532
|
const isConnected = useHMSStore34(selectIsConnectedToRoom6);
|
5520
|
-
const hmsActions =
|
5533
|
+
const hmsActions = useHMSActions21();
|
5521
5534
|
const waitingViewerRole = useWaitingViewerRole();
|
5522
5535
|
const urlToIframe = useUrlToEmbed();
|
5523
5536
|
const pdfAnnotatorActive = usePDFAnnotator();
|
@@ -5570,11 +5583,11 @@ import {
|
|
5570
5583
|
selectLocalPeerRoleName as selectLocalPeerRoleName3,
|
5571
5584
|
selectRoleChangeRequest,
|
5572
5585
|
useCustomEvent as useCustomEvent2,
|
5573
|
-
useHMSActions as
|
5586
|
+
useHMSActions as useHMSActions22,
|
5574
5587
|
useHMSStore as useHMSStore35
|
5575
5588
|
} from "@100mslive/react-sdk";
|
5576
5589
|
var RoleChangeRequestModal = () => {
|
5577
|
-
const hmsActions =
|
5590
|
+
const hmsActions = useHMSActions22();
|
5578
5591
|
const { updateMetaData } = useMyMetadata();
|
5579
5592
|
const currentRole = useHMSStore35(selectLocalPeerRoleName3);
|
5580
5593
|
const roleChangeRequest = useHMSStore35(selectRoleChangeRequest);
|
@@ -5615,13 +5628,14 @@ var RoleChangeRequestModal = () => {
|
|
5615
5628
|
yield hmsActions.rejectChangeRole(roleChangeRequest);
|
5616
5629
|
sendEvent(__spreadProps(__spreadValues({}, roleChangeRequest), { peerName: name }), { peerId: (_a = roleChangeRequest.requestedBy) == null ? void 0 : _a.id });
|
5617
5630
|
yield hmsActions.cancelMidCallPreview();
|
5618
|
-
yield
|
5631
|
+
yield hmsActions.lowerLocalPeerHand();
|
5619
5632
|
}
|
5620
5633
|
}),
|
5621
5634
|
body,
|
5622
5635
|
onAction: () => __async(void 0, null, function* () {
|
5623
5636
|
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
5624
|
-
yield updateMetaData({
|
5637
|
+
yield updateMetaData({ prevRole: currentRole });
|
5638
|
+
yield hmsActions.lowerLocalPeerHand();
|
5625
5639
|
}),
|
5626
5640
|
actionText: "Accept"
|
5627
5641
|
}
|
@@ -5647,7 +5661,7 @@ var Conference = () => {
|
|
5647
5661
|
const roomState = useHMSStore36(selectRoomState);
|
5648
5662
|
const prevState = usePrevious(roomState);
|
5649
5663
|
const isConnectedToRoom = useHMSStore36(selectIsConnectedToRoom7);
|
5650
|
-
const hmsActions =
|
5664
|
+
const hmsActions = useHMSActions23();
|
5651
5665
|
const [hideControls, setHideControls] = useState35(false);
|
5652
5666
|
const dropdownList = useHMSStore36(selectAppData4(APP_DATA.dropdownList));
|
5653
5667
|
const authTokenInAppData = useAuthToken();
|
@@ -5781,4 +5795,4 @@ var conference_default = Conference;
|
|
5781
5795
|
export {
|
5782
5796
|
conference_default as default
|
5783
5797
|
};
|
5784
|
-
//# sourceMappingURL=conference-
|
5798
|
+
//# sourceMappingURL=conference-6IVZHILI.js.map
|