@100mslive/roomkit-react 0.1.1 → 0.1.2-alpha.1
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/README.md +18 -0
- package/dist/Accordion/Accordion.d.ts +62 -138
- package/dist/Accordion/index.d.ts +62 -138
- package/dist/{ActiveSpeakerView-G32BDM5F.js → ActiveSpeakerView-N7C6WL27.js} +6 -6
- package/dist/{ActiveSpeakerView-LW4WDBC6.css → ActiveSpeakerView-ZOCC7LQW.css} +2 -2
- package/dist/{PinnedTrackView-OAA4HAID.css.map → ActiveSpeakerView-ZOCC7LQW.css.map} +2 -2
- package/dist/Avatar/Avatar.d.ts +31 -69
- package/dist/Button/Button.d.ts +31 -69
- package/dist/Checkbox/Checkbox.d.ts +62 -138
- package/dist/Collapsible/Collapsible.d.ts +93 -207
- package/dist/Divider/Divider.d.ts +62 -138
- package/dist/Dropdown/Dropdown.d.ts +372 -828
- package/dist/Fieldset/Fieldset.d.ts +31 -69
- package/dist/Footer/Footer.d.ts +248 -552
- package/dist/{HLSView-ZYNT3HJD.js → HLSView-3ILTIGBT.js} +16 -16
- package/dist/HLSView-3ILTIGBT.js.map +7 -0
- package/dist/{HLSView-DIQQF2PP.css → HLSView-OVDMVJX5.css} +2 -2
- package/dist/{HLSView-DIQQF2PP.css.map → HLSView-OVDMVJX5.css.map} +2 -2
- package/dist/IconButton/IconButton.d.ts +31 -69
- package/dist/Input/Input.d.ts +189 -417
- package/dist/Label/Label.d.ts +31 -69
- package/dist/Layout/Box.d.ts +31 -69
- package/dist/Layout/Flex.d.ts +31 -69
- package/dist/Link/Link.d.ts +31 -69
- package/dist/Modal/Dialog.d.ts +248 -552
- package/dist/Modal/DialogContent.d.ts +217 -483
- package/dist/Pagination/StyledPagination.d.ts +124 -276
- package/dist/{PinnedTrackView-GTXL2UTS.js → PinnedTrackView-6N6N5WOF.js} +6 -6
- package/dist/{PinnedTrackView-OAA4HAID.css → PinnedTrackView-RIL5IW5A.css} +2 -2
- package/dist/{conference-LE4T3ZNF.css.map → PinnedTrackView-RIL5IW5A.css.map} +2 -2
- package/dist/Popover/index.d.ts +93 -207
- package/dist/Prebuilt/provider/roomLayoutProvider/constants/index.d.ts +2 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +9 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +9 -0
- package/dist/Progress/index.d.ts +62 -138
- package/dist/RadioGroup/RadioGroup.d.ts +93 -207
- package/dist/ReactSelect/ReactSelect.d.ts +310 -690
- package/dist/Select/Select.d.ts +93 -207
- package/dist/Slider/Slider.d.ts +31 -69
- package/dist/Stats/StyledStats.d.ts +186 -414
- package/dist/Switch/Switch.d.ts +31 -69
- package/dist/Tabs/Tabs.d.ts +124 -276
- package/dist/Text/Text.d.ts +31 -69
- package/dist/Theme/ThemeProvider.d.ts +63 -140
- package/dist/Theme/base.config.d.ts +31 -53
- package/dist/Theme/index.d.ts +0 -1
- package/dist/Theme/stitches.config.d.ts +404 -915
- package/dist/TileMenu/StyledMenuTile.d.ts +217 -483
- package/dist/Toast/Toast.d.ts +187 -415
- package/dist/Video/Video.d.ts +31 -69
- package/dist/VideoList/StyledVideoList.d.ts +93 -207
- package/dist/VideoTile/StyledVideoTile.d.ts +279 -621
- package/dist/{VirtualBackground-HWU22Q6S.js → VirtualBackground-R3JHARN5.js} +4 -3
- package/dist/{VirtualBackground-HWU22Q6S.js.map → VirtualBackground-R3JHARN5.js.map} +2 -2
- package/dist/chunk-DH3QSV4E.js +58 -0
- package/dist/chunk-DH3QSV4E.js.map +7 -0
- package/dist/{chunk-4VY5NUK7.js → chunk-DRKV2LAC.js} +49 -146
- package/dist/chunk-DRKV2LAC.js.map +7 -0
- package/dist/{chunk-TEHZYXCJ.js → chunk-G56Z3JA5.js} +167 -164
- package/dist/chunk-G56Z3JA5.js.map +7 -0
- package/dist/{chunk-A2PNZIK7.js → chunk-INRXWU7L.js} +4 -4
- package/dist/{chunk-A2PNZIK7.js.map → chunk-INRXWU7L.js.map} +1 -1
- package/dist/chunk-TZJCHZPD.js +8626 -0
- package/dist/chunk-TZJCHZPD.js.map +7 -0
- package/dist/{conference-LE4T3ZNF.css → conference-AIOOA5ON.css} +2 -2
- package/dist/{ActiveSpeakerView-LW4WDBC6.css.map → conference-AIOOA5ON.css.map} +2 -2
- package/dist/{conference-YHO2J3Z6.js → conference-IKSFGLVK.js} +514 -629
- package/dist/conference-IKSFGLVK.js.map +7 -0
- package/dist/index.cjs.css +1 -1
- package/dist/index.cjs.css.map +2 -2
- package/dist/index.cjs.js +3022 -2927
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +4 -8
- package/dist/meta.cjs.json +736 -588
- package/dist/meta.esbuild.json +837 -692
- package/dist/{transcription-L6VBK75V.js → transcription-XYVVYRAS.js} +3 -3
- package/package.json +13 -9
- package/src/Accordion/Accordion.tsx +3 -3
- package/src/AudioLevel/AudioLevel.tsx +1 -1
- package/src/Avatar/Avatar.tsx +8 -3
- package/src/Button/Button.tsx +76 -20
- package/src/Checkbox/Checkbox.tsx +4 -4
- package/src/Collapsible/Collapsible.tsx +1 -1
- package/src/Divider/Divider.tsx +2 -2
- package/src/Divider/HorizontalDivider.stories.tsx +2 -2
- package/src/Divider/VerticalDivider.stories.tsx +1 -1
- package/src/Dropdown/Dropdown.stories.tsx +3 -3
- package/src/Dropdown/Dropdown.tsx +16 -14
- package/src/IconButton/IconButton.tsx +8 -7
- package/src/Input/Input.tsx +9 -8
- package/src/Input/PasswordInput.stories.tsx +2 -2
- package/src/Label/Label.tsx +1 -1
- package/src/Link/Link.tsx +4 -4
- package/src/Loading/Loading.tsx +7 -10
- package/src/Modal/Dialog.stories.tsx +2 -2
- package/src/Modal/DialogContent.tsx +3 -3
- package/src/Pagination/StyledPagination.tsx +4 -4
- package/src/Popover/Popover.stories.tsx +5 -5
- package/src/Popover/index.tsx +1 -1
- package/src/Prebuilt/App.jsx +101 -68
- package/src/Prebuilt/AppContext.jsx +1 -1
- package/src/Prebuilt/IconButton.jsx +2 -2
- package/src/Prebuilt/Prebuilt.stories.tsx +8 -2
- package/src/Prebuilt/common/constants.js +0 -1
- package/src/Prebuilt/common/utils.js +0 -6
- package/src/Prebuilt/components/AppData/AppData.jsx +7 -4
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +73 -20
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +1 -1
- package/src/Prebuilt/components/Chat/Chat.jsx +6 -2
- package/src/Prebuilt/components/Chat/ChatBody.jsx +13 -11
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +2 -2
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +3 -3
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +2 -2
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +6 -6
- package/src/Prebuilt/components/Chip.jsx +24 -0
- package/src/Prebuilt/components/Connection/ConnectionIndicator.jsx +6 -6
- package/src/Prebuilt/components/Connection/TileConnection.jsx +2 -2
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +4 -4
- package/src/Prebuilt/components/EmojiReaction.jsx +13 -10
- package/src/Prebuilt/components/ErrorBoundary.jsx +2 -2
- package/src/Prebuilt/components/Footer/ConferencingFooter.jsx +1 -4
- package/src/Prebuilt/components/FullPageProgress.jsx +5 -3
- package/src/Prebuilt/components/GoLiveButton.jsx +1 -4
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -1
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +1 -1
- package/src/Prebuilt/components/Header/AdditionalRoomState.jsx +17 -17
- package/src/Prebuilt/components/Header/AmbientMusic.jsx +1 -1
- package/src/Prebuilt/components/Header/ConferencingHeader.jsx +4 -6
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +10 -5
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +2 -2
- package/src/Prebuilt/components/Header/ParticipantList.jsx +2 -2
- package/src/Prebuilt/components/Header/StreamActions.jsx +9 -19
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +5 -6
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +2 -2
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +102 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.stories.tsx +40 -0
- package/src/Prebuilt/components/LeaveRoom.jsx +11 -11
- package/src/Prebuilt/components/MetaActions.jsx +2 -2
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +2 -2
- package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +1 -0
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +69 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +1 -3
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +108 -26
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +1 -1
- package/src/Prebuilt/components/PIP/pipUtils.js +2 -2
- package/src/Prebuilt/components/Playlist/Playlist.jsx +4 -4
- package/src/Prebuilt/components/Playlist/PlaylistControls.jsx +3 -3
- package/src/Prebuilt/components/Playlist/PlaylistItem.jsx +3 -3
- package/src/Prebuilt/components/Playlist/VideoPlayer.jsx +4 -4
- package/src/Prebuilt/components/PostLeave.jsx +4 -4
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +17 -6
- package/src/Prebuilt/components/Preview/PreviewForm.jsx +74 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +102 -39
- package/src/Prebuilt/components/RoleChangeModal.jsx +3 -3
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +2 -2
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +8 -32
- package/src/Prebuilt/components/Settings/StartRecording.jsx +4 -12
- package/src/Prebuilt/components/Settings/SwitchWithLabel.jsx +2 -3
- package/src/Prebuilt/components/Settings/common.js +26 -0
- package/src/Prebuilt/components/StatsForNerds.jsx +5 -5
- package/src/Prebuilt/components/Streaming/Common.jsx +11 -11
- package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +6 -12
- package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +4 -6
- package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +4 -4
- package/src/Prebuilt/components/TileMenu.jsx +7 -7
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +12 -20
- package/src/Prebuilt/components/conference.jsx +9 -2
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +1 -4
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +2 -2
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +2 -2
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +12 -20
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +4 -4
- package/src/Prebuilt/images/Logo.svg +8 -0
- package/src/Prebuilt/images/first_person.png +0 -0
- package/src/Prebuilt/images/rtmp.png +0 -0
- package/src/Prebuilt/index.d.ts +6 -1
- package/src/Prebuilt/layouts/HLSView.jsx +1 -1
- package/src/Prebuilt/layouts/InsetView.jsx +0 -3
- package/src/Prebuilt/layouts/NonPublisherView.jsx +2 -2
- package/src/Prebuilt/layouts/SidePane.jsx +1 -1
- package/src/Prebuilt/layouts/WaitingView.jsx +2 -2
- package/src/Prebuilt/layouts/mainView.jsx +42 -5
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +2 -2
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -0
- package/src/Prebuilt/plugins/whiteboard/ToggleWhiteboard.jsx +1 -3
- package/src/Prebuilt/primitives/DialogContent.jsx +4 -4
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +3 -3
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +33 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +57 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +26 -0
- package/src/Progress/index.tsx +2 -2
- package/src/RadioGroup/RadioGroup.tsx +3 -3
- package/src/ReactSelect/ReactSelect.stories.tsx +7 -7
- package/src/ReactSelect/ReactSelect.tsx +8 -8
- package/src/Select/Select.tsx +6 -6
- package/src/Slider/Slider.tsx +5 -5
- package/src/Stats/Stats.tsx +12 -2
- package/src/Stats/StyledStats.tsx +3 -3
- package/src/Switch/Switch.tsx +5 -5
- package/src/Tabs/Tabs.stories.tsx +2 -2
- package/src/Tabs/Tabs.tsx +2 -2
- package/src/Text/Text.tsx +2 -2
- package/src/Theme/ThemeProvider.tsx +4 -7
- package/src/Theme/ThemeStory.jsx +17 -19
- package/src/Theme/base.config.ts +31 -59
- package/src/Theme/index.tsx +0 -1
- package/src/Theme/stitches.config.ts +2 -7
- package/src/TileMenu/StyledMenuTile.tsx +9 -8
- package/src/Toast/Toast.tsx +10 -9
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/Tooltip.tsx +4 -4
- package/src/Video/Video.tsx +1 -1
- package/src/VideoTile/StyledVideoTile.tsx +12 -12
- package/src/assets/android-perm-0.png +0 -0
- package/src/assets/android-perm-1.png +0 -0
- package/src/assets/ios-perm-0.png +0 -0
- package/src/fixtures/chats.ts +1 -1
- package/dist/HLSView-ZYNT3HJD.js.map +0 -7
- package/dist/Theme/themes.d.ts +0 -64
- package/dist/chunk-4VY5NUK7.js.map +0 -7
- package/dist/chunk-BSQIN5RC.js +0 -65
- package/dist/chunk-BSQIN5RC.js.map +0 -7
- package/dist/chunk-TEHZYXCJ.js.map +0 -7
- package/dist/chunk-ZET2HMGS.js +0 -8331
- package/dist/chunk-ZET2HMGS.js.map +0 -7
- package/dist/conference-YHO2J3Z6.js.map +0 -7
- package/src/Prebuilt/components/Preview/PreviewName.jsx +0 -37
- package/src/Prebuilt/components/Streaming/RTMPIcon.jsx +0 -69
- package/src/Prebuilt/hms.js +0 -7
- package/src/Prebuilt/plugins/confetti.jsx +0 -60
- package/src/Theme/themes.ts +0 -70
- /package/dist/{ActiveSpeakerView-G32BDM5F.js.map → ActiveSpeakerView-N7C6WL27.js.map} +0 -0
- /package/dist/{PinnedTrackView-GTXL2UTS.js.map → PinnedTrackView-6N6N5WOF.js.map} +0 -0
- /package/dist/{transcription-L6VBK75V.js.map → transcription-XYVVYRAS.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
VideoList_default,
|
|
7
7
|
VideoTile_default,
|
|
8
8
|
useAppConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G56Z3JA5.js";
|
|
10
10
|
import {
|
|
11
11
|
AudioVideoToggle,
|
|
12
12
|
Button,
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
Slider,
|
|
40
40
|
StreamActions,
|
|
41
41
|
Switch,
|
|
42
|
+
ThemeTypes,
|
|
42
43
|
ToastManager,
|
|
43
44
|
UserPreferencesKeys,
|
|
44
45
|
Video,
|
|
@@ -58,6 +59,7 @@ import {
|
|
|
58
59
|
useNavigation,
|
|
59
60
|
usePDFAnnotator,
|
|
60
61
|
usePinnedTrack,
|
|
62
|
+
useRoomLayout,
|
|
61
63
|
useSetAppDataByKey,
|
|
62
64
|
useSetUiSettings,
|
|
63
65
|
useSidepaneToggle,
|
|
@@ -68,17 +70,17 @@ import {
|
|
|
68
70
|
useUserPreferences,
|
|
69
71
|
useWaitingViewerRole,
|
|
70
72
|
useWhiteboardMetadata
|
|
71
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-TZJCHZPD.js";
|
|
72
74
|
import {
|
|
73
75
|
Loading,
|
|
74
76
|
useIsFeatureEnabled,
|
|
75
77
|
useRolePreference
|
|
76
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-DH3QSV4E.js";
|
|
77
79
|
import {
|
|
78
80
|
Box,
|
|
79
81
|
Flex,
|
|
80
82
|
Text
|
|
81
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-INRXWU7L.js";
|
|
82
84
|
import {
|
|
83
85
|
APP_DATA,
|
|
84
86
|
DEFAULT_HLS_VIEWER_ROLE,
|
|
@@ -106,39 +108,92 @@ import {
|
|
|
106
108
|
isMacOS,
|
|
107
109
|
isSafari,
|
|
108
110
|
styled
|
|
109
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-DRKV2LAC.js";
|
|
110
112
|
|
|
111
113
|
// src/Prebuilt/components/conference.jsx
|
|
112
114
|
init_define_process_env();
|
|
113
|
-
import
|
|
115
|
+
import React38, { useEffect as useEffect9, useRef as useRef7, useState as useState17 } from "react";
|
|
114
116
|
import { useParams } from "react-router-dom";
|
|
115
117
|
import { usePrevious } from "react-use";
|
|
116
118
|
import {
|
|
117
119
|
HMSRoomState,
|
|
118
|
-
selectAppData as
|
|
120
|
+
selectAppData as selectAppData3,
|
|
119
121
|
selectIsConnectedToRoom as selectIsConnectedToRoom2,
|
|
120
122
|
selectRoomState,
|
|
121
|
-
useHMSActions as
|
|
123
|
+
useHMSActions as useHMSActions16,
|
|
122
124
|
useHMSStore as useHMSStore21
|
|
123
125
|
} from "@100mslive/react-sdk";
|
|
124
126
|
|
|
127
|
+
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
|
128
|
+
init_define_process_env();
|
|
129
|
+
import React, { useCallback, useState } from "react";
|
|
130
|
+
import { selectHLSState, useHMSActions, useHMSStore } from "@100mslive/react-sdk";
|
|
131
|
+
function HLSFailureModal() {
|
|
132
|
+
const { hlsError } = useHMSStore(selectHLSState).error || false;
|
|
133
|
+
const [openModal, setOpenModal] = useState(!!hlsError);
|
|
134
|
+
const hmsActions = useHMSActions();
|
|
135
|
+
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
|
136
|
+
const startHLS = useCallback(() => __async(this, null, function* () {
|
|
137
|
+
try {
|
|
138
|
+
if (isHLSStarted) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
setHLSStarted(true);
|
|
142
|
+
yield hmsActions.startHLSStreaming({});
|
|
143
|
+
} catch (error) {
|
|
144
|
+
if (error.message.includes("invalid input")) {
|
|
145
|
+
yield startHLS();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
setHLSStarted(false);
|
|
149
|
+
}
|
|
150
|
+
}), [hmsActions, isHLSStarted, setHLSStarted]);
|
|
151
|
+
return hlsError ? /* @__PURE__ */ React.createElement(
|
|
152
|
+
Dialog.Root,
|
|
153
|
+
{
|
|
154
|
+
open: openModal,
|
|
155
|
+
onOpenChange: (value) => {
|
|
156
|
+
if (!value) {
|
|
157
|
+
setOpenModal(false);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
/* @__PURE__ */ React.createElement(Dialog.Portal, null, /* @__PURE__ */ React.createElement(Dialog.Overlay, null), /* @__PURE__ */ React.createElement(Dialog.Content, { css: { w: "min(360px, 90%)" } }, /* @__PURE__ */ React.createElement(
|
|
162
|
+
Dialog.Title,
|
|
163
|
+
{
|
|
164
|
+
css: {
|
|
165
|
+
display: "flex",
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
justifyContent: "space-between",
|
|
168
|
+
borderBottom: "1px solid $border_default",
|
|
169
|
+
mt: "$4"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
/* @__PURE__ */ React.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, "Failed to Go Live")
|
|
173
|
+
), /* @__PURE__ */ React.createElement(Text, { variant: "sm", css: { mb: "$10", color: "$on_surface_medium" } }, "Something went wrong and your live broadcast failed. Please try again."), /* @__PURE__ */ React.createElement(Flex, { align: "center", justify: "between", css: { w: "100%", gap: "$8" } }, /* @__PURE__ */ React.createElement(Button, { outlined: true, variant: "standard", css: { w: "100%" }, onClick: () => setOpenModal(false) }, "Dismiss"), /* @__PURE__ */ React.createElement(Button, { css: { w: "100%" } }, "Go Live"))))
|
|
174
|
+
) : null;
|
|
175
|
+
}
|
|
176
|
+
|
|
125
177
|
// src/Prebuilt/layouts/mainView.jsx
|
|
126
178
|
init_define_process_env();
|
|
127
|
-
import
|
|
179
|
+
import React12, { Suspense, useCallback as useCallback5, useEffect as useEffect5 } from "react";
|
|
180
|
+
import { JoinForm_JoinBtnType } from "@100mslive/types-prebuilt/elements/join_form";
|
|
128
181
|
import {
|
|
129
182
|
selectIsConnectedToRoom,
|
|
130
183
|
selectLocalPeerRoleName as selectLocalPeerRoleName3,
|
|
131
184
|
selectPeerScreenSharing as selectPeerScreenSharing3,
|
|
132
185
|
selectPeerSharingAudio,
|
|
133
186
|
selectPeerSharingVideoPlaylist as selectPeerSharingVideoPlaylist3,
|
|
187
|
+
selectPermissions,
|
|
134
188
|
selectTemplateAppData,
|
|
135
|
-
useHMSActions as
|
|
136
|
-
useHMSStore as
|
|
189
|
+
useHMSActions as useHMSActions6,
|
|
190
|
+
useHMSStore as useHMSStore10,
|
|
191
|
+
useRecordingStreaming
|
|
137
192
|
} from "@100mslive/react-sdk";
|
|
138
193
|
|
|
139
194
|
// src/Prebuilt/layouts/EmbedView.jsx
|
|
140
195
|
init_define_process_env();
|
|
141
|
-
import
|
|
196
|
+
import React6, { useCallback as useCallback3, useEffect, useMemo as useMemo2, useRef as useRef2, useState as useState2 } from "react";
|
|
142
197
|
import { useMedia as useMedia2 } from "react-use";
|
|
143
198
|
import {
|
|
144
199
|
selectLocalPeerID as selectLocalPeerID2,
|
|
@@ -146,13 +201,13 @@ import {
|
|
|
146
201
|
selectPeers as selectPeers2,
|
|
147
202
|
selectPeerScreenSharing as selectPeerScreenSharing2,
|
|
148
203
|
throwErrorHandler,
|
|
149
|
-
useHMSStore as
|
|
204
|
+
useHMSStore as useHMSStore6,
|
|
150
205
|
useScreenShare
|
|
151
206
|
} from "@100mslive/react-sdk";
|
|
152
207
|
|
|
153
208
|
// src/Prebuilt/layouts/screenShareView.jsx
|
|
154
209
|
init_define_process_env();
|
|
155
|
-
import
|
|
210
|
+
import React5, { Fragment, useCallback as useCallback2, useMemo } from "react";
|
|
156
211
|
import { useMedia } from "react-use";
|
|
157
212
|
import {
|
|
158
213
|
selectLocalPeerID,
|
|
@@ -161,26 +216,26 @@ import {
|
|
|
161
216
|
selectPeerScreenSharing,
|
|
162
217
|
selectPeerSharingVideoPlaylist as selectPeerSharingVideoPlaylist2,
|
|
163
218
|
selectScreenShareByPeerID,
|
|
164
|
-
useHMSStore as
|
|
219
|
+
useHMSStore as useHMSStore5
|
|
165
220
|
} from "@100mslive/react-sdk";
|
|
166
221
|
|
|
167
222
|
// src/Prebuilt/components/Playlist/VideoPlayer.jsx
|
|
168
223
|
init_define_process_env();
|
|
169
|
-
import
|
|
224
|
+
import React3, { useRef } from "react";
|
|
170
225
|
import { useFullscreen, useToggle } from "react-use";
|
|
171
226
|
import screenfull from "screenfull";
|
|
172
227
|
import {
|
|
173
228
|
selectVideoPlaylist as selectVideoPlaylist3,
|
|
174
229
|
selectVideoPlaylistAudioTrackByPeerID as selectVideoPlaylistAudioTrackByPeerID2,
|
|
175
230
|
selectVideoPlaylistVideoTrackByPeerID,
|
|
176
|
-
useHMSActions as
|
|
177
|
-
useHMSStore as
|
|
231
|
+
useHMSActions as useHMSActions4,
|
|
232
|
+
useHMSStore as useHMSStore4
|
|
178
233
|
} from "@100mslive/react-sdk";
|
|
179
234
|
import { CrossIcon, ExpandIcon, ShrinkIcon } from "@100mslive/react-icons";
|
|
180
235
|
|
|
181
236
|
// src/Prebuilt/components/Playlist/PlaylistControls.jsx
|
|
182
237
|
init_define_process_env();
|
|
183
|
-
import
|
|
238
|
+
import React2 from "react";
|
|
184
239
|
import {
|
|
185
240
|
HMSPlaylistType as HMSPlaylistType2,
|
|
186
241
|
selectAudioPlaylist as selectAudioPlaylist2,
|
|
@@ -188,8 +243,8 @@ import {
|
|
|
188
243
|
selectPeerSharingVideoPlaylist,
|
|
189
244
|
selectVideoPlaylist as selectVideoPlaylist2,
|
|
190
245
|
selectVideoPlaylistAudioTrackByPeerID,
|
|
191
|
-
useHMSActions as
|
|
192
|
-
useHMSStore as
|
|
246
|
+
useHMSActions as useHMSActions3,
|
|
247
|
+
useHMSStore as useHMSStore3
|
|
193
248
|
} from "@100mslive/react-sdk";
|
|
194
249
|
import { NextIcon, PauseIcon, PlayIcon, PlaylistIcon, PrevIcon, SpeakerIcon } from "@100mslive/react-icons";
|
|
195
250
|
|
|
@@ -199,16 +254,16 @@ import {
|
|
|
199
254
|
HMSPlaylistType,
|
|
200
255
|
selectAudioPlaylist,
|
|
201
256
|
selectVideoPlaylist,
|
|
202
|
-
useHMSActions,
|
|
203
|
-
useHMSStore
|
|
257
|
+
useHMSActions as useHMSActions2,
|
|
258
|
+
useHMSStore as useHMSStore2
|
|
204
259
|
} from "@100mslive/react-sdk";
|
|
205
260
|
var usePlaylist = (type) => {
|
|
206
261
|
const isAudioPlaylist = type === HMSPlaylistType.audio;
|
|
207
262
|
const selector = isAudioPlaylist ? selectAudioPlaylist : selectVideoPlaylist;
|
|
208
|
-
const active =
|
|
209
|
-
const selection =
|
|
210
|
-
const playlist =
|
|
211
|
-
const hmsActions =
|
|
263
|
+
const active = useHMSStore2(selector.selectedItem);
|
|
264
|
+
const selection = useHMSStore2(selector.selection);
|
|
265
|
+
const playlist = useHMSStore2(selector.list);
|
|
266
|
+
const hmsActions = useHMSActions2();
|
|
212
267
|
const playlistAction = isAudioPlaylist ? hmsActions.audioPlaylist : hmsActions.videoPlaylist;
|
|
213
268
|
return {
|
|
214
269
|
active,
|
|
@@ -222,13 +277,13 @@ var usePlaylist = (type) => {
|
|
|
222
277
|
// src/Prebuilt/components/Playlist/PlaylistControls.jsx
|
|
223
278
|
var Progress = ({ type, duration }) => {
|
|
224
279
|
const selectPlaylist = type === HMSPlaylistType2.audio ? selectAudioPlaylist2 : selectVideoPlaylist2;
|
|
225
|
-
const progress =
|
|
226
|
-
const hmsActions =
|
|
280
|
+
const progress = useHMSStore3(selectPlaylist.progress);
|
|
281
|
+
const hmsActions = useHMSActions3();
|
|
227
282
|
const playlistAction = type === HMSPlaylistType2.audio ? hmsActions.audioPlaylist : hmsActions.videoPlaylist;
|
|
228
283
|
if (!duration) {
|
|
229
284
|
return null;
|
|
230
285
|
}
|
|
231
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ React2.createElement(
|
|
232
287
|
Slider,
|
|
233
288
|
{
|
|
234
289
|
step: 1,
|
|
@@ -239,22 +294,12 @@ var Progress = ({ type, duration }) => {
|
|
|
239
294
|
}
|
|
240
295
|
);
|
|
241
296
|
};
|
|
242
|
-
var PlaylistActive = ({ type, onToggle }) => {
|
|
243
|
-
var _a, _b;
|
|
244
|
-
const isAudioPlaylist = type === HMSPlaylistType2.audio;
|
|
245
|
-
const selector = isAudioPlaylist ? selectAudioPlaylist2 : selectVideoPlaylist2;
|
|
246
|
-
const active = useHMSStore2(selector.selectedItem);
|
|
247
|
-
if (!active) {
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
return /* @__PURE__ */ React.createElement(Box, { css: { mt: "$8" } }, /* @__PURE__ */ React.createElement(Flex, { justify: "between", css: { w: "100%" } }, /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { variant: "md" }, active.name), ((_a = active.metadata) == null ? void 0 : _a.description) && /* @__PURE__ */ React.createElement(Text, { variant: "xs" }, (_b = active.metadata) == null ? void 0 : _b.description)), /* @__PURE__ */ React.createElement(IconButton, { onClick: onToggle, css: { alignSelf: "center" }, "data-testid": "playlist_collapse_btn" }, /* @__PURE__ */ React.createElement(PlaylistIcon, null))));
|
|
251
|
-
};
|
|
252
297
|
var Controls = ({ type, css = {} }) => {
|
|
253
298
|
const { active, hasNext, hasPrevious, actions } = usePlaylist(type);
|
|
254
299
|
if (!active) {
|
|
255
300
|
return null;
|
|
256
301
|
}
|
|
257
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ React2.createElement(Flex, { justify: "center", css }, /* @__PURE__ */ React2.createElement(
|
|
258
303
|
IconButton,
|
|
259
304
|
{
|
|
260
305
|
disabled: !hasPrevious,
|
|
@@ -263,8 +308,8 @@ var Controls = ({ type, css = {} }) => {
|
|
|
263
308
|
},
|
|
264
309
|
"data-testid": "playlist_prev_btn"
|
|
265
310
|
},
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
), /* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ React2.createElement(PrevIcon, null)
|
|
312
|
+
), /* @__PURE__ */ React2.createElement(
|
|
268
313
|
IconButton,
|
|
269
314
|
{
|
|
270
315
|
onClick: () => {
|
|
@@ -272,8 +317,8 @@ var Controls = ({ type, css = {} }) => {
|
|
|
272
317
|
},
|
|
273
318
|
"data-testid": "playlist_play_pause_btn"
|
|
274
319
|
},
|
|
275
|
-
active.playing ? /* @__PURE__ */
|
|
276
|
-
), /* @__PURE__ */
|
|
320
|
+
active.playing ? /* @__PURE__ */ React2.createElement(PauseIcon, { width: 32, height: 32 }) : /* @__PURE__ */ React2.createElement(PlayIcon, { width: 32, height: 32 })
|
|
321
|
+
), /* @__PURE__ */ React2.createElement(
|
|
277
322
|
IconButton,
|
|
278
323
|
{
|
|
279
324
|
disabled: !hasNext,
|
|
@@ -282,18 +327,18 @@ var Controls = ({ type, css = {} }) => {
|
|
|
282
327
|
},
|
|
283
328
|
"data-testid": "playlist_next_btn"
|
|
284
329
|
},
|
|
285
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ React2.createElement(NextIcon, null)
|
|
286
331
|
));
|
|
287
332
|
};
|
|
288
333
|
var VolumeControl = () => {
|
|
289
|
-
const hmsActions =
|
|
290
|
-
const volume =
|
|
291
|
-
const active =
|
|
292
|
-
const peerSharingPlaylist =
|
|
293
|
-
const audioTrack =
|
|
294
|
-
const audioTrackVolume =
|
|
334
|
+
const hmsActions = useHMSActions3();
|
|
335
|
+
const volume = useHMSStore3(selectVideoPlaylist2.volume);
|
|
336
|
+
const active = useHMSStore3(selectVideoPlaylist2.selectedItem);
|
|
337
|
+
const peerSharingPlaylist = useHMSStore3(selectPeerSharingVideoPlaylist);
|
|
338
|
+
const audioTrack = useHMSStore3(selectVideoPlaylistAudioTrackByPeerID(peerSharingPlaylist == null ? void 0 : peerSharingPlaylist.id));
|
|
339
|
+
const audioTrackVolume = useHMSStore3(selectAudioTrackVolume(audioTrack == null ? void 0 : audioTrack.id));
|
|
295
340
|
const sliderVolume = active ? volume : audioTrackVolume;
|
|
296
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ React2.createElement(Flex, { align: "center", css: { color: "$on_primary_high" } }, /* @__PURE__ */ React2.createElement(SpeakerIcon, null), /* @__PURE__ */ React2.createElement(
|
|
297
342
|
Slider,
|
|
298
343
|
{
|
|
299
344
|
css: { mx: "$4", w: "$20" },
|
|
@@ -313,28 +358,9 @@ var VolumeControl = () => {
|
|
|
313
358
|
}
|
|
314
359
|
));
|
|
315
360
|
};
|
|
316
|
-
var AudioPlaylistControls = ({ onToggle }) => {
|
|
317
|
-
const { active } = usePlaylist(HMSPlaylistType2.audio);
|
|
318
|
-
if (!active) {
|
|
319
|
-
return null;
|
|
320
|
-
}
|
|
321
|
-
return /* @__PURE__ */ React.createElement(
|
|
322
|
-
Box,
|
|
323
|
-
{
|
|
324
|
-
css: {
|
|
325
|
-
p: "$8",
|
|
326
|
-
borderTop: "1px solid $borderLight",
|
|
327
|
-
bg: "$menuBg"
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
/* @__PURE__ */ React.createElement(Controls, { type: HMSPlaylistType2.audio }),
|
|
331
|
-
/* @__PURE__ */ React.createElement(Progress, { type: HMSPlaylistType2.audio, duration: active.duration }),
|
|
332
|
-
/* @__PURE__ */ React.createElement(PlaylistActive, { type: HMSPlaylistType2.audio, onToggle })
|
|
333
|
-
);
|
|
334
|
-
};
|
|
335
361
|
var VideoPlaylistControls = ({ children }) => {
|
|
336
362
|
const { active } = usePlaylist(HMSPlaylistType2.video);
|
|
337
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ React2.createElement(
|
|
338
364
|
Box,
|
|
339
365
|
{
|
|
340
366
|
css: {
|
|
@@ -348,51 +374,51 @@ var VideoPlaylistControls = ({ children }) => {
|
|
|
348
374
|
}
|
|
349
375
|
}
|
|
350
376
|
},
|
|
351
|
-
active && /* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
377
|
+
active && /* @__PURE__ */ React2.createElement(Progress, { type: HMSPlaylistType2.video, duration: active.duration }),
|
|
378
|
+
/* @__PURE__ */ React2.createElement(Flex, { align: "center", justify: "between" }, /* @__PURE__ */ React2.createElement(VolumeControl, null), active && /* @__PURE__ */ React2.createElement(Controls, { css: { flex: "1 1 0" } }), children)
|
|
353
379
|
);
|
|
354
380
|
};
|
|
355
381
|
|
|
356
382
|
// src/Prebuilt/components/Playlist/VideoPlayer.jsx
|
|
357
|
-
var VideoPlayer =
|
|
358
|
-
const videoTrack =
|
|
359
|
-
const audioTrack =
|
|
360
|
-
const active =
|
|
383
|
+
var VideoPlayer = React3.memo(({ peerId }) => {
|
|
384
|
+
const videoTrack = useHMSStore4(selectVideoPlaylistVideoTrackByPeerID(peerId));
|
|
385
|
+
const audioTrack = useHMSStore4(selectVideoPlaylistAudioTrackByPeerID2(peerId));
|
|
386
|
+
const active = useHMSStore4(selectVideoPlaylist3.selectedItem);
|
|
361
387
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
|
362
|
-
const hmsActions =
|
|
388
|
+
const hmsActions = useHMSActions4();
|
|
363
389
|
const ref = useRef(null);
|
|
364
390
|
const [show, toggle] = useToggle(false);
|
|
365
391
|
const isFullscreen = useFullscreen(ref, show, {
|
|
366
392
|
onClose: () => toggle(false)
|
|
367
393
|
});
|
|
368
394
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
|
369
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ React3.createElement(Flex, { direction: "column", justify: "center", css: { w: "100%", h: "100%" }, ref }, active && /* @__PURE__ */ React3.createElement(
|
|
370
396
|
Flex,
|
|
371
397
|
{
|
|
372
398
|
justify: "between",
|
|
373
399
|
align: "center",
|
|
374
400
|
css: {
|
|
375
|
-
bg: "$
|
|
401
|
+
bg: "$surface_default",
|
|
376
402
|
p: "$2 $2 $2 $6",
|
|
377
403
|
borderTopLeftRadius: "$1",
|
|
378
404
|
borderTopRightRadius: "$1"
|
|
379
405
|
}
|
|
380
406
|
},
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ React3.createElement(Text, { css: { color: "$on_primary_high" } }, active.name),
|
|
408
|
+
/* @__PURE__ */ React3.createElement(
|
|
383
409
|
IconButton,
|
|
384
410
|
{
|
|
385
411
|
css: {
|
|
386
|
-
color: "$
|
|
412
|
+
color: "$on_primary_high"
|
|
387
413
|
},
|
|
388
414
|
onClick: () => {
|
|
389
415
|
hmsActions.videoPlaylist.stop();
|
|
390
416
|
},
|
|
391
417
|
"data-testid": "videoplaylist_cross_btn"
|
|
392
418
|
},
|
|
393
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ React3.createElement(CrossIcon, null)
|
|
394
420
|
)
|
|
395
|
-
), showStatsOnTiles ? /* @__PURE__ */
|
|
421
|
+
), showStatsOnTiles ? /* @__PURE__ */ React3.createElement(Box, { css: { "& > div": { top: "$14", left: "$8" } } }, /* @__PURE__ */ React3.createElement(
|
|
396
422
|
VideoTileStats,
|
|
397
423
|
{
|
|
398
424
|
audioTrackID: audioTrack == null ? void 0 : audioTrack.id,
|
|
@@ -400,7 +426,7 @@ var VideoPlayer = React2.memo(({ peerId }) => {
|
|
|
400
426
|
peerID: peerId,
|
|
401
427
|
isLocal: active
|
|
402
428
|
}
|
|
403
|
-
)) : null, /* @__PURE__ */
|
|
429
|
+
)) : null, /* @__PURE__ */ React3.createElement(
|
|
404
430
|
Video,
|
|
405
431
|
{
|
|
406
432
|
trackId: videoTrack == null ? void 0 : videoTrack.id,
|
|
@@ -413,29 +439,29 @@ var VideoPlayer = React2.memo(({ peerId }) => {
|
|
|
413
439
|
borderTopRightRadius: 0
|
|
414
440
|
}
|
|
415
441
|
}
|
|
416
|
-
), /* @__PURE__ */
|
|
442
|
+
), /* @__PURE__ */ React3.createElement(VideoPlaylistControls, null, screenfull.enabled && /* @__PURE__ */ React3.createElement(
|
|
417
443
|
IconButton,
|
|
418
444
|
{
|
|
419
445
|
onClick: () => toggle(),
|
|
420
446
|
css: {
|
|
421
|
-
color: "$
|
|
447
|
+
color: "$on_primary_high",
|
|
422
448
|
height: "max-content",
|
|
423
449
|
alignSelf: "center",
|
|
424
450
|
cursor: "pointer"
|
|
425
451
|
}
|
|
426
452
|
},
|
|
427
|
-
isFullscreen ? /* @__PURE__ */
|
|
453
|
+
isFullscreen ? /* @__PURE__ */ React3.createElement(ShrinkIcon, null) : /* @__PURE__ */ React3.createElement(ExpandIcon, null)
|
|
428
454
|
)));
|
|
429
455
|
});
|
|
430
456
|
|
|
431
457
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
|
432
458
|
init_define_process_env();
|
|
433
|
-
import
|
|
434
|
-
import { useHMSActions as
|
|
459
|
+
import React4 from "react";
|
|
460
|
+
import { useHMSActions as useHMSActions5 } from "@100mslive/react-sdk";
|
|
435
461
|
import { CrossIcon as CrossIcon2, ShareScreenIcon } from "@100mslive/react-icons";
|
|
436
462
|
var ScreenshareDisplay = () => {
|
|
437
|
-
const hmsActions =
|
|
438
|
-
return /* @__PURE__ */
|
|
463
|
+
const hmsActions = useHMSActions5();
|
|
464
|
+
return /* @__PURE__ */ React4.createElement(
|
|
439
465
|
Flex,
|
|
440
466
|
{
|
|
441
467
|
direction: "column",
|
|
@@ -449,14 +475,14 @@ var ScreenshareDisplay = () => {
|
|
|
449
475
|
h: "100%",
|
|
450
476
|
r: "$3",
|
|
451
477
|
m: "0 auto",
|
|
452
|
-
color: "$
|
|
453
|
-
bg: "$
|
|
478
|
+
color: "$on_surface_high",
|
|
479
|
+
bg: "$surface_default",
|
|
454
480
|
textAlign: "center"
|
|
455
481
|
}
|
|
456
482
|
},
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ React4.createElement(ShareScreenIcon, { width: 48, height: 48 }),
|
|
484
|
+
/* @__PURE__ */ React4.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
|
|
485
|
+
/* @__PURE__ */ React4.createElement(
|
|
460
486
|
Button,
|
|
461
487
|
{
|
|
462
488
|
variant: "danger",
|
|
@@ -465,7 +491,7 @@ var ScreenshareDisplay = () => {
|
|
|
465
491
|
}),
|
|
466
492
|
"data-testid": "stop_screen_share_btn"
|
|
467
493
|
},
|
|
468
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ React4.createElement(CrossIcon2, { width: 18, height: 18 }),
|
|
469
495
|
"\xA0 Stop screen share"
|
|
470
496
|
)
|
|
471
497
|
);
|
|
@@ -476,11 +502,11 @@ var ScreenShareView = () => {
|
|
|
476
502
|
var _a;
|
|
477
503
|
const mediaQueryLg = config.media.xl;
|
|
478
504
|
const showSidebarInBottom = useMedia(mediaQueryLg);
|
|
479
|
-
const peers =
|
|
480
|
-
const localPeerID =
|
|
481
|
-
const localPeerRole =
|
|
482
|
-
const peerPresenting =
|
|
483
|
-
const peerSharingPlaylist =
|
|
505
|
+
const peers = useHMSStore5(selectPeers);
|
|
506
|
+
const localPeerID = useHMSStore5(selectLocalPeerID);
|
|
507
|
+
const localPeerRole = useHMSStore5(selectLocalPeerRoleName);
|
|
508
|
+
const peerPresenting = useHMSStore5(selectPeerScreenSharing);
|
|
509
|
+
const peerSharingPlaylist = useHMSStore5(selectPeerSharingVideoPlaylist2);
|
|
484
510
|
const isPresenterFromMyRole = ((_a = peerPresenting == null ? void 0 : peerPresenting.roleName) == null ? void 0 : _a.toLowerCase()) === (localPeerRole == null ? void 0 : localPeerRole.toLowerCase());
|
|
485
511
|
const amIPresenting = localPeerID === (peerPresenting == null ? void 0 : peerPresenting.id);
|
|
486
512
|
const showPresenterInSmallTile = showSidebarInBottom || amIPresenting || isPresenterFromMyRole;
|
|
@@ -491,7 +517,7 @@ var ScreenShareView = () => {
|
|
|
491
517
|
}
|
|
492
518
|
return smallTilePeers2;
|
|
493
519
|
}, [peers, peerPresenting, showPresenterInSmallTile]);
|
|
494
|
-
return /* @__PURE__ */
|
|
520
|
+
return /* @__PURE__ */ React5.createElement(
|
|
495
521
|
Flex,
|
|
496
522
|
{
|
|
497
523
|
css: {
|
|
@@ -499,7 +525,7 @@ var ScreenShareView = () => {
|
|
|
499
525
|
},
|
|
500
526
|
direction: showSidebarInBottom ? "column" : "row"
|
|
501
527
|
},
|
|
502
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ React5.createElement(
|
|
503
529
|
ScreenShareComponent,
|
|
504
530
|
{
|
|
505
531
|
amIPresenting,
|
|
@@ -507,7 +533,7 @@ var ScreenShareView = () => {
|
|
|
507
533
|
peerSharingPlaylist
|
|
508
534
|
}
|
|
509
535
|
),
|
|
510
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ React5.createElement(
|
|
511
537
|
Flex,
|
|
512
538
|
{
|
|
513
539
|
direction: { "@initial": "column", "@lg": "row" },
|
|
@@ -520,7 +546,7 @@ var ScreenShareView = () => {
|
|
|
520
546
|
}
|
|
521
547
|
}
|
|
522
548
|
},
|
|
523
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ React5.createElement(
|
|
524
550
|
SidePane,
|
|
525
551
|
{
|
|
526
552
|
showSidebarInBottom,
|
|
@@ -540,11 +566,11 @@ var SidePane = ({
|
|
|
540
566
|
smallTilePeers,
|
|
541
567
|
showSidebarInBottom
|
|
542
568
|
}) => {
|
|
543
|
-
const shouldShowScreenFn =
|
|
569
|
+
const shouldShowScreenFn = useCallback2(
|
|
544
570
|
(peer) => peerScreenSharing && peer.id !== peerScreenSharing.id,
|
|
545
571
|
[peerScreenSharing]
|
|
546
572
|
);
|
|
547
|
-
return /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ React5.createElement(Fragment, null, !isPresenterInSmallTiles && /* @__PURE__ */ React5.createElement(LargeTilePeerView, { peerScreenSharing }), /* @__PURE__ */ React5.createElement(
|
|
548
574
|
SmallTilePeersView,
|
|
549
575
|
{
|
|
550
576
|
showSidebarInBottom,
|
|
@@ -554,9 +580,9 @@ var SidePane = ({
|
|
|
554
580
|
));
|
|
555
581
|
};
|
|
556
582
|
var ScreenShareComponent = ({ amIPresenting, peerPresenting, peerSharingPlaylist }) => {
|
|
557
|
-
const screenshareTrack =
|
|
583
|
+
const screenshareTrack = useHMSStore5(selectScreenShareByPeerID(peerPresenting == null ? void 0 : peerPresenting.id));
|
|
558
584
|
if (peerSharingPlaylist) {
|
|
559
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ React5.createElement(
|
|
560
586
|
Box,
|
|
561
587
|
{
|
|
562
588
|
css: {
|
|
@@ -569,10 +595,10 @@ var ScreenShareComponent = ({ amIPresenting, peerPresenting, peerSharingPlaylist
|
|
|
569
595
|
}
|
|
570
596
|
}
|
|
571
597
|
},
|
|
572
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ React5.createElement(VideoPlayer, { peerId: peerSharingPlaylist.id })
|
|
573
599
|
);
|
|
574
600
|
}
|
|
575
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ React5.createElement(
|
|
576
602
|
Box,
|
|
577
603
|
{
|
|
578
604
|
css: {
|
|
@@ -581,18 +607,18 @@ var ScreenShareComponent = ({ amIPresenting, peerPresenting, peerSharingPlaylist
|
|
|
581
607
|
"@xl": { ml: "$4", maxHeight: "80%", minHeight: 0 }
|
|
582
608
|
}
|
|
583
609
|
},
|
|
584
|
-
peerPresenting && (amIPresenting && !["browser", "window", "application"].includes(screenshareTrack == null ? void 0 : screenshareTrack.displaySurface) ? /* @__PURE__ */
|
|
610
|
+
peerPresenting && (amIPresenting && !["browser", "window", "application"].includes(screenshareTrack == null ? void 0 : screenshareTrack.displaySurface) ? /* @__PURE__ */ React5.createElement(Box, { css: { objectFit: "contain", h: "100%" } }, /* @__PURE__ */ React5.createElement(ScreenshareDisplay, null)) : /* @__PURE__ */ React5.createElement(ScreenshareTile_default, { peerId: peerPresenting == null ? void 0 : peerPresenting.id }))
|
|
585
611
|
);
|
|
586
612
|
};
|
|
587
613
|
var SmallTilePeersView = ({ smallTilePeers, shouldShowScreenFn, showSidebarInBottom }) => {
|
|
588
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ React5.createElement(
|
|
589
615
|
Flex,
|
|
590
616
|
{
|
|
591
617
|
css: {
|
|
592
618
|
flex: "2 1 0"
|
|
593
619
|
}
|
|
594
620
|
},
|
|
595
|
-
smallTilePeers && smallTilePeers.length > 0 && /* @__PURE__ */
|
|
621
|
+
smallTilePeers && smallTilePeers.length > 0 && /* @__PURE__ */ React5.createElement(
|
|
596
622
|
VideoList_default,
|
|
597
623
|
{
|
|
598
624
|
peers: smallTilePeers,
|
|
@@ -604,7 +630,7 @@ var SmallTilePeersView = ({ smallTilePeers, shouldShowScreenFn, showSidebarInBot
|
|
|
604
630
|
);
|
|
605
631
|
};
|
|
606
632
|
var LargeTilePeerView = ({ peerScreenSharing, showStatsOnTiles }) => {
|
|
607
|
-
return peerScreenSharing ? /* @__PURE__ */
|
|
633
|
+
return peerScreenSharing ? /* @__PURE__ */ React5.createElement(
|
|
608
634
|
Box,
|
|
609
635
|
{
|
|
610
636
|
css: {
|
|
@@ -623,23 +649,23 @@ var LargeTilePeerView = ({ peerScreenSharing, showStatsOnTiles }) => {
|
|
|
623
649
|
}
|
|
624
650
|
}
|
|
625
651
|
},
|
|
626
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ React5.createElement(VideoTile_default, { showStatsOnTiles, width: "100%", height: "100%", peerId: peerScreenSharing.id })
|
|
627
653
|
) : null;
|
|
628
654
|
};
|
|
629
655
|
var screenShareView_default = ScreenShareView;
|
|
630
656
|
|
|
631
657
|
// src/Prebuilt/layouts/EmbedView.jsx
|
|
632
658
|
var EmbedView = () => {
|
|
633
|
-
return /* @__PURE__ */
|
|
659
|
+
return /* @__PURE__ */ React6.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React6.createElement(EmbedComponent, null));
|
|
634
660
|
};
|
|
635
661
|
var EmbebScreenShareView = ({ children }) => {
|
|
636
662
|
var _a;
|
|
637
|
-
const peers =
|
|
663
|
+
const peers = useHMSStore6(selectPeers2);
|
|
638
664
|
const mediaQueryLg = config.media.xl;
|
|
639
665
|
const showSidebarInBottom = useMedia2(mediaQueryLg);
|
|
640
|
-
const localPeerID =
|
|
641
|
-
const localPeerRole =
|
|
642
|
-
const peerPresenting =
|
|
666
|
+
const localPeerID = useHMSStore6(selectLocalPeerID2);
|
|
667
|
+
const localPeerRole = useHMSStore6(selectLocalPeerRoleName2);
|
|
668
|
+
const peerPresenting = useHMSStore6(selectPeerScreenSharing2);
|
|
643
669
|
const isPresenterFromMyRole = ((_a = peerPresenting == null ? void 0 : peerPresenting.roleName) == null ? void 0 : _a.toLowerCase()) === (localPeerRole == null ? void 0 : localPeerRole.toLowerCase());
|
|
644
670
|
const amIPresenting = localPeerID === (peerPresenting == null ? void 0 : peerPresenting.id);
|
|
645
671
|
const showPresenterInSmallTile = showSidebarInBottom || amIPresenting || isPresenterFromMyRole;
|
|
@@ -650,7 +676,7 @@ var EmbebScreenShareView = ({ children }) => {
|
|
|
650
676
|
}
|
|
651
677
|
return smallTilePeers2;
|
|
652
678
|
}, [peers, peerPresenting, showPresenterInSmallTile]);
|
|
653
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ React6.createElement(Flex, { css: { size: "100%" }, direction: showSidebarInBottom ? "column" : "row" }, children, /* @__PURE__ */ React6.createElement(
|
|
654
680
|
Flex,
|
|
655
681
|
{
|
|
656
682
|
direction: { "@initial": "column", "@lg": "row" },
|
|
@@ -663,7 +689,7 @@ var EmbebScreenShareView = ({ children }) => {
|
|
|
663
689
|
}
|
|
664
690
|
}
|
|
665
691
|
},
|
|
666
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ React6.createElement(
|
|
667
693
|
SidePane,
|
|
668
694
|
{
|
|
669
695
|
showSidebarInBottom,
|
|
@@ -678,11 +704,11 @@ var EmbebScreenShareView = ({ children }) => {
|
|
|
678
704
|
var EmbedComponent = () => {
|
|
679
705
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare(throwErrorHandler);
|
|
680
706
|
const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
|
|
681
|
-
const [wasScreenShared, setWasScreenShared] =
|
|
707
|
+
const [wasScreenShared, setWasScreenShared] = useState2(false);
|
|
682
708
|
const screenShareAttemptInProgress = useRef2(false);
|
|
683
709
|
const src = embedConfig.url;
|
|
684
710
|
const iframeRef = useRef2();
|
|
685
|
-
const resetEmbedConfig =
|
|
711
|
+
const resetEmbedConfig = useCallback3(() => {
|
|
686
712
|
if (src) {
|
|
687
713
|
setEmbedConfig({ url: "" });
|
|
688
714
|
}
|
|
@@ -711,7 +737,7 @@ var EmbedComponent = () => {
|
|
|
711
737
|
}
|
|
712
738
|
};
|
|
713
739
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
|
714
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ React6.createElement(
|
|
715
741
|
Box,
|
|
716
742
|
{
|
|
717
743
|
ref: iframeRef,
|
|
@@ -725,7 +751,7 @@ var EmbedComponent = () => {
|
|
|
725
751
|
}
|
|
726
752
|
}
|
|
727
753
|
},
|
|
728
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ React6.createElement(
|
|
729
755
|
"iframe",
|
|
730
756
|
{
|
|
731
757
|
src,
|
|
@@ -740,10 +766,10 @@ var EmbedComponent = () => {
|
|
|
740
766
|
|
|
741
767
|
// src/Prebuilt/layouts/InsetView.jsx
|
|
742
768
|
init_define_process_env();
|
|
743
|
-
import
|
|
769
|
+
import React7, { Fragment as Fragment2, useEffect as useEffect2, useRef as useRef3 } from "react";
|
|
744
770
|
import Draggable from "react-draggable";
|
|
745
771
|
import { useMedia as useMedia3 } from "react-use";
|
|
746
|
-
import { selectAppData, selectLocalPeer, selectRemotePeers, selectRolesMap, useHMSStore as
|
|
772
|
+
import { selectAppData, selectLocalPeer, selectRemotePeers, selectRolesMap, useHMSStore as useHMSStore7 } from "@100mslive/react-sdk";
|
|
747
773
|
var getAspectRatio = ({ roleMap, roleName, isMobile }) => {
|
|
748
774
|
const role = roleMap[roleName];
|
|
749
775
|
const { width, height } = role.publishParams.video;
|
|
@@ -751,11 +777,11 @@ var getAspectRatio = ({ roleMap, roleName, isMobile }) => {
|
|
|
751
777
|
};
|
|
752
778
|
function InsetView() {
|
|
753
779
|
var _a;
|
|
754
|
-
const remotePeers =
|
|
755
|
-
const localPeer =
|
|
780
|
+
const remotePeers = useHMSStore7(selectRemotePeers);
|
|
781
|
+
const localPeer = useHMSStore7(selectLocalPeer);
|
|
756
782
|
const isMobile = useMedia3(config.media.md);
|
|
757
783
|
const isLandscape = useMedia3(config.media.ls);
|
|
758
|
-
const roleMap =
|
|
784
|
+
const roleMap = useHMSStore7(selectRolesMap);
|
|
759
785
|
const rolePreference = useRolePreference();
|
|
760
786
|
let centerPeers = [];
|
|
761
787
|
let sidepanePeers = [];
|
|
@@ -776,7 +802,7 @@ function InsetView() {
|
|
|
776
802
|
centerPeers = remotePeers;
|
|
777
803
|
}
|
|
778
804
|
const hideInset = sidepanePeers.length > 0 && (isMobile || isLandscape);
|
|
779
|
-
return /* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ React7.createElement(Fragment2, null, /* @__PURE__ */ React7.createElement(
|
|
780
806
|
Box,
|
|
781
807
|
{
|
|
782
808
|
css: {
|
|
@@ -792,7 +818,7 @@ function InsetView() {
|
|
|
792
818
|
}
|
|
793
819
|
}
|
|
794
820
|
},
|
|
795
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ React7.createElement(
|
|
796
822
|
Flex,
|
|
797
823
|
{
|
|
798
824
|
align: "center",
|
|
@@ -808,7 +834,7 @@ function InsetView() {
|
|
|
808
834
|
"@ls": { flexFlow: "row" }
|
|
809
835
|
}
|
|
810
836
|
},
|
|
811
|
-
centerPeers.length > 0 ? centerPeers.map((peer) => /* @__PURE__ */
|
|
837
|
+
centerPeers.length > 0 ? centerPeers.map((peer) => /* @__PURE__ */ React7.createElement(
|
|
812
838
|
VideoTile_default,
|
|
813
839
|
{
|
|
814
840
|
key: peer.videoTrack || peer.id,
|
|
@@ -836,9 +862,9 @@ function InsetView() {
|
|
|
836
862
|
},
|
|
837
863
|
objectFit: "contain"
|
|
838
864
|
}
|
|
839
|
-
)) : /* @__PURE__ */
|
|
865
|
+
)) : /* @__PURE__ */ React7.createElement(FirstPersonDisplay, null)
|
|
840
866
|
),
|
|
841
|
-
sidepanePeers.length > 0 && /* @__PURE__ */
|
|
867
|
+
sidepanePeers.length > 0 && /* @__PURE__ */ React7.createElement(
|
|
842
868
|
Flex,
|
|
843
869
|
{
|
|
844
870
|
align: "center",
|
|
@@ -850,7 +876,7 @@ function InsetView() {
|
|
|
850
876
|
placeContent: "center"
|
|
851
877
|
}
|
|
852
878
|
},
|
|
853
|
-
(hideInset ? [...sidepanePeers, localPeer] : sidepanePeers).map((peer, _, arr) => /* @__PURE__ */
|
|
879
|
+
(hideInset ? [...sidepanePeers, localPeer] : sidepanePeers).map((peer, _, arr) => /* @__PURE__ */ React7.createElement(
|
|
854
880
|
VideoTile_default,
|
|
855
881
|
{
|
|
856
882
|
key: peer.videoTrack || peer.id,
|
|
@@ -880,11 +906,11 @@ function InsetView() {
|
|
|
880
906
|
}
|
|
881
907
|
))
|
|
882
908
|
)
|
|
883
|
-
), !hideInset && /* @__PURE__ */
|
|
909
|
+
), !hideInset && /* @__PURE__ */ React7.createElement(InsetTile, { roleMap, isMobile, isLandscape }));
|
|
884
910
|
}
|
|
885
911
|
var InsetTile = ({ isMobile, roleMap, isLandscape }) => {
|
|
886
|
-
const localPeer =
|
|
887
|
-
const sidepane =
|
|
912
|
+
const localPeer = useHMSStore7(selectLocalPeer);
|
|
913
|
+
const sidepane = useHMSStore7(selectAppData(APP_DATA.sidePane));
|
|
888
914
|
const aspectRatio = getAspectRatio({
|
|
889
915
|
roleMap,
|
|
890
916
|
roleName: localPeer.roleName,
|
|
@@ -915,7 +941,7 @@ var InsetTile = ({ isMobile, roleMap, isLandscape }) => {
|
|
|
915
941
|
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
916
942
|
};
|
|
917
943
|
}, []);
|
|
918
|
-
return /* @__PURE__ */
|
|
944
|
+
return /* @__PURE__ */ React7.createElement(Draggable, { bounds: "parent", nodeRef }, /* @__PURE__ */ React7.createElement(
|
|
919
945
|
Box,
|
|
920
946
|
{
|
|
921
947
|
ref: nodeRef,
|
|
@@ -930,7 +956,7 @@ var InsetTile = ({ isMobile, roleMap, isLandscape }) => {
|
|
|
930
956
|
h: height
|
|
931
957
|
}
|
|
932
958
|
},
|
|
933
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ React7.createElement(
|
|
934
960
|
VideoTile_default,
|
|
935
961
|
{
|
|
936
962
|
peerId: localPeer.id,
|
|
@@ -939,9 +965,6 @@ var InsetTile = ({ isMobile, roleMap, isLandscape }) => {
|
|
|
939
965
|
size: "100%",
|
|
940
966
|
padding: 0
|
|
941
967
|
},
|
|
942
|
-
containerCSS: {
|
|
943
|
-
bg: "$surfaceDefault"
|
|
944
|
-
},
|
|
945
968
|
width,
|
|
946
969
|
height
|
|
947
970
|
}
|
|
@@ -951,22 +974,22 @@ var InsetTile = ({ isMobile, roleMap, isLandscape }) => {
|
|
|
951
974
|
|
|
952
975
|
// src/Prebuilt/layouts/mainGridView.jsx
|
|
953
976
|
init_define_process_env();
|
|
954
|
-
import
|
|
977
|
+
import React9, { useEffect as useEffect3, useState as useState3 } from "react";
|
|
955
978
|
import {
|
|
956
979
|
selectLocalPeerID as selectLocalPeerID3,
|
|
957
980
|
selectLocalPeerRole,
|
|
958
981
|
selectPeers as selectPeers3,
|
|
959
982
|
selectPeersByRoles,
|
|
960
983
|
selectRolesMap as selectRolesMap2,
|
|
961
|
-
useHMSStore as
|
|
984
|
+
useHMSStore as useHMSStore9
|
|
962
985
|
} from "@100mslive/react-sdk";
|
|
963
986
|
|
|
964
987
|
// src/Prebuilt/layouts/NonPublisherView.jsx
|
|
965
988
|
init_define_process_env();
|
|
966
|
-
import
|
|
989
|
+
import React8 from "react";
|
|
967
990
|
import { ShieldAlertIcon } from "@100mslive/react-icons";
|
|
968
|
-
var NonPublisherView =
|
|
969
|
-
return /* @__PURE__ */
|
|
991
|
+
var NonPublisherView = React8.memo(({ message }) => {
|
|
992
|
+
return /* @__PURE__ */ React8.createElement(
|
|
970
993
|
Box,
|
|
971
994
|
{
|
|
972
995
|
css: {
|
|
@@ -975,12 +998,12 @@ var NonPublisherView = React7.memo(({ message }) => {
|
|
|
975
998
|
maxWidth: "96%",
|
|
976
999
|
h: "100%",
|
|
977
1000
|
m: "auto",
|
|
978
|
-
background: "$
|
|
1001
|
+
background: "$surface_default",
|
|
979
1002
|
borderRadius: "$3"
|
|
980
1003
|
},
|
|
981
1004
|
"data-testid": "non_publisher_view"
|
|
982
1005
|
},
|
|
983
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ React8.createElement(
|
|
984
1007
|
Flex,
|
|
985
1008
|
{
|
|
986
1009
|
align: "center",
|
|
@@ -994,8 +1017,8 @@ var NonPublisherView = React7.memo(({ message }) => {
|
|
|
994
1017
|
gap: "$8"
|
|
995
1018
|
}
|
|
996
1019
|
},
|
|
997
|
-
/* @__PURE__ */
|
|
998
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ React8.createElement(ShieldAlertIcon, { color: "#C3D0E5", width: "80px", height: "80px" }),
|
|
1021
|
+
/* @__PURE__ */ React8.createElement(
|
|
999
1022
|
Flex,
|
|
1000
1023
|
{
|
|
1001
1024
|
direction: "column",
|
|
@@ -1005,8 +1028,8 @@ var NonPublisherView = React7.memo(({ message }) => {
|
|
|
1005
1028
|
gap: "$4"
|
|
1006
1029
|
}
|
|
1007
1030
|
},
|
|
1008
|
-
/* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ React8.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, message),
|
|
1032
|
+
/* @__PURE__ */ React8.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Please go to dashboard and reconfigure role settings or contact the role admin.")
|
|
1010
1033
|
)
|
|
1011
1034
|
)
|
|
1012
1035
|
);
|
|
@@ -1014,9 +1037,9 @@ var NonPublisherView = React7.memo(({ message }) => {
|
|
|
1014
1037
|
|
|
1015
1038
|
// src/Prebuilt/components/AppData/useAppLayout.js
|
|
1016
1039
|
init_define_process_env();
|
|
1017
|
-
import { selectAppDataByPath, useHMSStore as
|
|
1040
|
+
import { selectAppDataByPath, useHMSStore as useHMSStore8 } from "@100mslive/react-sdk";
|
|
1018
1041
|
var useAppLayout = (path) => {
|
|
1019
|
-
return
|
|
1042
|
+
return useHMSStore8(selectAppDataByPath(APP_DATA.appLayout, path));
|
|
1020
1043
|
};
|
|
1021
1044
|
|
|
1022
1045
|
// src/Prebuilt/layouts/mainGridView.jsx
|
|
@@ -1025,14 +1048,14 @@ var MainGridView = () => {
|
|
|
1025
1048
|
const centerRoles = useAppLayout("center") || [];
|
|
1026
1049
|
const sidepaneRoles = useAppLayout("sidepane") || [];
|
|
1027
1050
|
const maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
|
1028
|
-
const peers =
|
|
1029
|
-
const roles =
|
|
1030
|
-
const localPeerId =
|
|
1051
|
+
const peers = useHMSStore9(selectPeers3);
|
|
1052
|
+
const roles = useHMSStore9(selectRolesMap2);
|
|
1053
|
+
const localPeerId = useHMSStore9(selectLocalPeerID3);
|
|
1031
1054
|
const centerPeers = peers.filter((peer) => centerRoles.includes(peer.roleName));
|
|
1032
1055
|
const sidebarPeers = peers.filter((peer) => sidepaneRoles.includes(peer.roleName));
|
|
1033
|
-
const localRole =
|
|
1034
|
-
const peersByRoles =
|
|
1035
|
-
const [placeholder, setPlaceholder] =
|
|
1056
|
+
const localRole = useHMSStore9(selectLocalPeerRole);
|
|
1057
|
+
const peersByRoles = useHMSStore9(selectPeersByRoles(localRole.subscribeParams.subscribeToRoles || []));
|
|
1058
|
+
const [placeholder, setPlaceholder] = useState3("");
|
|
1036
1059
|
useEffect3(() => {
|
|
1037
1060
|
var _a2;
|
|
1038
1061
|
const hasPublishingPeers = peers.some((peer) => {
|
|
@@ -1065,7 +1088,7 @@ var MainGridView = () => {
|
|
|
1065
1088
|
const nooneIsPublishing = sidebarPeers.length === 0;
|
|
1066
1089
|
showSidePane = itsOnlyMeInTheRoom || nooneIsPublishing;
|
|
1067
1090
|
}
|
|
1068
|
-
return /* @__PURE__ */
|
|
1091
|
+
return /* @__PURE__ */ React9.createElement(
|
|
1069
1092
|
Flex,
|
|
1070
1093
|
{
|
|
1071
1094
|
css: {
|
|
@@ -1076,7 +1099,7 @@ var MainGridView = () => {
|
|
|
1076
1099
|
"@md": "column"
|
|
1077
1100
|
}
|
|
1078
1101
|
},
|
|
1079
|
-
placeholder ? /* @__PURE__ */
|
|
1102
|
+
placeholder ? /* @__PURE__ */ React9.createElement(NonPublisherView, { message: placeholder }) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
|
|
1080
1103
|
GridCenterView,
|
|
1081
1104
|
{
|
|
1082
1105
|
peers: showSidePane ? centerPeers : peers,
|
|
@@ -1085,38 +1108,38 @@ var MainGridView = () => {
|
|
|
1085
1108
|
hideSidePane: !showSidePane,
|
|
1086
1109
|
totalPeers: peers.length
|
|
1087
1110
|
}
|
|
1088
|
-
), showSidePane && /* @__PURE__ */
|
|
1111
|
+
), showSidePane && /* @__PURE__ */ React9.createElement(GridSidePaneView, { peers: sidebarPeers, totalPeers: peers.length }))
|
|
1089
1112
|
);
|
|
1090
1113
|
};
|
|
1091
1114
|
|
|
1092
1115
|
// src/Prebuilt/layouts/PDFView.jsx
|
|
1093
1116
|
init_define_process_env();
|
|
1094
|
-
import
|
|
1117
|
+
import React10, { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
|
|
1095
1118
|
import { throwErrorHandler as throwErrorHandler2, useScreenShare as useScreenShare2 } from "@100mslive/react-sdk";
|
|
1096
1119
|
var PDFView = () => {
|
|
1097
|
-
return /* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ React10.createElement(EmbebScreenShareView, null, /* @__PURE__ */ React10.createElement(PDFEmbedComponent, null));
|
|
1098
1121
|
};
|
|
1099
1122
|
var PDFEmbedComponent = () => {
|
|
1100
1123
|
const ref = useRef4();
|
|
1101
1124
|
const themeType = useTheme().themeType;
|
|
1102
|
-
const [isPDFLoaded, setIsPDFLoaded] =
|
|
1125
|
+
const [isPDFLoaded, setIsPDFLoaded] = useState4(false);
|
|
1103
1126
|
let pdfJSURL = define_process_env_default.REACT_APP_PDFJS_IFRAME_URL;
|
|
1104
1127
|
const { amIScreenSharing, toggleScreenShare } = useScreenShare2(throwErrorHandler2);
|
|
1105
1128
|
const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
|
|
1106
1129
|
if (pdfConfig.url && !pdfConfig.file) {
|
|
1107
1130
|
pdfJSURL = pdfJSURL + "?file=" + encodeURIComponent(pdfConfig.url);
|
|
1108
1131
|
}
|
|
1109
|
-
const [wasScreenShared, setWasScreenShared] =
|
|
1132
|
+
const [wasScreenShared, setWasScreenShared] = useState4(false);
|
|
1110
1133
|
const screenShareAttemptInProgress = useRef4(false);
|
|
1111
1134
|
const iframeRef = useRef4();
|
|
1112
|
-
const resetEmbedConfig =
|
|
1135
|
+
const resetEmbedConfig = useCallback4(() => {
|
|
1113
1136
|
setPDFConfig({ state: false });
|
|
1114
1137
|
}, [setPDFConfig]);
|
|
1115
1138
|
useEffect4(() => {
|
|
1116
1139
|
if (isPDFLoaded && ref.current) {
|
|
1117
1140
|
ref.current.contentWindow.postMessage(
|
|
1118
1141
|
{
|
|
1119
|
-
theme: themeType ===
|
|
1142
|
+
theme: themeType === ThemeTypes.dark ? 2 : 1
|
|
1120
1143
|
},
|
|
1121
1144
|
"*"
|
|
1122
1145
|
);
|
|
@@ -1147,7 +1170,7 @@ var PDFEmbedComponent = () => {
|
|
|
1147
1170
|
}
|
|
1148
1171
|
};
|
|
1149
1172
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
|
1150
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1151
1174
|
Box,
|
|
1152
1175
|
{
|
|
1153
1176
|
ref: iframeRef,
|
|
@@ -1161,7 +1184,7 @@ var PDFEmbedComponent = () => {
|
|
|
1161
1184
|
}
|
|
1162
1185
|
}
|
|
1163
1186
|
},
|
|
1164
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ React10.createElement(
|
|
1165
1188
|
"iframe",
|
|
1166
1189
|
{
|
|
1167
1190
|
src: pdfJSURL,
|
|
@@ -1181,7 +1204,7 @@ var PDFEmbedComponent = () => {
|
|
|
1181
1204
|
ref.current.contentWindow.postMessage(
|
|
1182
1205
|
{
|
|
1183
1206
|
file: pdfConfig.file,
|
|
1184
|
-
theme: themeType ===
|
|
1207
|
+
theme: themeType === ThemeTypes.dark ? 2 : 1
|
|
1185
1208
|
},
|
|
1186
1209
|
"*"
|
|
1187
1210
|
);
|
|
@@ -1196,10 +1219,10 @@ var PDFEmbedComponent = () => {
|
|
|
1196
1219
|
|
|
1197
1220
|
// src/Prebuilt/layouts/WaitingView.jsx
|
|
1198
1221
|
init_define_process_env();
|
|
1199
|
-
import
|
|
1222
|
+
import React11 from "react";
|
|
1200
1223
|
import { ColoredTimeIcon } from "@100mslive/react-icons";
|
|
1201
|
-
var WaitingView =
|
|
1202
|
-
return /* @__PURE__ */
|
|
1224
|
+
var WaitingView = React11.memo(() => {
|
|
1225
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1203
1226
|
Box,
|
|
1204
1227
|
{
|
|
1205
1228
|
css: {
|
|
@@ -1208,12 +1231,12 @@ var WaitingView = React10.memo(() => {
|
|
|
1208
1231
|
maxWidth: "96%",
|
|
1209
1232
|
h: "100%",
|
|
1210
1233
|
m: "auto",
|
|
1211
|
-
background: "$
|
|
1234
|
+
background: "$surface_default",
|
|
1212
1235
|
borderRadius: "$3"
|
|
1213
1236
|
},
|
|
1214
1237
|
"data-testid": "waiting_view"
|
|
1215
1238
|
},
|
|
1216
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ React11.createElement(
|
|
1217
1240
|
Flex,
|
|
1218
1241
|
{
|
|
1219
1242
|
align: "center",
|
|
@@ -1227,8 +1250,8 @@ var WaitingView = React10.memo(() => {
|
|
|
1227
1250
|
gap: "$8"
|
|
1228
1251
|
}
|
|
1229
1252
|
},
|
|
1230
|
-
/* @__PURE__ */
|
|
1231
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ React11.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
|
|
1254
|
+
/* @__PURE__ */ React11.createElement(
|
|
1232
1255
|
Flex,
|
|
1233
1256
|
{
|
|
1234
1257
|
direction: "column",
|
|
@@ -1238,8 +1261,8 @@ var WaitingView = React10.memo(() => {
|
|
|
1238
1261
|
gap: "$4"
|
|
1239
1262
|
}
|
|
1240
1263
|
},
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */
|
|
1264
|
+
/* @__PURE__ */ React11.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
|
|
1265
|
+
/* @__PURE__ */ React11.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
|
|
1243
1266
|
)
|
|
1244
1267
|
)
|
|
1245
1268
|
);
|
|
@@ -1249,26 +1272,47 @@ var WaitingView = React10.memo(() => {
|
|
|
1249
1272
|
init_define_process_env();
|
|
1250
1273
|
|
|
1251
1274
|
// src/Prebuilt/layouts/mainView.jsx
|
|
1252
|
-
var HLSView =
|
|
1253
|
-
var ActiveSpeakerView =
|
|
1254
|
-
var PinnedTrackView =
|
|
1275
|
+
var HLSView = React12.lazy(() => import("./HLSView-3ILTIGBT.js"));
|
|
1276
|
+
var ActiveSpeakerView = React12.lazy(() => import("./ActiveSpeakerView-N7C6WL27.js"));
|
|
1277
|
+
var PinnedTrackView = React12.lazy(() => import("./PinnedTrackView-6N6N5WOF.js"));
|
|
1255
1278
|
var ConferenceMainView = () => {
|
|
1256
|
-
|
|
1279
|
+
var _a, _b, _c;
|
|
1280
|
+
const localPeerRole = useHMSStore10(selectLocalPeerRoleName3);
|
|
1257
1281
|
const pinnedTrack = usePinnedTrack();
|
|
1258
|
-
const peerSharing =
|
|
1259
|
-
const peerSharingAudio =
|
|
1260
|
-
const peerSharingPlaylist =
|
|
1282
|
+
const peerSharing = useHMSStore10(selectPeerScreenSharing3);
|
|
1283
|
+
const peerSharingAudio = useHMSStore10(selectPeerSharingAudio);
|
|
1284
|
+
const peerSharingPlaylist = useHMSStore10(selectPeerSharingVideoPlaylist3);
|
|
1261
1285
|
const { whiteboardOwner: whiteboardShared } = useWhiteboardMetadata();
|
|
1262
|
-
const isConnected =
|
|
1263
|
-
const uiMode =
|
|
1264
|
-
const hmsActions =
|
|
1286
|
+
const isConnected = useHMSStore10(selectIsConnectedToRoom);
|
|
1287
|
+
const uiMode = useHMSStore10(selectTemplateAppData).uiMode;
|
|
1288
|
+
const hmsActions = useHMSActions6();
|
|
1265
1289
|
const isHeadless = useIsHeadless();
|
|
1266
1290
|
const headlessUIMode = useAppConfig("headlessConfig", "uiMode");
|
|
1267
1291
|
const { uiViewMode, isAudioOnly } = useUISettings();
|
|
1268
1292
|
const hlsViewerRole = useHLSViewerRole();
|
|
1269
1293
|
const waitingViewerRole = useWaitingViewerRole();
|
|
1270
1294
|
const urlToIframe = useUrlToEmbed();
|
|
1271
|
-
const
|
|
1295
|
+
const pdfAnnotatorActive = usePDFAnnotator();
|
|
1296
|
+
const { isHLSRunning } = useRecordingStreaming();
|
|
1297
|
+
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
|
1298
|
+
const permissions = useHMSStore10(selectPermissions);
|
|
1299
|
+
const roomLayout = useRoomLayout();
|
|
1300
|
+
const { join_form: joinForm = {} } = ((_c = (_b = (_a = roomLayout == null ? void 0 : roomLayout.screens) == null ? void 0 : _a.preview) == null ? void 0 : _b.default) == null ? void 0 : _c.elements) || {};
|
|
1301
|
+
const startHLS = useCallback5(() => __async(void 0, null, function* () {
|
|
1302
|
+
try {
|
|
1303
|
+
if (isHLSStarted) {
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
setHLSStarted(true);
|
|
1307
|
+
yield hmsActions.startHLSStreaming({});
|
|
1308
|
+
} catch (error) {
|
|
1309
|
+
if (error.message.includes("invalid input")) {
|
|
1310
|
+
yield startHLS();
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
setHLSStarted(false);
|
|
1314
|
+
}
|
|
1315
|
+
}), [hmsActions, isHLSStarted, setHLSStarted]);
|
|
1272
1316
|
useEffect5(() => {
|
|
1273
1317
|
if (!isConnected) {
|
|
1274
1318
|
return;
|
|
@@ -1281,8 +1325,11 @@ var ConferenceMainView = () => {
|
|
|
1281
1325
|
if (audioPlaylist.length > 0) {
|
|
1282
1326
|
hmsActions.audioPlaylist.setList(audioPlaylist);
|
|
1283
1327
|
}
|
|
1328
|
+
if ((permissions == null ? void 0 : permissions.hlsStreaming) && !isHLSRunning && joinForm.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE) {
|
|
1329
|
+
startHLS();
|
|
1330
|
+
}
|
|
1284
1331
|
hmsActions.sessionStore.observe([SESSION_STORE_KEY.PINNED_MESSAGE, SESSION_STORE_KEY.SPOTLIGHT]);
|
|
1285
|
-
}, [isConnected, hmsActions]);
|
|
1332
|
+
}, [isConnected, hmsActions, permissions, joinForm]);
|
|
1286
1333
|
if (!localPeerRole) {
|
|
1287
1334
|
return null;
|
|
1288
1335
|
}
|
|
@@ -1291,7 +1338,7 @@ var ConferenceMainView = () => {
|
|
|
1291
1338
|
ViewComponent = HLSView;
|
|
1292
1339
|
} else if (localPeerRole === waitingViewerRole) {
|
|
1293
1340
|
ViewComponent = WaitingView;
|
|
1294
|
-
} else if (
|
|
1341
|
+
} else if (pdfAnnotatorActive) {
|
|
1295
1342
|
ViewComponent = PDFView;
|
|
1296
1343
|
} else if (urlToIframe) {
|
|
1297
1344
|
ViewComponent = EmbedView;
|
|
@@ -1307,7 +1354,7 @@ var ConferenceMainView = () => {
|
|
|
1307
1354
|
} else {
|
|
1308
1355
|
ViewComponent = MainGridView;
|
|
1309
1356
|
}
|
|
1310
|
-
return /* @__PURE__ */
|
|
1357
|
+
return /* @__PURE__ */ React12.createElement(Suspense, { fallback: /* @__PURE__ */ React12.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React12.createElement(
|
|
1311
1358
|
Flex,
|
|
1312
1359
|
{
|
|
1313
1360
|
css: {
|
|
@@ -1315,183 +1362,36 @@ var ConferenceMainView = () => {
|
|
|
1315
1362
|
position: "relative"
|
|
1316
1363
|
}
|
|
1317
1364
|
},
|
|
1318
|
-
/* @__PURE__ */
|
|
1319
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ React12.createElement(ViewComponent, null),
|
|
1366
|
+
/* @__PURE__ */ React12.createElement(SidePane_default, null)
|
|
1320
1367
|
));
|
|
1321
1368
|
};
|
|
1322
1369
|
|
|
1323
1370
|
// src/Prebuilt/components/Footer.jsx
|
|
1324
1371
|
init_define_process_env();
|
|
1325
|
-
import
|
|
1372
|
+
import React36 from "react";
|
|
1326
1373
|
|
|
1327
1374
|
// src/Prebuilt/components/Footer/ConferencingFooter.jsx
|
|
1328
1375
|
init_define_process_env();
|
|
1329
|
-
import
|
|
1376
|
+
import React34, { Fragment as Fragment6, Suspense as Suspense2, useState as useState16 } from "react";
|
|
1330
1377
|
import { useMedia as useMedia6 } from "react-use";
|
|
1331
|
-
import {
|
|
1378
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish3, useHMSStore as useHMSStore19, useScreenShare as useScreenShare5 } from "@100mslive/react-sdk";
|
|
1332
1379
|
import { MusicIcon } from "@100mslive/react-icons";
|
|
1333
1380
|
|
|
1334
|
-
// src/Prebuilt/components/Playlist/Playlist.jsx
|
|
1335
|
-
init_define_process_env();
|
|
1336
|
-
import React13, { Fragment as Fragment3, useState as useState4 } from "react";
|
|
1337
|
-
import { HMSPlaylistType as HMSPlaylistType3, selectIsAllowedToPublish, useHMSStore as useHMSStore10 } from "@100mslive/react-sdk";
|
|
1338
|
-
import { AudioPlayerIcon, CrossIcon as CrossIcon3, VideoPlayerIcon } from "@100mslive/react-icons";
|
|
1339
|
-
|
|
1340
|
-
// src/Prebuilt/components/Playlist/PlaylistItem.jsx
|
|
1341
|
-
init_define_process_env();
|
|
1342
|
-
import React12 from "react";
|
|
1343
|
-
function formatDuration(duration) {
|
|
1344
|
-
if (!duration) {
|
|
1345
|
-
return "";
|
|
1346
|
-
}
|
|
1347
|
-
let mins = Math.floor(duration / 60);
|
|
1348
|
-
if (mins < 10) {
|
|
1349
|
-
mins = `0${String(mins)}`;
|
|
1350
|
-
}
|
|
1351
|
-
let secs = Math.floor(duration % 60);
|
|
1352
|
-
if (secs < 10) {
|
|
1353
|
-
secs = `0${String(secs)}`;
|
|
1354
|
-
}
|
|
1355
|
-
return `${mins}:${secs}`;
|
|
1356
|
-
}
|
|
1357
|
-
var PlaylistItem = React12.memo(({ name, metadata, duration, selected, onClick }) => {
|
|
1358
|
-
return /* @__PURE__ */ React12.createElement(
|
|
1359
|
-
Dropdown.Item,
|
|
1360
|
-
{
|
|
1361
|
-
css: {
|
|
1362
|
-
flexDirection: "column",
|
|
1363
|
-
alignItems: "flex-start",
|
|
1364
|
-
h: "$18",
|
|
1365
|
-
p: "$8",
|
|
1366
|
-
"&:hover": {
|
|
1367
|
-
cursor: "pointer",
|
|
1368
|
-
bg: "$menuBg"
|
|
1369
|
-
},
|
|
1370
|
-
"&:focus-visible": {
|
|
1371
|
-
bg: "$menuBg"
|
|
1372
|
-
}
|
|
1373
|
-
},
|
|
1374
|
-
onClick
|
|
1375
|
-
},
|
|
1376
|
-
/* @__PURE__ */ React12.createElement(Flex, { align: "center", justify: "between", css: { width: "100%", minHeight: 0 } }, /* @__PURE__ */ React12.createElement(Text, { variant: "md", css: { color: selected ? "$brandDefault" : "$textPrimary" } }, name), /* @__PURE__ */ React12.createElement(Text, { variant: "xs" }, formatDuration(duration))),
|
|
1377
|
-
(metadata == null ? void 0 : metadata.description) && /* @__PURE__ */ React12.createElement(Text, { variant: "xs", css: { mt: "$4" } }, metadata == null ? void 0 : metadata.description)
|
|
1378
|
-
);
|
|
1379
|
-
});
|
|
1380
|
-
|
|
1381
|
-
// src/Prebuilt/components/Playlist/Playlist.jsx
|
|
1382
|
-
var BrowseAndPlayFromLocal = ({ type, actions }) => {
|
|
1383
|
-
return /* @__PURE__ */ React13.createElement(Fragment3, null, /* @__PURE__ */ React13.createElement(Text, { as: "label", htmlFor: `${type}PlaylistBrowse`, variant: "sm", css: { cursor: "pointer", mr: "$2" } }, "Browse"), /* @__PURE__ */ React13.createElement(
|
|
1384
|
-
"input",
|
|
1385
|
-
{
|
|
1386
|
-
type: "file",
|
|
1387
|
-
id: `${type}PlaylistBrowse`,
|
|
1388
|
-
accept: type === HMSPlaylistType3.audio ? "audio/*" : "video/*",
|
|
1389
|
-
onChange: (e) => {
|
|
1390
|
-
const file = e.target.files[0];
|
|
1391
|
-
const id = file.lastModified;
|
|
1392
|
-
actions.setList([
|
|
1393
|
-
{
|
|
1394
|
-
type,
|
|
1395
|
-
id,
|
|
1396
|
-
name: file.name,
|
|
1397
|
-
url: URL.createObjectURL(file)
|
|
1398
|
-
}
|
|
1399
|
-
]);
|
|
1400
|
-
actions.play(id);
|
|
1401
|
-
},
|
|
1402
|
-
style: { display: "none" }
|
|
1403
|
-
}
|
|
1404
|
-
));
|
|
1405
|
-
};
|
|
1406
|
-
var Playlist = ({ type }) => {
|
|
1407
|
-
const isAudioPlaylist = type === HMSPlaylistType3.audio;
|
|
1408
|
-
const { active, list: playlist, actions } = usePlaylist(type);
|
|
1409
|
-
const [open, setOpen] = useState4(false);
|
|
1410
|
-
const [collapse, setCollapse] = useState4(false);
|
|
1411
|
-
const isAllowedToPublish = useHMSStore10(selectIsAllowedToPublish);
|
|
1412
|
-
const isFeatureEnabled = useIsFeatureEnabled(
|
|
1413
|
-
isAudioPlaylist ? FEATURE_LIST.AUDIO_PLAYLIST : FEATURE_LIST.VIDEO_PLAYLIST
|
|
1414
|
-
);
|
|
1415
|
-
if (!isAllowedToPublish.screen || playlist.length === 0 || !isFeatureEnabled) {
|
|
1416
|
-
return null;
|
|
1417
|
-
}
|
|
1418
|
-
return /* @__PURE__ */ React13.createElement(Fragment3, null, /* @__PURE__ */ React13.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React13.createElement(Dropdown.Trigger, { asChild: true, "data-testid": type === HMSPlaylistType3.audio ? "audio_playlist" : "video_playlist" }, /* @__PURE__ */ React13.createElement(IconButton_default, { active: !active }, /* @__PURE__ */ React13.createElement(Tooltip, { title: isAudioPlaylist ? "Audio Playlist" : "Video Playlist" }, /* @__PURE__ */ React13.createElement(Box, null, isAudioPlaylist ? /* @__PURE__ */ React13.createElement(AudioPlayerIcon, null) : /* @__PURE__ */ React13.createElement(VideoPlayerIcon, null))))), /* @__PURE__ */ React13.createElement(
|
|
1419
|
-
Dropdown.Content,
|
|
1420
|
-
{
|
|
1421
|
-
sideOffset: 5,
|
|
1422
|
-
align: "center",
|
|
1423
|
-
css: {
|
|
1424
|
-
maxHeight: "unset",
|
|
1425
|
-
width: "$60",
|
|
1426
|
-
p: "$0",
|
|
1427
|
-
bg: "$bgSecondary",
|
|
1428
|
-
border: "1px solid $menuBg"
|
|
1429
|
-
}
|
|
1430
|
-
},
|
|
1431
|
-
/* @__PURE__ */ React13.createElement(
|
|
1432
|
-
Flex,
|
|
1433
|
-
{
|
|
1434
|
-
align: "center",
|
|
1435
|
-
css: {
|
|
1436
|
-
p: "$4 $8",
|
|
1437
|
-
borderBottom: "1px solid $borderLight",
|
|
1438
|
-
bg: "$menuBg"
|
|
1439
|
-
}
|
|
1440
|
-
},
|
|
1441
|
-
/* @__PURE__ */ React13.createElement(Text, { variant: "md", css: { flex: "1 1 0" } }, isAudioPlaylist ? "Audio Player" : "Video Playlist"),
|
|
1442
|
-
/* @__PURE__ */ React13.createElement(BrowseAndPlayFromLocal, { type, actions }),
|
|
1443
|
-
/* @__PURE__ */ React13.createElement(
|
|
1444
|
-
IconButton_default,
|
|
1445
|
-
{
|
|
1446
|
-
css: { mr: "-$4" },
|
|
1447
|
-
onClick: () => __async(void 0, null, function* () {
|
|
1448
|
-
if (active) {
|
|
1449
|
-
yield actions.stop();
|
|
1450
|
-
}
|
|
1451
|
-
setOpen(false);
|
|
1452
|
-
setCollapse(false);
|
|
1453
|
-
})
|
|
1454
|
-
},
|
|
1455
|
-
/* @__PURE__ */ React13.createElement(CrossIcon3, { width: 24, height: 24 })
|
|
1456
|
-
)
|
|
1457
|
-
),
|
|
1458
|
-
!collapse && /* @__PURE__ */ React13.createElement(Box, { css: { maxHeight: "$96", overflowY: "auto" } }, playlist.map((playlistItem) => {
|
|
1459
|
-
return /* @__PURE__ */ React13.createElement(
|
|
1460
|
-
PlaylistItem,
|
|
1461
|
-
__spreadProps(__spreadValues({
|
|
1462
|
-
key: playlistItem.id
|
|
1463
|
-
}, playlistItem), {
|
|
1464
|
-
onClick: (e) => __async(void 0, null, function* () {
|
|
1465
|
-
e.preventDefault();
|
|
1466
|
-
try {
|
|
1467
|
-
yield actions.play(playlistItem.id);
|
|
1468
|
-
} catch (e2) {
|
|
1469
|
-
}
|
|
1470
|
-
if (!isAudioPlaylist) {
|
|
1471
|
-
setOpen(false);
|
|
1472
|
-
}
|
|
1473
|
-
})
|
|
1474
|
-
})
|
|
1475
|
-
);
|
|
1476
|
-
})),
|
|
1477
|
-
isAudioPlaylist && /* @__PURE__ */ React13.createElement(AudioPlaylistControls, { onToggle: () => setCollapse((value) => !value) })
|
|
1478
|
-
)));
|
|
1479
|
-
};
|
|
1480
|
-
|
|
1481
1381
|
// src/Prebuilt/components/MoreSettings/MoreSettings.jsx
|
|
1482
1382
|
init_define_process_env();
|
|
1483
|
-
import
|
|
1383
|
+
import React21, { Fragment as Fragment3, useState as useState12 } from "react";
|
|
1484
1384
|
import { useMedia as useMedia5 } from "react-use";
|
|
1485
1385
|
import Hls from "hls.js";
|
|
1486
1386
|
import {
|
|
1487
|
-
selectAppData as
|
|
1488
|
-
selectIsAllowedToPublish
|
|
1387
|
+
selectAppData as selectAppData2,
|
|
1388
|
+
selectIsAllowedToPublish,
|
|
1489
1389
|
selectLocalPeerID as selectLocalPeerID6,
|
|
1490
1390
|
selectLocalPeerRoleName as selectLocalPeerRoleName5,
|
|
1491
|
-
selectPermissions as
|
|
1492
|
-
useHMSActions as
|
|
1391
|
+
selectPermissions as selectPermissions4,
|
|
1392
|
+
useHMSActions as useHMSActions12,
|
|
1493
1393
|
useHMSStore as useHMSStore15,
|
|
1494
|
-
useRecordingStreaming as
|
|
1394
|
+
useRecordingStreaming as useRecordingStreaming3
|
|
1495
1395
|
} from "@100mslive/react-sdk";
|
|
1496
1396
|
import {
|
|
1497
1397
|
ChangeRoleIcon as ChangeRoleIcon2,
|
|
@@ -1506,27 +1406,20 @@ import {
|
|
|
1506
1406
|
|
|
1507
1407
|
// src/Prebuilt/components/Settings/StartRecording.jsx
|
|
1508
1408
|
init_define_process_env();
|
|
1509
|
-
import
|
|
1510
|
-
import {
|
|
1511
|
-
selectAppData as selectAppData2,
|
|
1512
|
-
selectPermissions,
|
|
1513
|
-
useHMSActions as useHMSActions6,
|
|
1514
|
-
useHMSStore as useHMSStore11,
|
|
1515
|
-
useRecordingStreaming
|
|
1516
|
-
} from "@100mslive/react-sdk";
|
|
1409
|
+
import React13, { useState as useState5 } from "react";
|
|
1410
|
+
import { selectPermissions as selectPermissions2, useHMSActions as useHMSActions7, useHMSStore as useHMSStore11, useRecordingStreaming as useRecordingStreaming2 } from "@100mslive/react-sdk";
|
|
1517
1411
|
import { AlertTriangleIcon } from "@100mslive/react-icons";
|
|
1518
1412
|
var StartRecording = ({ open, onOpenChange }) => {
|
|
1519
|
-
const permissions = useHMSStore11(
|
|
1520
|
-
const recordingUrl = useHMSStore11(selectAppData2(APP_DATA.recordingUrl));
|
|
1413
|
+
const permissions = useHMSStore11(selectPermissions2);
|
|
1521
1414
|
const [resolution, setResolution] = useState5(RTMP_RECORD_DEFAULT_RESOLUTION);
|
|
1522
1415
|
const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);
|
|
1523
|
-
const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } =
|
|
1524
|
-
const hmsActions =
|
|
1416
|
+
const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming2();
|
|
1417
|
+
const hmsActions = useHMSActions7();
|
|
1525
1418
|
if (!(permissions == null ? void 0 : permissions.browserRecording) || isHLSRunning) {
|
|
1526
1419
|
return null;
|
|
1527
1420
|
}
|
|
1528
1421
|
if (isBrowserRecordingOn) {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ React13.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(Dialog.Portal, null, /* @__PURE__ */ React13.createElement(
|
|
1530
1423
|
Dialog.Content,
|
|
1531
1424
|
{
|
|
1532
1425
|
css: {
|
|
@@ -1535,9 +1428,9 @@ var StartRecording = ({ open, onOpenChange }) => {
|
|
|
1535
1428
|
bg: "#201617"
|
|
1536
1429
|
}
|
|
1537
1430
|
},
|
|
1538
|
-
/* @__PURE__ */
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1431
|
+
/* @__PURE__ */ React13.createElement(Dialog.Title, null, /* @__PURE__ */ React13.createElement(Flex, { gap: 2, css: { c: "$alert_error_default" } }, /* @__PURE__ */ React13.createElement(AlertTriangleIcon, null), /* @__PURE__ */ React13.createElement(Text, { css: { c: "inherit" }, variant: "h6" }, "End Recording"))),
|
|
1432
|
+
/* @__PURE__ */ React13.createElement(Text, { variant: "sm", css: { c: "$on_surface_medium", my: "$8" } }, "Are you sure you want to end recording? You can\u2019t undo this action."),
|
|
1433
|
+
/* @__PURE__ */ React13.createElement(Flex, { justify: "end", css: { mt: "$12" } }, /* @__PURE__ */ React13.createElement(Dialog.Close, { asChild: true }, /* @__PURE__ */ React13.createElement(Button, { outlined: true, css: { borderColor: "$secondary_bright", mr: "$4" } }, "Don't end")), /* @__PURE__ */ React13.createElement(
|
|
1541
1434
|
Button,
|
|
1542
1435
|
{
|
|
1543
1436
|
"data-testid": "stop_recording_confirm_mobile",
|
|
@@ -1559,14 +1452,14 @@ var StartRecording = ({ open, onOpenChange }) => {
|
|
|
1559
1452
|
))
|
|
1560
1453
|
)));
|
|
1561
1454
|
}
|
|
1562
|
-
return /* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ React13.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(Dialog.Content, { css: { width: "min(400px,80%)", p: "$10" } }, /* @__PURE__ */ React13.createElement(Dialog.Title, null, /* @__PURE__ */ React13.createElement(Text, { variant: "h6" }, "Start Recording")), /* @__PURE__ */ React13.createElement(
|
|
1563
1456
|
ResolutionInput,
|
|
1564
1457
|
{
|
|
1565
1458
|
testId: "recording_resolution_mobile",
|
|
1566
1459
|
css: { flexDirection: "column", alignItems: "start" },
|
|
1567
1460
|
onResolutionChange: setResolution
|
|
1568
1461
|
}
|
|
1569
|
-
), /* @__PURE__ */
|
|
1462
|
+
), /* @__PURE__ */ React13.createElement(
|
|
1570
1463
|
Button,
|
|
1571
1464
|
{
|
|
1572
1465
|
"data-testid": "start_recording_confirm_mobile",
|
|
@@ -1579,7 +1472,6 @@ var StartRecording = ({ open, onOpenChange }) => {
|
|
|
1579
1472
|
try {
|
|
1580
1473
|
setRecordingState(true);
|
|
1581
1474
|
yield hmsActions.startRTMPOrRecording({
|
|
1582
|
-
meetingURL: recordingUrl,
|
|
1583
1475
|
resolution: getResolution(resolution),
|
|
1584
1476
|
record: true
|
|
1585
1477
|
});
|
|
@@ -1607,7 +1499,7 @@ var StartRecording_default = StartRecording;
|
|
|
1607
1499
|
|
|
1608
1500
|
// src/Prebuilt/components/StatsForNerds.jsx
|
|
1609
1501
|
init_define_process_env();
|
|
1610
|
-
import
|
|
1502
|
+
import React14, { useEffect as useEffect6, useMemo as useMemo3, useRef as useRef5, useState as useState6 } from "react";
|
|
1611
1503
|
import {
|
|
1612
1504
|
selectHMSStats,
|
|
1613
1505
|
selectLocalPeerID as selectLocalPeerID4,
|
|
@@ -1633,7 +1525,7 @@ var StatsForNerds = ({ onOpenChange }) => {
|
|
|
1633
1525
|
setSelectedStat("local-peer");
|
|
1634
1526
|
}
|
|
1635
1527
|
}, [tracksWithLabels, selectedStat]);
|
|
1636
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ React14.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React14.createElement(Dialog.Portal, null, /* @__PURE__ */ React14.createElement(Dialog.Overlay, null), /* @__PURE__ */ React14.createElement(
|
|
1637
1529
|
Dialog.Content,
|
|
1638
1530
|
{
|
|
1639
1531
|
css: {
|
|
@@ -1642,10 +1534,10 @@ var StatsForNerds = ({ onOpenChange }) => {
|
|
|
1642
1534
|
overflowY: "auto"
|
|
1643
1535
|
}
|
|
1644
1536
|
},
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1537
|
+
/* @__PURE__ */ React14.createElement(Dialog.Title, { css: { p: "$4 0" } }, /* @__PURE__ */ React14.createElement(Flex, { justify: "between" }, /* @__PURE__ */ React14.createElement(Flex, { align: "center", css: { mb: "$1" } }, /* @__PURE__ */ React14.createElement(Text, { variant: "h6", inline: true }, "Stats For Nerds")), /* @__PURE__ */ React14.createElement(Dialog.DefaultClose, { "data-testid": "stats_dialog_close_icon" }))),
|
|
1538
|
+
/* @__PURE__ */ React14.createElement(HorizontalDivider, { css: { mt: "0.8rem" } }),
|
|
1539
|
+
/* @__PURE__ */ React14.createElement(Flex, { justify: "start", gap: 4, css: { m: "$10 0" } }, /* @__PURE__ */ React14.createElement(Switch, { checked: showStatsOnTiles, onCheckedChange: setShowStatsOnTiles }), /* @__PURE__ */ React14.createElement(Text, { variant: "body2", css: { fontWeight: "$semiBold" } }, "Show Stats on Tiles")),
|
|
1540
|
+
/* @__PURE__ */ React14.createElement(
|
|
1649
1541
|
Flex,
|
|
1650
1542
|
{
|
|
1651
1543
|
direction: "column",
|
|
@@ -1655,8 +1547,8 @@ var StatsForNerds = ({ onOpenChange }) => {
|
|
|
1655
1547
|
minWidth: 0
|
|
1656
1548
|
}
|
|
1657
1549
|
},
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ React14.createElement(Label, { variant: "body2" }, "Stats For"),
|
|
1551
|
+
/* @__PURE__ */ React14.createElement(Dropdown.Root, { "data-testid": "dialog_select_Stats For", open, onOpenChange: setOpen }, /* @__PURE__ */ React14.createElement(
|
|
1660
1552
|
DialogDropdownTrigger,
|
|
1661
1553
|
{
|
|
1662
1554
|
title: selectedStat.label || "Select Stats",
|
|
@@ -1665,9 +1557,9 @@ var StatsForNerds = ({ onOpenChange }) => {
|
|
|
1665
1557
|
open,
|
|
1666
1558
|
ref
|
|
1667
1559
|
}
|
|
1668
|
-
), /* @__PURE__ */
|
|
1560
|
+
), /* @__PURE__ */ React14.createElement(Dropdown.Portal, null, /* @__PURE__ */ React14.createElement(Dropdown.Content, { align: "start", sideOffset: 8, css: { w: (_a = ref.current) == null ? void 0 : _a.clientWidth, zIndex: 1e3 } }, statsOptions.map((option) => {
|
|
1669
1561
|
const isSelected = option.id === selectedStat.id && option.layer === selectedStat.layer;
|
|
1670
|
-
return /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1671
1563
|
Dropdown.Item,
|
|
1672
1564
|
{
|
|
1673
1565
|
key: `${option.id}-${option.layer || ""}`,
|
|
@@ -1677,14 +1569,14 @@ var StatsForNerds = ({ onOpenChange }) => {
|
|
|
1677
1569
|
css: {
|
|
1678
1570
|
px: "$9",
|
|
1679
1571
|
bg: isSelected ? selectionBg : void 0,
|
|
1680
|
-
c: isSelected ? "$
|
|
1572
|
+
c: isSelected ? "$on_primary_high" : "$on_primary_high"
|
|
1681
1573
|
}
|
|
1682
1574
|
},
|
|
1683
1575
|
option.label
|
|
1684
1576
|
);
|
|
1685
1577
|
}))))
|
|
1686
1578
|
),
|
|
1687
|
-
selectedStat.id === "local-peer" ? /* @__PURE__ */
|
|
1579
|
+
selectedStat.id === "local-peer" ? /* @__PURE__ */ React14.createElement(LocalPeerStats, null) : /* @__PURE__ */ React14.createElement(TrackStats, { trackID: selectedStat.id, layer: selectedStat.layer, local: selectedStat.local })
|
|
1688
1580
|
)));
|
|
1689
1581
|
};
|
|
1690
1582
|
var useTracksWithLabel = () => {
|
|
@@ -1726,13 +1618,13 @@ var LocalPeerStats = () => {
|
|
|
1726
1618
|
if (!stats) {
|
|
1727
1619
|
return null;
|
|
1728
1620
|
}
|
|
1729
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ React14.createElement(Flex, { css: { flexWrap: "wrap", gap: "$10" } }, /* @__PURE__ */ React14.createElement(StatsRow, { label: "Packets Lost", value: (_a = stats.subscribe) == null ? void 0 : _a.packetsLost }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Jitter", value: (_b = stats.subscribe) == null ? void 0 : _b.jitter }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Publish Bitrate", value: formatBytes((_c = stats.publish) == null ? void 0 : _c.bitrate, "b/s") }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Subscribe Bitrate", value: formatBytes((_d = stats.subscribe) == null ? void 0 : _d.bitrate, "b/s") }), /* @__PURE__ */ React14.createElement(
|
|
1730
1622
|
StatsRow,
|
|
1731
1623
|
{
|
|
1732
1624
|
label: "Available Outgoing Bitrate",
|
|
1733
1625
|
value: formatBytes((_e = stats.publish) == null ? void 0 : _e.availableOutgoingBitrate, "b/s")
|
|
1734
1626
|
}
|
|
1735
|
-
), /* @__PURE__ */
|
|
1627
|
+
), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Total Bytes Sent", value: formatBytes((_f = stats.publish) == null ? void 0 : _f.bytesSent) }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Total Bytes Received", value: formatBytes((_g = stats.subscribe) == null ? void 0 : _g.bytesReceived) }), /* @__PURE__ */ React14.createElement(
|
|
1736
1628
|
StatsRow,
|
|
1737
1629
|
{
|
|
1738
1630
|
label: "Round Trip Time",
|
|
@@ -1748,27 +1640,26 @@ var TrackStats = ({ trackID, layer, local }) => {
|
|
|
1748
1640
|
return null;
|
|
1749
1641
|
}
|
|
1750
1642
|
const inbound = stats.type.includes("inbound");
|
|
1751
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ React14.createElement(Flex, { css: { flexWrap: "wrap", gap: "$10" } }, /* @__PURE__ */ React14.createElement(StatsRow, { label: "Type", value: stats.type + " " + stats.kind }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Bitrate", value: formatBytes(stats.bitrate, "b/s") }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Packets Lost", value: stats.packetsLost }), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Jitter", value: (_a = stats.jitter) == null ? void 0 : _a.toFixed(3) }), /* @__PURE__ */ React14.createElement(
|
|
1752
1644
|
StatsRow,
|
|
1753
1645
|
{
|
|
1754
1646
|
label: inbound ? "Bytes Received" : "Bytes Sent",
|
|
1755
1647
|
value: formatBytes(inbound ? stats.bytesReceived : stats.bytesSent)
|
|
1756
1648
|
}
|
|
1757
|
-
), stats.kind === "video" && /* @__PURE__ */
|
|
1649
|
+
), stats.kind === "video" && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(StatsRow, { label: "Framerate", value: stats.framesPerSecond }), !inbound && /* @__PURE__ */ React14.createElement(StatsRow, { label: "Quality Limitation Reason", value: stats.qualityLimitationReason })), /* @__PURE__ */ React14.createElement(StatsRow, { label: "Round Trip Time", value: stats.roundTripTime ? `${stats.roundTripTime * 1e3} ms` : "-" }));
|
|
1758
1650
|
};
|
|
1759
|
-
var StatsRow =
|
|
1651
|
+
var StatsRow = React14.memo(({ label, value }) => /* @__PURE__ */ React14.createElement(Box, { css: { bg: "$surface_bright", w: "calc(50% - $6)", p: "$8", r: "$3" } }, /* @__PURE__ */ React14.createElement(
|
|
1760
1652
|
Text,
|
|
1761
1653
|
{
|
|
1762
1654
|
variant: "overline",
|
|
1763
1655
|
css: {
|
|
1764
1656
|
fontWeight: "$semiBold",
|
|
1765
|
-
color: "$
|
|
1657
|
+
color: "$on_surface_medium",
|
|
1766
1658
|
textTransform: "uppercase"
|
|
1767
1659
|
}
|
|
1768
1660
|
},
|
|
1769
|
-
label
|
|
1770
|
-
|
|
1771
|
-
), /* @__PURE__ */ React15.createElement(Text, { variant: "sub1", css: { fontWeight: "$semiBold", color: "$textHighEmp" } }, value || "-")));
|
|
1661
|
+
label
|
|
1662
|
+
), /* @__PURE__ */ React14.createElement(Text, { variant: "sub1", css: { fontWeight: "$semiBold", color: "$on_surface_high" } }, value || "-")));
|
|
1772
1663
|
var formatBytes = (bytes, unit = "B", decimals = 2) => {
|
|
1773
1664
|
if (bytes === void 0)
|
|
1774
1665
|
return "-";
|
|
@@ -1783,13 +1674,13 @@ var formatBytes = (bytes, unit = "B", decimals = 2) => {
|
|
|
1783
1674
|
|
|
1784
1675
|
// src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx
|
|
1785
1676
|
init_define_process_env();
|
|
1786
|
-
import
|
|
1787
|
-
import { useHMSActions as
|
|
1677
|
+
import React15, { useCallback as useCallback6, useRef as useRef6, useState as useState7 } from "react";
|
|
1678
|
+
import { useHMSActions as useHMSActions8 } from "@100mslive/react-sdk";
|
|
1788
1679
|
import { AlertTriangleIcon as AlertTriangleIcon2, ChangeRoleIcon, CheckIcon } from "@100mslive/react-icons";
|
|
1789
1680
|
var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
1790
1681
|
var _a, _b;
|
|
1791
1682
|
const roles = useFilteredRoles();
|
|
1792
|
-
const hmsActions =
|
|
1683
|
+
const hmsActions = useHMSActions8();
|
|
1793
1684
|
const ref = useRef6(null);
|
|
1794
1685
|
const roleRef = useRef6(null);
|
|
1795
1686
|
const [selectedBulkRole, setBulkRole] = useState7([]);
|
|
@@ -1798,7 +1689,7 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1798
1689
|
const [roleDialog, setRoleDialog] = useState7(false);
|
|
1799
1690
|
const [errorMessage, setErrorMessage] = useState7("");
|
|
1800
1691
|
const [isSubmiting, setIsSubmiting] = useState7(false);
|
|
1801
|
-
const changeBulkRole =
|
|
1692
|
+
const changeBulkRole = useCallback6(() => __async(void 0, null, function* () {
|
|
1802
1693
|
if (selectedBulkRole.length > 0 && selectedRole) {
|
|
1803
1694
|
try {
|
|
1804
1695
|
setIsSubmiting(true);
|
|
@@ -1812,7 +1703,7 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1812
1703
|
}
|
|
1813
1704
|
}
|
|
1814
1705
|
}), [selectedBulkRole, selectedRole, hmsActions, onOpenChange]);
|
|
1815
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ React15.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React15.createElement(DialogContent, { title: "Bulk Role Change", Icon: ChangeRoleIcon }, /* @__PURE__ */ React15.createElement(DialogRow, null, /* @__PURE__ */ React15.createElement(Text, null, "For Roles: "), /* @__PURE__ */ React15.createElement(
|
|
1816
1707
|
Dropdown.Root,
|
|
1817
1708
|
{
|
|
1818
1709
|
open: bulkRoleDialog,
|
|
@@ -1823,7 +1714,7 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1823
1714
|
},
|
|
1824
1715
|
modal: false
|
|
1825
1716
|
},
|
|
1826
|
-
/* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ React15.createElement(
|
|
1827
1718
|
DialogDropdownTrigger,
|
|
1828
1719
|
{
|
|
1829
1720
|
ref,
|
|
@@ -1835,7 +1726,7 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1835
1726
|
open: bulkRoleDialog
|
|
1836
1727
|
}
|
|
1837
1728
|
),
|
|
1838
|
-
/* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ React15.createElement(
|
|
1839
1730
|
Dropdown.Content,
|
|
1840
1731
|
{
|
|
1841
1732
|
css: { w: (_a = ref.current) == null ? void 0 : _a.clientWidth, zIndex: 1e3 },
|
|
@@ -1846,7 +1737,7 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1846
1737
|
}
|
|
1847
1738
|
},
|
|
1848
1739
|
roles && roles.map((role) => {
|
|
1849
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1850
1741
|
Dropdown.CheckboxItem,
|
|
1851
1742
|
{
|
|
1852
1743
|
key: role,
|
|
@@ -1858,12 +1749,12 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1858
1749
|
setErrorMessage("");
|
|
1859
1750
|
}
|
|
1860
1751
|
},
|
|
1861
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ React15.createElement(Checkbox.Root, { css: { margin: "$2" }, checked: selectedBulkRole.includes(role) }, /* @__PURE__ */ React15.createElement(Checkbox.Indicator, null, /* @__PURE__ */ React15.createElement(CheckIcon, { width: 16, height: 16 }))),
|
|
1862
1753
|
role
|
|
1863
1754
|
);
|
|
1864
1755
|
})
|
|
1865
1756
|
)
|
|
1866
|
-
)), /* @__PURE__ */
|
|
1757
|
+
)), /* @__PURE__ */ React15.createElement(DialogRow, null, /* @__PURE__ */ React15.createElement(Text, null, "To Role: "), /* @__PURE__ */ React15.createElement(Dropdown.Root, { open: roleDialog, onOpenChange: (value) => setRoleDialog(value) }, /* @__PURE__ */ React15.createElement(
|
|
1867
1758
|
DialogDropdownTrigger,
|
|
1868
1759
|
{
|
|
1869
1760
|
ref: roleRef,
|
|
@@ -1874,8 +1765,8 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1874
1765
|
},
|
|
1875
1766
|
open: roleDialog
|
|
1876
1767
|
}
|
|
1877
|
-
), /* @__PURE__ */
|
|
1878
|
-
return /* @__PURE__ */
|
|
1768
|
+
), /* @__PURE__ */ React15.createElement(Dropdown.Content, { css: { w: (_b = roleRef.current) == null ? void 0 : _b.clientWidth, zIndex: 1e3 } }, roles && roles.map((role) => {
|
|
1769
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1879
1770
|
Dropdown.Item,
|
|
1880
1771
|
{
|
|
1881
1772
|
key: role,
|
|
@@ -1886,16 +1777,16 @@ var BulkRoleChangeModal = ({ onOpenChange }) => {
|
|
|
1886
1777
|
},
|
|
1887
1778
|
role
|
|
1888
1779
|
);
|
|
1889
|
-
})))), /* @__PURE__ */
|
|
1780
|
+
})))), /* @__PURE__ */ React15.createElement(DialogRow, null, errorMessage && /* @__PURE__ */ React15.createElement(Flex, { gap: 2, css: { c: "$alert_error_default", w: "70%", ml: "auto" } }, /* @__PURE__ */ React15.createElement(AlertTriangleIcon2, null), /* @__PURE__ */ React15.createElement(Text, { css: { c: "inherit" } }, errorMessage))), /* @__PURE__ */ React15.createElement(DialogRow, { justify: "end" }, /* @__PURE__ */ React15.createElement(Button, { variant: "primary", onClick: changeBulkRole, disabled: !(selectedRole && selectedBulkRole.length > 0) }, isSubmiting && /* @__PURE__ */ React15.createElement(Loading, { css: { color: "$on_primary_medium" } }), "Apply"))));
|
|
1890
1781
|
};
|
|
1891
1782
|
|
|
1892
1783
|
// src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx
|
|
1893
1784
|
init_define_process_env();
|
|
1894
|
-
import
|
|
1895
|
-
import { selectLocalPeerName, useHMSActions as
|
|
1785
|
+
import React16, { useState as useState8 } from "react";
|
|
1786
|
+
import { selectLocalPeerName, useHMSActions as useHMSActions9, useHMSStore as useHMSStore13 } from "@100mslive/react-sdk";
|
|
1896
1787
|
var ChangeNameModal = ({ onOpenChange }) => {
|
|
1897
1788
|
const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);
|
|
1898
|
-
const hmsActions =
|
|
1789
|
+
const hmsActions = useHMSActions9();
|
|
1899
1790
|
const localPeerName = useHMSStore13(selectLocalPeerName);
|
|
1900
1791
|
const [currentName, setCurrentName] = useState8(localPeerName);
|
|
1901
1792
|
const changeName = () => __async(void 0, null, function* () {
|
|
@@ -1915,7 +1806,7 @@ var ChangeNameModal = ({ onOpenChange }) => {
|
|
|
1915
1806
|
onOpenChange(false);
|
|
1916
1807
|
}
|
|
1917
1808
|
});
|
|
1918
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ React16.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React16.createElement(Dialog.Portal, null, /* @__PURE__ */ React16.createElement(Dialog.Overlay, null), /* @__PURE__ */ React16.createElement(Dialog.Content, { css: { width: "min(400px,80%)", p: "$10" } }, /* @__PURE__ */ React16.createElement(Dialog.Title, { css: { p: "0 $4" } }, /* @__PURE__ */ React16.createElement(Text, { variant: "h6" }, " Change Name")), /* @__PURE__ */ React16.createElement(
|
|
1919
1810
|
"form",
|
|
1920
1811
|
{
|
|
1921
1812
|
onSubmit: (e) => __async(void 0, null, function* () {
|
|
@@ -1923,7 +1814,7 @@ var ChangeNameModal = ({ onOpenChange }) => {
|
|
|
1923
1814
|
yield changeName();
|
|
1924
1815
|
})
|
|
1925
1816
|
},
|
|
1926
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ React16.createElement(Flex, { justify: "center", align: "center", css: { my: "$8", w: "100%" } }, /* @__PURE__ */ React16.createElement(
|
|
1927
1818
|
Input,
|
|
1928
1819
|
{
|
|
1929
1820
|
css: { width: "100%" },
|
|
@@ -1936,7 +1827,7 @@ var ChangeNameModal = ({ onOpenChange }) => {
|
|
|
1936
1827
|
"data-testid": "change_name_field"
|
|
1937
1828
|
}
|
|
1938
1829
|
)),
|
|
1939
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ React16.createElement(
|
|
1940
1831
|
Flex,
|
|
1941
1832
|
{
|
|
1942
1833
|
justify: "between",
|
|
@@ -1947,8 +1838,8 @@ var ChangeNameModal = ({ onOpenChange }) => {
|
|
|
1947
1838
|
mt: "$10"
|
|
1948
1839
|
}
|
|
1949
1840
|
},
|
|
1950
|
-
/* @__PURE__ */
|
|
1951
|
-
/* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ React16.createElement(Box, { css: { w: "50%" } }, /* @__PURE__ */ React16.createElement(Dialog.Close, { css: { w: "100%" } }, /* @__PURE__ */ React16.createElement(Button, { variant: "standard", css: { w: "100%" }, outlined: true, type: "submit", disabled: !localPeerName }, "Cancel"))),
|
|
1842
|
+
/* @__PURE__ */ React16.createElement(Box, { css: { w: "50%" } }, /* @__PURE__ */ React16.createElement(
|
|
1952
1843
|
Button,
|
|
1953
1844
|
{
|
|
1954
1845
|
variant: "primary",
|
|
@@ -1965,29 +1856,29 @@ var ChangeNameModal = ({ onOpenChange }) => {
|
|
|
1965
1856
|
|
|
1966
1857
|
// src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx
|
|
1967
1858
|
init_define_process_env();
|
|
1968
|
-
import
|
|
1859
|
+
import React17, { useMemo as useMemo4 } from "react";
|
|
1969
1860
|
import { useMedia as useMedia4 } from "react-use";
|
|
1970
1861
|
import {
|
|
1971
1862
|
selectLocalPeerID as selectLocalPeerID5,
|
|
1972
1863
|
selectLocalPeerRoleName as selectLocalPeerRoleName4,
|
|
1973
|
-
selectPermissions as
|
|
1974
|
-
useHMSActions as
|
|
1864
|
+
selectPermissions as selectPermissions3,
|
|
1865
|
+
useHMSActions as useHMSActions10,
|
|
1975
1866
|
useHMSStore as useHMSStore14
|
|
1976
1867
|
} from "@100mslive/react-sdk";
|
|
1977
1868
|
import { ArrowRightIcon, CheckIcon as CheckIcon2, PersonIcon } from "@100mslive/react-icons";
|
|
1978
1869
|
var ChangeSelfRole = ({ onClick }) => {
|
|
1979
1870
|
const roles = useFilteredRoles();
|
|
1980
|
-
const permissions = useHMSStore14(
|
|
1871
|
+
const permissions = useHMSStore14(selectPermissions3);
|
|
1981
1872
|
const localPeerId = useHMSStore14(selectLocalPeerID5);
|
|
1982
1873
|
const localPeerRole = useHMSStore14(selectLocalPeerRoleName4);
|
|
1983
|
-
const hmsActions =
|
|
1874
|
+
const hmsActions = useHMSActions10();
|
|
1984
1875
|
const hideTriggerItem = useMedia4(config.media.sm);
|
|
1985
1876
|
const selfRoleChangeTo = useAppLayout("selfRoleChangeTo");
|
|
1986
1877
|
const availableSelfChangeRoles = useMemo4(() => arrayIntersection(selfRoleChangeTo, roles), [roles, selfRoleChangeTo]);
|
|
1987
1878
|
if (!permissions.changeRole) {
|
|
1988
1879
|
return null;
|
|
1989
1880
|
}
|
|
1990
|
-
return hideTriggerItem ? /* @__PURE__ */
|
|
1881
|
+
return hideTriggerItem ? /* @__PURE__ */ React17.createElement(Dropdown.Item, { onClick }, /* @__PURE__ */ React17.createElement(PersonIcon, null), /* @__PURE__ */ React17.createElement(Text, { variant: "sm", css: { mx: "$4" } }, "Change My Role")) : /* @__PURE__ */ React17.createElement(Dropdown.SubMenu, null, /* @__PURE__ */ React17.createElement(Dropdown.TriggerItem, { "data-testid": "change_my_role_btn" }, /* @__PURE__ */ React17.createElement(PersonIcon, null), /* @__PURE__ */ React17.createElement(Text, { variant: "sm", css: { flex: "1 1 0", mx: "$4" } }, "Change My Role"), /* @__PURE__ */ React17.createElement(ArrowRightIcon, null)), /* @__PURE__ */ React17.createElement(Dropdown.SubMenuContent, { sideOffset: 8, alignOffset: -5, css: { py: "$0", "@md": { w: "$64" } } }, availableSelfChangeRoles.map((role) => /* @__PURE__ */ React17.createElement(
|
|
1991
1882
|
Dropdown.Item,
|
|
1992
1883
|
{
|
|
1993
1884
|
key: role,
|
|
@@ -2001,20 +1892,20 @@ var ChangeSelfRole = ({ onClick }) => {
|
|
|
2001
1892
|
}),
|
|
2002
1893
|
"data-testid": "change_to_role_" + role
|
|
2003
1894
|
},
|
|
2004
|
-
/* @__PURE__ */
|
|
2005
|
-
localPeerRole === role && /* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ React17.createElement(Text, { variant: "sm" }, role),
|
|
1896
|
+
localPeerRole === role && /* @__PURE__ */ React17.createElement(CheckIcon2, { width: 16, height: 16 })
|
|
2006
1897
|
))));
|
|
2007
1898
|
};
|
|
2008
1899
|
|
|
2009
1900
|
// src/Prebuilt/components/MoreSettings/EmbedUrl.jsx
|
|
2010
1901
|
init_define_process_env();
|
|
2011
|
-
import
|
|
1902
|
+
import React18, { useState as useState9 } from "react";
|
|
2012
1903
|
import { ViewIcon } from "@100mslive/react-icons";
|
|
2013
1904
|
var EmbedUrl = ({ setShowOpenUrl }) => {
|
|
2014
1905
|
if (!window.CropTarget) {
|
|
2015
1906
|
return null;
|
|
2016
1907
|
}
|
|
2017
|
-
return /* @__PURE__ */
|
|
1908
|
+
return /* @__PURE__ */ React18.createElement(
|
|
2018
1909
|
Dropdown.Item,
|
|
2019
1910
|
{
|
|
2020
1911
|
onClick: () => {
|
|
@@ -2022,8 +1913,8 @@ var EmbedUrl = ({ setShowOpenUrl }) => {
|
|
|
2022
1913
|
},
|
|
2023
1914
|
"data-testid": "embed_url_btn"
|
|
2024
1915
|
},
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ React18.createElement(ViewIcon, null),
|
|
1917
|
+
/* @__PURE__ */ React18.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Embed URL")
|
|
2027
1918
|
);
|
|
2028
1919
|
};
|
|
2029
1920
|
function EmbedUrlModal({ onOpenChange }) {
|
|
@@ -2031,7 +1922,7 @@ function EmbedUrlModal({ onOpenChange }) {
|
|
|
2031
1922
|
const [url, setUrl] = useState9((embedConfig == null ? void 0 : embedConfig.url) || "");
|
|
2032
1923
|
const isAnythingEmbedded = !!(embedConfig == null ? void 0 : embedConfig.url);
|
|
2033
1924
|
const isModifying = isAnythingEmbedded && url && url !== embedConfig.url;
|
|
2034
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ React18.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React18.createElement(DialogContent, { title: "Embed URL", Icon: ViewIcon }, /* @__PURE__ */ React18.createElement(DialogInput, { title: "URL", value: url, onChange: setUrl, placeholder: "https://www.tldraw.com/", type: "url" }), /* @__PURE__ */ React18.createElement(DialogRow, null, /* @__PURE__ */ React18.createElement(Text, null, "Embed a url and share with everyone in the room. Ensure that you're sharing the current tab when the prompt opens. Note that not all websites support being embedded.")), /* @__PURE__ */ React18.createElement(DialogRow, { justify: "end" }, isAnythingEmbedded ? /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
2035
1926
|
Button,
|
|
2036
1927
|
{
|
|
2037
1928
|
variant: "primary",
|
|
@@ -2045,7 +1936,7 @@ function EmbedUrlModal({ onOpenChange }) {
|
|
|
2045
1936
|
css: { mr: "$4" }
|
|
2046
1937
|
},
|
|
2047
1938
|
"Update Embed"
|
|
2048
|
-
), /* @__PURE__ */
|
|
1939
|
+
), /* @__PURE__ */ React18.createElement(
|
|
2049
1940
|
Button,
|
|
2050
1941
|
{
|
|
2051
1942
|
variant: "danger",
|
|
@@ -2057,7 +1948,7 @@ function EmbedUrlModal({ onOpenChange }) {
|
|
|
2057
1948
|
"data-testid": "embed_url_btn"
|
|
2058
1949
|
},
|
|
2059
1950
|
"Stop Embed"
|
|
2060
|
-
)) : /* @__PURE__ */
|
|
1951
|
+
)) : /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
2061
1952
|
Button,
|
|
2062
1953
|
{
|
|
2063
1954
|
variant: "primary",
|
|
@@ -2071,7 +1962,7 @@ function EmbedUrlModal({ onOpenChange }) {
|
|
|
2071
1962
|
css: { mr: "$4" }
|
|
2072
1963
|
},
|
|
2073
1964
|
"Just Embed"
|
|
2074
|
-
), /* @__PURE__ */
|
|
1965
|
+
), /* @__PURE__ */ React18.createElement(
|
|
2075
1966
|
Button,
|
|
2076
1967
|
{
|
|
2077
1968
|
variant: "primary",
|
|
@@ -2089,16 +1980,16 @@ function EmbedUrlModal({ onOpenChange }) {
|
|
|
2089
1980
|
|
|
2090
1981
|
// src/Prebuilt/components/MoreSettings/FullScreenItem.jsx
|
|
2091
1982
|
init_define_process_env();
|
|
2092
|
-
import
|
|
1983
|
+
import React19 from "react";
|
|
2093
1984
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
|
2094
1985
|
|
|
2095
1986
|
// src/Prebuilt/components/hooks/useFullscreen.js
|
|
2096
1987
|
init_define_process_env();
|
|
2097
|
-
import { useCallback as
|
|
1988
|
+
import { useCallback as useCallback7, useEffect as useEffect7, useState as useState10 } from "react";
|
|
2098
1989
|
import screenfull2 from "screenfull";
|
|
2099
1990
|
var useFullscreen2 = () => {
|
|
2100
1991
|
const [isFullScreenEnabled, setIsFullScreenEnabled] = useState10(screenfull2.isFullscreen);
|
|
2101
|
-
const toggle =
|
|
1992
|
+
const toggle = useCallback7(() => __async(void 0, null, function* () {
|
|
2102
1993
|
if (!screenfull2.isEnabled) {
|
|
2103
1994
|
ToastManager.addToast({ title: "Fullscreen feature not supported" });
|
|
2104
1995
|
return;
|
|
@@ -2140,7 +2031,7 @@ var FullScreenItem = () => {
|
|
|
2140
2031
|
if (!isFullscreenEnabled || !allowed) {
|
|
2141
2032
|
return null;
|
|
2142
2033
|
}
|
|
2143
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ React19.createElement(
|
|
2144
2035
|
Dropdown.Item,
|
|
2145
2036
|
{
|
|
2146
2037
|
onClick: () => {
|
|
@@ -2148,15 +2039,15 @@ var FullScreenItem = () => {
|
|
|
2148
2039
|
},
|
|
2149
2040
|
"data-testid": "full_screen_btn"
|
|
2150
2041
|
},
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
/* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ React19.createElement(ExpandIcon2, null),
|
|
2043
|
+
/* @__PURE__ */ React19.createElement(Text, { variant: "sm", css: { ml: "$4" } }, isFullscreen ? "Exit " : "Go ", "Fullscreen")
|
|
2153
2044
|
);
|
|
2154
2045
|
};
|
|
2155
2046
|
|
|
2156
2047
|
// src/Prebuilt/components/MoreSettings/MuteAllModal.jsx
|
|
2157
2048
|
init_define_process_env();
|
|
2158
|
-
import
|
|
2159
|
-
import { useHMSActions as
|
|
2049
|
+
import React20, { useCallback as useCallback8, useState as useState11 } from "react";
|
|
2050
|
+
import { useHMSActions as useHMSActions11 } from "@100mslive/react-sdk";
|
|
2160
2051
|
import { MicOffIcon } from "@100mslive/react-icons";
|
|
2161
2052
|
var trackSourceOptions = [
|
|
2162
2053
|
{ label: "All Track Sources", value: "" },
|
|
@@ -2172,12 +2063,12 @@ var trackTypeOptions = [
|
|
|
2172
2063
|
];
|
|
2173
2064
|
var MuteAllModal = ({ onOpenChange }) => {
|
|
2174
2065
|
const roles = useFilteredRoles();
|
|
2175
|
-
const hmsActions =
|
|
2066
|
+
const hmsActions = useHMSActions11();
|
|
2176
2067
|
const [enabled, setEnabled] = useState11(false);
|
|
2177
2068
|
const [trackType, setTrackType] = useState11();
|
|
2178
2069
|
const [selectedRole, setRole] = useState11();
|
|
2179
2070
|
const [selectedSource, setSource] = useState11();
|
|
2180
|
-
const muteAll =
|
|
2071
|
+
const muteAll = useCallback8(() => __async(void 0, null, function* () {
|
|
2181
2072
|
yield hmsActions.setRemoteTracksEnabled({
|
|
2182
2073
|
enabled,
|
|
2183
2074
|
type: trackType,
|
|
@@ -2186,7 +2077,7 @@ var MuteAllModal = ({ onOpenChange }) => {
|
|
|
2186
2077
|
});
|
|
2187
2078
|
onOpenChange(false);
|
|
2188
2079
|
}), [selectedRole, enabled, trackType, selectedSource, hmsActions, onOpenChange]);
|
|
2189
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ React20.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React20.createElement(DialogContent, { title: "Mute/Unmute Remote Tracks", Icon: MicOffIcon }, /* @__PURE__ */ React20.createElement(
|
|
2190
2081
|
DialogSelect,
|
|
2191
2082
|
{
|
|
2192
2083
|
title: "Role",
|
|
@@ -2196,7 +2087,7 @@ var MuteAllModal = ({ onOpenChange }) => {
|
|
|
2196
2087
|
labelField: "label",
|
|
2197
2088
|
onChange: setRole
|
|
2198
2089
|
}
|
|
2199
|
-
), /* @__PURE__ */
|
|
2090
|
+
), /* @__PURE__ */ React20.createElement(
|
|
2200
2091
|
DialogSelect,
|
|
2201
2092
|
{
|
|
2202
2093
|
title: "Track type",
|
|
@@ -2206,7 +2097,7 @@ var MuteAllModal = ({ onOpenChange }) => {
|
|
|
2206
2097
|
keyField: "value",
|
|
2207
2098
|
labelField: "label"
|
|
2208
2099
|
}
|
|
2209
|
-
), /* @__PURE__ */
|
|
2100
|
+
), /* @__PURE__ */ React20.createElement(
|
|
2210
2101
|
DialogSelect,
|
|
2211
2102
|
{
|
|
2212
2103
|
title: "Track source",
|
|
@@ -2216,7 +2107,7 @@ var MuteAllModal = ({ onOpenChange }) => {
|
|
|
2216
2107
|
keyField: "value",
|
|
2217
2108
|
labelField: "label"
|
|
2218
2109
|
}
|
|
2219
|
-
), /* @__PURE__ */
|
|
2110
|
+
), /* @__PURE__ */ React20.createElement(DialogRow, null, /* @__PURE__ */ React20.createElement(Text, { variant: "md" }, "Track status"), /* @__PURE__ */ React20.createElement(RadioGroup.Root, { value: enabled, onValueChange: setEnabled }, /* @__PURE__ */ React20.createElement(Flex, { align: "center", css: { mr: "$8" } }, /* @__PURE__ */ React20.createElement(RadioGroup.Item, { value: false, id: "trackDisableRadio", css: { mr: "$4" } }, /* @__PURE__ */ React20.createElement(RadioGroup.Indicator, null)), /* @__PURE__ */ React20.createElement(Label, { htmlFor: "trackDisableRadio" }, "Mute")), /* @__PURE__ */ React20.createElement(Flex, { align: "center", css: { cursor: "pointer" } }, /* @__PURE__ */ React20.createElement(RadioGroup.Item, { value: true, id: "trackEnableRadio", css: { mr: "$4" } }, /* @__PURE__ */ React20.createElement(RadioGroup.Indicator, null)), /* @__PURE__ */ React20.createElement(Label, { htmlFor: "trackEnableRadio" }, "Request Unmute")))), /* @__PURE__ */ React20.createElement(DialogRow, { justify: "end" }, /* @__PURE__ */ React20.createElement(Button, { variant: "primary", onClick: muteAll }, "Apply"))));
|
|
2220
2111
|
};
|
|
2221
2112
|
|
|
2222
2113
|
// src/Prebuilt/components/MoreSettings/MoreSettings.jsx
|
|
@@ -2233,14 +2124,14 @@ var MODALS = {
|
|
|
2233
2124
|
EMBED_URL: "embedUrl"
|
|
2234
2125
|
};
|
|
2235
2126
|
var MoreSettings = () => {
|
|
2236
|
-
const permissions = useHMSStore15(
|
|
2237
|
-
const isAllowedToPublish = useHMSStore15(
|
|
2127
|
+
const permissions = useHMSStore15(selectPermissions4);
|
|
2128
|
+
const isAllowedToPublish = useHMSStore15(selectIsAllowedToPublish);
|
|
2238
2129
|
const localPeerId = useHMSStore15(selectLocalPeerID6);
|
|
2239
2130
|
const localPeerRole = useHMSStore15(selectLocalPeerRoleName5);
|
|
2240
|
-
const hmsActions =
|
|
2241
|
-
const enablHlsStats = useHMSStore15(
|
|
2131
|
+
const hmsActions = useHMSActions12();
|
|
2132
|
+
const enablHlsStats = useHMSStore15(selectAppData2(APP_DATA.hlsStats));
|
|
2242
2133
|
const isMobile = useMedia5(config.media.md);
|
|
2243
|
-
const { isBrowserRecordingOn } =
|
|
2134
|
+
const { isBrowserRecordingOn } = useRecordingStreaming3();
|
|
2244
2135
|
const isChangeNameEnabled = useIsFeatureEnabled(FEATURE_LIST.CHANGE_NAME);
|
|
2245
2136
|
const isEmbedEnabled = useIsFeatureEnabled(FEATURE_LIST.EMBED_URL);
|
|
2246
2137
|
const isSFNEnabled = useIsFeatureEnabled(FEATURE_LIST.STARTS_FOR_NERDS);
|
|
@@ -2257,19 +2148,20 @@ var MoreSettings = () => {
|
|
|
2257
2148
|
return copy;
|
|
2258
2149
|
});
|
|
2259
2150
|
};
|
|
2260
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ React21.createElement(Fragment3, null, /* @__PURE__ */ React21.createElement(
|
|
2261
2152
|
Dropdown.Root,
|
|
2262
2153
|
{
|
|
2263
2154
|
open: openModals.has(MODALS.MORE_SETTINGS),
|
|
2264
2155
|
onOpenChange: (value) => updateState(MODALS.MORE_SETTINGS, value)
|
|
2265
2156
|
},
|
|
2266
|
-
/* @__PURE__ */
|
|
2267
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ React21.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "more_settings_btn" }, /* @__PURE__ */ React21.createElement(IconButton_default, null, /* @__PURE__ */ React21.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ React21.createElement(Box, null, /* @__PURE__ */ React21.createElement(VerticalMenuIcon, null))))),
|
|
2158
|
+
/* @__PURE__ */ React21.createElement(
|
|
2268
2159
|
Dropdown.Content,
|
|
2269
2160
|
{
|
|
2270
2161
|
sideOffset: 5,
|
|
2271
2162
|
align: "center",
|
|
2272
2163
|
css: {
|
|
2164
|
+
py: "$0",
|
|
2273
2165
|
maxHeight: "$96",
|
|
2274
2166
|
"@md": { w: "$64" },
|
|
2275
2167
|
"div[role='separator']:first-child": {
|
|
@@ -2277,65 +2169,65 @@ var MoreSettings = () => {
|
|
|
2277
2169
|
}
|
|
2278
2170
|
}
|
|
2279
2171
|
},
|
|
2280
|
-
isMobile && (permissions == null ? void 0 : permissions.browserRecording) ? /* @__PURE__ */
|
|
2281
|
-
isChangeNameEnabled && /* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
(permissions == null ? void 0 : permissions.changeRole) && /* @__PURE__ */
|
|
2172
|
+
isMobile && (permissions == null ? void 0 : permissions.browserRecording) ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(Dropdown.Item, { onClick: () => updateState(MODALS.START_RECORDING, true) }, /* @__PURE__ */ React21.createElement(RecordIcon, null), /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, isBrowserRecordingOn ? "Stop" : "Start", " Recording")), /* @__PURE__ */ React21.createElement(Dropdown.ItemSeparator, null)) : null,
|
|
2173
|
+
isChangeNameEnabled && /* @__PURE__ */ React21.createElement(Dropdown.Item, { onClick: () => updateState(MODALS.CHANGE_NAME, true), "data-testid": "change_name_btn" }, /* @__PURE__ */ React21.createElement(PencilIcon, null), /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Change Name")),
|
|
2174
|
+
/* @__PURE__ */ React21.createElement(ChangeSelfRole, { onClick: () => updateState(MODALS.SELF_ROLE_CHANGE, true) }),
|
|
2175
|
+
(permissions == null ? void 0 : permissions.changeRole) && /* @__PURE__ */ React21.createElement(
|
|
2284
2176
|
Dropdown.Item,
|
|
2285
2177
|
{
|
|
2286
2178
|
onClick: () => updateState(MODALS.BULK_ROLE_CHANGE, true),
|
|
2287
2179
|
"data-testid": "bulk_role_change_btn"
|
|
2288
2180
|
},
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
/* @__PURE__ */
|
|
2181
|
+
/* @__PURE__ */ React21.createElement(ChangeRoleIcon2, null),
|
|
2182
|
+
/* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Bulk Role Change")
|
|
2291
2183
|
),
|
|
2292
|
-
/* @__PURE__ */
|
|
2293
|
-
isAllowedToPublish.screen && isEmbedEnabled && /* @__PURE__ */
|
|
2294
|
-
permissions.mute && /* @__PURE__ */
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
FeatureFlags.enableStatsForNerds && isSFNEnabled && (localPeerRole === "hls-viewer" ? Hls.isSupported() ? /* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ React21.createElement(FullScreenItem, null),
|
|
2185
|
+
isAllowedToPublish.screen && isEmbedEnabled && /* @__PURE__ */ React21.createElement(EmbedUrl, { setShowOpenUrl: () => updateState(MODALS.EMBED_URL, true) }),
|
|
2186
|
+
permissions.mute && /* @__PURE__ */ React21.createElement(Dropdown.Item, { onClick: () => updateState(MODALS.MUTE_ALL, true), "data-testid": "mute_all_btn" }, /* @__PURE__ */ React21.createElement(MicOffIcon2, null), /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Mute All")),
|
|
2187
|
+
/* @__PURE__ */ React21.createElement(Dropdown.ItemSeparator, null),
|
|
2188
|
+
/* @__PURE__ */ React21.createElement(Dropdown.Item, { onClick: () => updateState(MODALS.DEVICE_SETTINGS, true), "data-testid": "device_settings_btn" }, /* @__PURE__ */ React21.createElement(SettingsIcon, null), /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Settings")),
|
|
2189
|
+
FeatureFlags.enableStatsForNerds && isSFNEnabled && (localPeerRole === "hls-viewer" ? Hls.isSupported() ? /* @__PURE__ */ React21.createElement(
|
|
2298
2190
|
Dropdown.Item,
|
|
2299
2191
|
{
|
|
2300
2192
|
onClick: () => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats),
|
|
2301
2193
|
"data-testid": "hls_stats"
|
|
2302
2194
|
},
|
|
2303
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ React21.createElement(
|
|
2304
2196
|
Checkbox.Root,
|
|
2305
2197
|
{
|
|
2306
2198
|
css: { margin: "$2" },
|
|
2307
2199
|
checked: enablHlsStats,
|
|
2308
2200
|
onCheckedChange: () => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)
|
|
2309
2201
|
},
|
|
2310
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ React21.createElement(Checkbox.Indicator, null, /* @__PURE__ */ React21.createElement(CheckIcon3, { width: 16, height: 16 }))
|
|
2311
2203
|
),
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
) : null : /* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ React21.createElement(Flex, { justify: "between", css: { width: "100%" } }, /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Show HLS Stats"), !isMobileOS ? /* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, `${isMacOS ? "\u2318" : "ctrl"} + ]`) : null)
|
|
2205
|
+
) : null : /* @__PURE__ */ React21.createElement(
|
|
2314
2206
|
Dropdown.Item,
|
|
2315
2207
|
{
|
|
2316
2208
|
onClick: () => updateState(MODALS.STATS_FOR_NERDS, true),
|
|
2317
2209
|
"data-testid": "stats_for_nreds_btn"
|
|
2318
2210
|
},
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */
|
|
2211
|
+
/* @__PURE__ */ React21.createElement(InfoIcon, null),
|
|
2212
|
+
/* @__PURE__ */ React21.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Stats for Nerds")
|
|
2321
2213
|
))
|
|
2322
2214
|
)
|
|
2323
|
-
), openModals.has(MODALS.BULK_ROLE_CHANGE) && /* @__PURE__ */
|
|
2215
|
+
), openModals.has(MODALS.BULK_ROLE_CHANGE) && /* @__PURE__ */ React21.createElement(BulkRoleChangeModal, { onOpenChange: (value) => updateState(MODALS.BULK_ROLE_CHANGE, value) }), openModals.has(MODALS.MUTE_ALL) && /* @__PURE__ */ React21.createElement(MuteAllModal, { onOpenChange: (value) => updateState(MODALS.MUTE_ALL, value) }), openModals.has(MODALS.CHANGE_NAME) && /* @__PURE__ */ React21.createElement(ChangeNameModal, { onOpenChange: (value) => updateState(MODALS.CHANGE_NAME, value) }), openModals.has(MODALS.DEVICE_SETTINGS) && /* @__PURE__ */ React21.createElement(SettingsModal_default, { open: true, onOpenChange: (value) => updateState(MODALS.DEVICE_SETTINGS, value) }), FeatureFlags.enableStatsForNerds && openModals.has(MODALS.STATS_FOR_NERDS) && /* @__PURE__ */ React21.createElement(StatsForNerds, { open: true, onOpenChange: (value) => updateState(MODALS.STATS_FOR_NERDS, value) }), openModals.has(MODALS.SELF_ROLE_CHANGE) && /* @__PURE__ */ React21.createElement(RoleChangeModal, { peerId: localPeerId, onOpenChange: (value) => updateState(MODALS.SELF_ROLE_CHANGE, value) }), openModals.has(MODALS.START_RECORDING) && /* @__PURE__ */ React21.createElement(StartRecording_default, { open: true, onOpenChange: (value) => updateState(MODALS.START_RECORDING, value) }), openModals.has(MODALS.EMBED_URL) && /* @__PURE__ */ React21.createElement(EmbedUrlModal, { onOpenChange: (value) => updateState(MODALS.EMBED_URL, value) }));
|
|
2324
2216
|
};
|
|
2325
2217
|
|
|
2326
2218
|
// src/Prebuilt/components/PIP/index.jsx
|
|
2327
2219
|
init_define_process_env();
|
|
2328
|
-
import
|
|
2220
|
+
import React23 from "react";
|
|
2329
2221
|
|
|
2330
2222
|
// src/Prebuilt/components/PIP/PIPComponent.jsx
|
|
2331
2223
|
init_define_process_env();
|
|
2332
|
-
import
|
|
2224
|
+
import React22, { useCallback as useCallback9, useEffect as useEffect8, useState as useState13 } from "react";
|
|
2333
2225
|
import {
|
|
2334
2226
|
selectLocalPeerRoleName as selectLocalPeerRoleName6,
|
|
2335
2227
|
selectPeers as selectPeers4,
|
|
2336
2228
|
selectRemotePeers as selectRemotePeers2,
|
|
2337
2229
|
selectTracksMap as selectTracksMap2,
|
|
2338
|
-
useHMSActions as
|
|
2230
|
+
useHMSActions as useHMSActions13,
|
|
2339
2231
|
useHMSStore as useHMSStore16,
|
|
2340
2232
|
useHMSVanillaStore
|
|
2341
2233
|
} from "@100mslive/react-sdk";
|
|
@@ -2351,10 +2243,10 @@ var CANVAS_FILL_COLOR;
|
|
|
2351
2243
|
var CANVAS_STROKE_COLOR;
|
|
2352
2244
|
function setPIPCanvasColors() {
|
|
2353
2245
|
if (!CANVAS_FILL_COLOR) {
|
|
2354
|
-
CANVAS_FILL_COLOR = window.getComputedStyle(document.documentElement).getPropertyValue("--hms-ui-colors-
|
|
2246
|
+
CANVAS_FILL_COLOR = window.getComputedStyle(document.documentElement).getPropertyValue("--hms-ui-colors-surface_bright");
|
|
2355
2247
|
}
|
|
2356
2248
|
if (!CANVAS_STROKE_COLOR) {
|
|
2357
|
-
CANVAS_STROKE_COLOR = window.getComputedStyle(document.documentElement).getPropertyValue("--hms-ui-colors-
|
|
2249
|
+
CANVAS_STROKE_COLOR = window.getComputedStyle(document.documentElement).getPropertyValue("--hms-ui-colors-border_bright");
|
|
2358
2250
|
}
|
|
2359
2251
|
}
|
|
2360
2252
|
function resetPIPCanvasColors() {
|
|
@@ -2785,10 +2677,10 @@ var MediaSession = new SetupMediaSession();
|
|
|
2785
2677
|
var PIPComponent = ({ peers, showLocalPeer }) => {
|
|
2786
2678
|
const localPeerRole = useHMSStore16(selectLocalPeerRoleName6);
|
|
2787
2679
|
const [isPipOn, setIsPipOn] = useState13(PictureInPicture.isOn());
|
|
2788
|
-
const hmsActions =
|
|
2680
|
+
const hmsActions = useHMSActions13();
|
|
2789
2681
|
const store = useHMSVanillaStore();
|
|
2790
2682
|
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.PICTURE_IN_PICTURE);
|
|
2791
|
-
const onPipToggle =
|
|
2683
|
+
const onPipToggle = useCallback9(() => {
|
|
2792
2684
|
if (!isPipOn) {
|
|
2793
2685
|
PictureInPicture.start(hmsActions, setIsPipOn).catch((err) => console.error("error in starting pip", err));
|
|
2794
2686
|
MediaSession.setup(hmsActions, store);
|
|
@@ -2804,7 +2696,7 @@ var PIPComponent = ({ peers, showLocalPeer }) => {
|
|
|
2804
2696
|
if (!PictureInPicture.isSupported() || localPeerRole === DEFAULT_HLS_VIEWER_ROLE || !isFeatureEnabled) {
|
|
2805
2697
|
return null;
|
|
2806
2698
|
}
|
|
2807
|
-
return /* @__PURE__ */
|
|
2699
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Tooltip, { title: `${isPipOn ? "Deactivate" : "Activate"} picture in picture view` }, /* @__PURE__ */ React22.createElement(IconButton_default, { active: !isPipOn, key: "pip", onClick: () => onPipToggle(), "data-testid": "pip_btn" }, /* @__PURE__ */ React22.createElement(PipIcon, null))), isPipOn && /* @__PURE__ */ React22.createElement(ActivatedPIP, { showLocalPeer, peers }));
|
|
2808
2700
|
};
|
|
2809
2701
|
var ActivatedPIP = ({ showLocalPeer, peers }) => {
|
|
2810
2702
|
const tracksMap = useHMSStore16(selectTracksMap2);
|
|
@@ -2825,18 +2717,18 @@ var PIPComponent_default = PIPComponent;
|
|
|
2825
2717
|
// src/Prebuilt/components/PIP/index.jsx
|
|
2826
2718
|
var PIP = () => {
|
|
2827
2719
|
const pinnedTrack = usePinnedTrack();
|
|
2828
|
-
return /* @__PURE__ */
|
|
2720
|
+
return /* @__PURE__ */ React23.createElement(PIPComponent_default, { peers: pinnedTrack && pinnedTrack.enabled ? [pinnedTrack.peerId] : void 0, showLocalPeer: true });
|
|
2829
2721
|
};
|
|
2830
2722
|
|
|
2831
2723
|
// src/Prebuilt/components/ScreenShare.jsx
|
|
2832
2724
|
init_define_process_env();
|
|
2833
|
-
import
|
|
2834
|
-
import { selectIsAllowedToPublish as
|
|
2725
|
+
import React31, { Fragment as Fragment5 } from "react";
|
|
2726
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, useHMSStore as useHMSStore17, useScreenShare as useScreenShare4 } from "@100mslive/react-sdk";
|
|
2835
2727
|
import { ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
|
|
2836
2728
|
|
|
2837
2729
|
// src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
|
|
2838
2730
|
init_define_process_env();
|
|
2839
|
-
import
|
|
2731
|
+
import React30, { Fragment as Fragment4, useState as useState15 } from "react";
|
|
2840
2732
|
import { useScreenShare as useScreenShare3 } from "@100mslive/react-sdk";
|
|
2841
2733
|
import { PdfShare, ScreenShare, StarIcon, VerticalMenuIcon as VerticalMenuIcon2 } from "@100mslive/react-icons";
|
|
2842
2734
|
|
|
@@ -2867,30 +2759,30 @@ var ShareMenuIcon = styled(ScreenShareButton, {
|
|
|
2867
2759
|
|
|
2868
2760
|
// src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx
|
|
2869
2761
|
init_define_process_env();
|
|
2870
|
-
import
|
|
2762
|
+
import React29, { useState as useState14 } from "react";
|
|
2871
2763
|
|
|
2872
2764
|
// src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx
|
|
2873
2765
|
init_define_process_env();
|
|
2874
|
-
import
|
|
2766
|
+
import React24 from "react";
|
|
2875
2767
|
import { InfoIcon as InfoIcon2 } from "@100mslive/react-icons";
|
|
2876
2768
|
var PdfErrorView = ({ isPDFUrlValid }) => {
|
|
2877
|
-
return !isPDFUrlValid && /* @__PURE__ */
|
|
2769
|
+
return !isPDFUrlValid && /* @__PURE__ */ React24.createElement(
|
|
2878
2770
|
DialogRow,
|
|
2879
2771
|
{
|
|
2880
2772
|
css: {
|
|
2881
2773
|
mt: "-$8",
|
|
2882
|
-
color: "$
|
|
2774
|
+
color: "$alert_error_default",
|
|
2883
2775
|
justifyContent: "start"
|
|
2884
2776
|
}
|
|
2885
2777
|
},
|
|
2886
|
-
/* @__PURE__ */
|
|
2887
|
-
/* @__PURE__ */
|
|
2778
|
+
/* @__PURE__ */ React24.createElement(InfoIcon2, { width: "12px", height: "12px" }),
|
|
2779
|
+
/* @__PURE__ */ React24.createElement(
|
|
2888
2780
|
Text,
|
|
2889
2781
|
{
|
|
2890
2782
|
variant: "caption",
|
|
2891
2783
|
css: {
|
|
2892
2784
|
pl: "$1",
|
|
2893
|
-
color: "$
|
|
2785
|
+
color: "$alert_error_default"
|
|
2894
2786
|
}
|
|
2895
2787
|
},
|
|
2896
2788
|
"Please enter a valid PDF URL"
|
|
@@ -2900,9 +2792,9 @@ var PdfErrorView = ({ isPDFUrlValid }) => {
|
|
|
2900
2792
|
|
|
2901
2793
|
// src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx
|
|
2902
2794
|
init_define_process_env();
|
|
2903
|
-
import
|
|
2795
|
+
import React25 from "react";
|
|
2904
2796
|
var PDFHeader = () => {
|
|
2905
|
-
return /* @__PURE__ */
|
|
2797
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2906
2798
|
DialogCol,
|
|
2907
2799
|
{
|
|
2908
2800
|
align: "start",
|
|
@@ -2911,13 +2803,13 @@ var PDFHeader = () => {
|
|
|
2911
2803
|
mb: "$6"
|
|
2912
2804
|
}
|
|
2913
2805
|
},
|
|
2914
|
-
/* @__PURE__ */
|
|
2915
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ React25.createElement(Dialog.Title, { asChild: true }, /* @__PURE__ */ React25.createElement(Text, { as: "h6", variant: "h6" }, "Share PDF")),
|
|
2807
|
+
/* @__PURE__ */ React25.createElement(Dialog.Description, { asChild: true }, /* @__PURE__ */ React25.createElement(
|
|
2916
2808
|
Text,
|
|
2917
2809
|
{
|
|
2918
2810
|
variant: "sm",
|
|
2919
2811
|
css: {
|
|
2920
|
-
c: "$
|
|
2812
|
+
c: "$on_surface_medium"
|
|
2921
2813
|
}
|
|
2922
2814
|
},
|
|
2923
2815
|
"Choose PDF you want to annotate and share"
|
|
@@ -2927,23 +2819,23 @@ var PDFHeader = () => {
|
|
|
2927
2819
|
|
|
2928
2820
|
// src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx
|
|
2929
2821
|
init_define_process_env();
|
|
2930
|
-
import
|
|
2822
|
+
import React26 from "react";
|
|
2931
2823
|
import { InfoIcon as InfoIcon3 } from "@100mslive/react-icons";
|
|
2932
2824
|
var PDFInfo = () => {
|
|
2933
|
-
return /* @__PURE__ */
|
|
2825
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2934
2826
|
DialogRow,
|
|
2935
2827
|
{
|
|
2936
2828
|
css: {
|
|
2937
2829
|
px: "$8",
|
|
2938
2830
|
py: "$3",
|
|
2939
|
-
bg: "$
|
|
2831
|
+
bg: "$surface_bright",
|
|
2940
2832
|
r: "$1",
|
|
2941
2833
|
outline: "none",
|
|
2942
|
-
border: "1px solid $
|
|
2834
|
+
border: "1px solid $border_bright",
|
|
2943
2835
|
minHeight: "$11"
|
|
2944
2836
|
}
|
|
2945
2837
|
},
|
|
2946
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ React26.createElement(
|
|
2947
2839
|
InfoIcon3,
|
|
2948
2840
|
{
|
|
2949
2841
|
width: "64px",
|
|
@@ -2953,13 +2845,13 @@ var PDFInfo = () => {
|
|
|
2953
2845
|
}
|
|
2954
2846
|
}
|
|
2955
2847
|
),
|
|
2956
|
-
/* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ React26.createElement(Text, { variant: "caption" }, "On the next screen, ensure you select \u201CThis Tab\u201D and click on share. Only the PDF viewer will be seen by other participants")
|
|
2957
2849
|
);
|
|
2958
2850
|
};
|
|
2959
2851
|
|
|
2960
2852
|
// src/Prebuilt/components/pdfAnnotator/submitPdf.jsx
|
|
2961
2853
|
init_define_process_env();
|
|
2962
|
-
import
|
|
2854
|
+
import React27, { useCallback as useCallback10 } from "react";
|
|
2963
2855
|
var SubmitPDF = ({
|
|
2964
2856
|
pdfFile,
|
|
2965
2857
|
pdfURL,
|
|
@@ -2969,7 +2861,7 @@ var SubmitPDF = ({
|
|
|
2969
2861
|
onOpenChange
|
|
2970
2862
|
}) => {
|
|
2971
2863
|
const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
|
|
2972
|
-
const isValidPDF =
|
|
2864
|
+
const isValidPDF = useCallback10(
|
|
2973
2865
|
(pdfURL2) => {
|
|
2974
2866
|
const extension = pdfURL2.split(".").pop().toLowerCase();
|
|
2975
2867
|
setIsValidateProgress(true);
|
|
@@ -2996,7 +2888,7 @@ var SubmitPDF = ({
|
|
|
2996
2888
|
},
|
|
2997
2889
|
[onOpenChange, pdfFile, setIsPDFUrlValid, setIsValidateProgress, setPDFConfig]
|
|
2998
2890
|
);
|
|
2999
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ React27.createElement(
|
|
3000
2892
|
Flex,
|
|
3001
2893
|
{
|
|
3002
2894
|
direction: "row",
|
|
@@ -3006,7 +2898,7 @@ var SubmitPDF = ({
|
|
|
3006
2898
|
gap: "$8"
|
|
3007
2899
|
}
|
|
3008
2900
|
},
|
|
3009
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ React27.createElement(
|
|
3010
2902
|
Button,
|
|
3011
2903
|
{
|
|
3012
2904
|
variant: "standard",
|
|
@@ -3019,7 +2911,7 @@ var SubmitPDF = ({
|
|
|
3019
2911
|
},
|
|
3020
2912
|
"Cancel"
|
|
3021
2913
|
),
|
|
3022
|
-
/* @__PURE__ */
|
|
2914
|
+
/* @__PURE__ */ React27.createElement(
|
|
3023
2915
|
Button,
|
|
3024
2916
|
{
|
|
3025
2917
|
variant: "primary",
|
|
@@ -3046,7 +2938,7 @@ var SubmitPDF = ({
|
|
|
3046
2938
|
|
|
3047
2939
|
// src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx
|
|
3048
2940
|
init_define_process_env();
|
|
3049
|
-
import
|
|
2941
|
+
import React28 from "react";
|
|
3050
2942
|
import { TrashIcon } from "@100mslive/react-icons";
|
|
3051
2943
|
var UploadedFile = ({
|
|
3052
2944
|
pdfFile,
|
|
@@ -3058,7 +2950,7 @@ var UploadedFile = ({
|
|
|
3058
2950
|
onOpenChange
|
|
3059
2951
|
}) => {
|
|
3060
2952
|
const [fileName, ext] = pdfFile.name.split(".");
|
|
3061
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ React28.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React28.createElement(Dialog.Portal, null, /* @__PURE__ */ React28.createElement(Dialog.Overlay, null), /* @__PURE__ */ React28.createElement(
|
|
3062
2954
|
Dialog.Content,
|
|
3063
2955
|
{
|
|
3064
2956
|
css: {
|
|
@@ -3067,29 +2959,29 @@ var UploadedFile = ({
|
|
|
3067
2959
|
p: "$10"
|
|
3068
2960
|
}
|
|
3069
2961
|
},
|
|
3070
|
-
/* @__PURE__ */
|
|
2962
|
+
/* @__PURE__ */ React28.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React28.createElement(PDFHeader, null), /* @__PURE__ */ React28.createElement(
|
|
3071
2963
|
DialogRow,
|
|
3072
2964
|
{
|
|
3073
2965
|
css: {
|
|
3074
2966
|
fontFamily: "$sans",
|
|
3075
|
-
bg: "$
|
|
2967
|
+
bg: "$surface_bright",
|
|
3076
2968
|
r: "$1",
|
|
3077
2969
|
outline: "none",
|
|
3078
|
-
border: "1px solid $
|
|
2970
|
+
border: "1px solid $border_bright",
|
|
3079
2971
|
p: "$4 $6",
|
|
3080
2972
|
minHeight: "$11",
|
|
3081
|
-
c: "$
|
|
2973
|
+
c: "$on_primary_high",
|
|
3082
2974
|
fs: "$md",
|
|
3083
2975
|
w: "100%",
|
|
3084
2976
|
"&:focus": {
|
|
3085
|
-
boxShadow: "0 0 0 1px $colors$
|
|
2977
|
+
boxShadow: "0 0 0 1px $colors$primary_default",
|
|
3086
2978
|
border: "1px solid $transparent"
|
|
3087
2979
|
},
|
|
3088
2980
|
mb: 0,
|
|
3089
2981
|
mt: "$6"
|
|
3090
2982
|
}
|
|
3091
2983
|
},
|
|
3092
|
-
/* @__PURE__ */
|
|
2984
|
+
/* @__PURE__ */ React28.createElement(Flex, { direction: "row", css: { flexGrow: "1", maxWidth: "88%" } }, /* @__PURE__ */ React28.createElement(
|
|
3093
2985
|
Text,
|
|
3094
2986
|
{
|
|
3095
2987
|
css: {
|
|
@@ -3099,8 +2991,8 @@ var UploadedFile = ({
|
|
|
3099
2991
|
}
|
|
3100
2992
|
},
|
|
3101
2993
|
fileName
|
|
3102
|
-
), /* @__PURE__ */
|
|
3103
|
-
/* @__PURE__ */
|
|
2994
|
+
), /* @__PURE__ */ React28.createElement(Text, { css: { whiteSpace: "nowrap" } }, ".", ext)),
|
|
2995
|
+
/* @__PURE__ */ React28.createElement(
|
|
3104
2996
|
TrashIcon,
|
|
3105
2997
|
{
|
|
3106
2998
|
onClick: () => setPDFFile(null),
|
|
@@ -3109,7 +3001,7 @@ var UploadedFile = ({
|
|
|
3109
3001
|
}
|
|
3110
3002
|
}
|
|
3111
3003
|
)
|
|
3112
|
-
), /* @__PURE__ */
|
|
3004
|
+
), /* @__PURE__ */ React28.createElement(PDFInfo, null), /* @__PURE__ */ React28.createElement(
|
|
3113
3005
|
SubmitPDF,
|
|
3114
3006
|
{
|
|
3115
3007
|
pdfFile,
|
|
@@ -3129,7 +3021,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3129
3021
|
const [isValidateProgress, setIsValidateProgress] = useState14(false);
|
|
3130
3022
|
const [pdfFile, setPDFFile] = useState14(null);
|
|
3131
3023
|
const [pdfURL, setPDFURL] = useState14("");
|
|
3132
|
-
return !pdfFile ? /* @__PURE__ */
|
|
3024
|
+
return !pdfFile ? /* @__PURE__ */ React29.createElement(Dialog.Root, { defaultOpen: true, onOpenChange }, /* @__PURE__ */ React29.createElement(Dialog.Portal, null, /* @__PURE__ */ React29.createElement(Dialog.Overlay, null), /* @__PURE__ */ React29.createElement(
|
|
3133
3025
|
Dialog.Content,
|
|
3134
3026
|
{
|
|
3135
3027
|
css: {
|
|
@@ -3138,7 +3030,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3138
3030
|
p: "$10"
|
|
3139
3031
|
}
|
|
3140
3032
|
},
|
|
3141
|
-
/* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ React29.createElement(Flex, { direction: "column" }, /* @__PURE__ */ React29.createElement(PDFHeader, null), /* @__PURE__ */ React29.createElement(
|
|
3142
3034
|
DialogInputFile,
|
|
3143
3035
|
{
|
|
3144
3036
|
onChange: (target) => {
|
|
@@ -3148,14 +3040,14 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3148
3040
|
type: "file",
|
|
3149
3041
|
accept: ".pdf"
|
|
3150
3042
|
}
|
|
3151
|
-
), /* @__PURE__ */
|
|
3043
|
+
), /* @__PURE__ */ React29.createElement(
|
|
3152
3044
|
DialogRow,
|
|
3153
3045
|
{
|
|
3154
3046
|
css: {
|
|
3155
3047
|
m: "$10 0"
|
|
3156
3048
|
}
|
|
3157
3049
|
},
|
|
3158
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ React29.createElement(
|
|
3159
3051
|
HorizontalDivider,
|
|
3160
3052
|
{
|
|
3161
3053
|
css: {
|
|
@@ -3163,17 +3055,17 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3163
3055
|
}
|
|
3164
3056
|
}
|
|
3165
3057
|
),
|
|
3166
|
-
/* @__PURE__ */
|
|
3058
|
+
/* @__PURE__ */ React29.createElement(
|
|
3167
3059
|
Text,
|
|
3168
3060
|
{
|
|
3169
3061
|
variant: "tiny",
|
|
3170
3062
|
css: {
|
|
3171
|
-
color: "$
|
|
3063
|
+
color: "$on_surface_low"
|
|
3172
3064
|
}
|
|
3173
3065
|
},
|
|
3174
3066
|
"OR"
|
|
3175
3067
|
),
|
|
3176
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ React29.createElement(
|
|
3177
3069
|
HorizontalDivider,
|
|
3178
3070
|
{
|
|
3179
3071
|
css: {
|
|
@@ -3181,7 +3073,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3181
3073
|
}
|
|
3182
3074
|
}
|
|
3183
3075
|
)
|
|
3184
|
-
), /* @__PURE__ */
|
|
3076
|
+
), /* @__PURE__ */ React29.createElement(
|
|
3185
3077
|
Text,
|
|
3186
3078
|
{
|
|
3187
3079
|
variant: "sm",
|
|
@@ -3190,7 +3082,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3190
3082
|
}
|
|
3191
3083
|
},
|
|
3192
3084
|
"Import from URL"
|
|
3193
|
-
), /* @__PURE__ */
|
|
3085
|
+
), /* @__PURE__ */ React29.createElement(
|
|
3194
3086
|
Input,
|
|
3195
3087
|
{
|
|
3196
3088
|
css: { w: "100%", mb: "$10" },
|
|
@@ -3206,7 +3098,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3206
3098
|
type: "text",
|
|
3207
3099
|
error: !isPDFUrlValid
|
|
3208
3100
|
}
|
|
3209
|
-
), !isPDFUrlValid && /* @__PURE__ */
|
|
3101
|
+
), !isPDFUrlValid && /* @__PURE__ */ React29.createElement(PdfErrorView, { isPDFUrlValid }), /* @__PURE__ */ React29.createElement(PDFInfo, null), /* @__PURE__ */ React29.createElement(
|
|
3210
3102
|
SubmitPDF,
|
|
3211
3103
|
{
|
|
3212
3104
|
pdfFile,
|
|
@@ -3217,7 +3109,7 @@ function PDFFileOptions({ onOpenChange }) {
|
|
|
3217
3109
|
onOpenChange
|
|
3218
3110
|
}
|
|
3219
3111
|
))
|
|
3220
|
-
))) : /* @__PURE__ */
|
|
3112
|
+
))) : /* @__PURE__ */ React29.createElement(
|
|
3221
3113
|
UploadedFile,
|
|
3222
3114
|
{
|
|
3223
3115
|
pdfFile,
|
|
@@ -3252,7 +3144,7 @@ function ShareScreenOptions() {
|
|
|
3252
3144
|
});
|
|
3253
3145
|
};
|
|
3254
3146
|
const { toggleScreenShare } = useScreenShare3();
|
|
3255
|
-
return /* @__PURE__ */
|
|
3147
|
+
return /* @__PURE__ */ React30.createElement(Fragment4, null, /* @__PURE__ */ React30.createElement(Dropdown.Root, { open: openModals.has(MODALS2.SHARE), onOpenChange: (value) => updateState(MODALS2.SHARE, value) }, /* @__PURE__ */ React30.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "sharing_btn", disabled: amIScreenSharing }, /* @__PURE__ */ React30.createElement(ShareMenuIcon, { disabled: amIScreenSharing }, /* @__PURE__ */ React30.createElement(Tooltip, { title: "Share" }, /* @__PURE__ */ React30.createElement(Box, null, /* @__PURE__ */ React30.createElement(VerticalMenuIcon2, null))))), /* @__PURE__ */ React30.createElement(
|
|
3256
3148
|
Dropdown.Content,
|
|
3257
3149
|
{
|
|
3258
3150
|
sideOffset: 5,
|
|
@@ -3262,7 +3154,7 @@ function ShareScreenOptions() {
|
|
|
3262
3154
|
p: 0
|
|
3263
3155
|
}
|
|
3264
3156
|
},
|
|
3265
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ React30.createElement(
|
|
3266
3158
|
Dropdown.Item,
|
|
3267
3159
|
{
|
|
3268
3160
|
css: {
|
|
@@ -3277,10 +3169,10 @@ function ShareScreenOptions() {
|
|
|
3277
3169
|
}
|
|
3278
3170
|
}
|
|
3279
3171
|
},
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
/* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ React30.createElement(Text, { variant: "h6" }, "Start Sharing"),
|
|
3173
|
+
/* @__PURE__ */ React30.createElement(Text, { variant: "sm" }, "Choose what you want to share")
|
|
3282
3174
|
),
|
|
3283
|
-
/* @__PURE__ */
|
|
3175
|
+
/* @__PURE__ */ React30.createElement(
|
|
3284
3176
|
Dropdown.Item,
|
|
3285
3177
|
{
|
|
3286
3178
|
css: {
|
|
@@ -3295,7 +3187,7 @@ function ShareScreenOptions() {
|
|
|
3295
3187
|
}
|
|
3296
3188
|
}
|
|
3297
3189
|
},
|
|
3298
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ React30.createElement(
|
|
3299
3191
|
Flex,
|
|
3300
3192
|
{
|
|
3301
3193
|
direction: "column",
|
|
@@ -3304,7 +3196,7 @@ function ShareScreenOptions() {
|
|
|
3304
3196
|
gap: "$6"
|
|
3305
3197
|
}
|
|
3306
3198
|
},
|
|
3307
|
-
/* @__PURE__ */
|
|
3199
|
+
/* @__PURE__ */ React30.createElement(
|
|
3308
3200
|
IconButton,
|
|
3309
3201
|
{
|
|
3310
3202
|
as: "div",
|
|
@@ -3313,13 +3205,13 @@ function ShareScreenOptions() {
|
|
|
3313
3205
|
p: "$6",
|
|
3314
3206
|
display: "flex",
|
|
3315
3207
|
justifyContent: "center",
|
|
3316
|
-
border: "1px solid $
|
|
3208
|
+
border: "1px solid $border_bright",
|
|
3317
3209
|
r: "$2",
|
|
3318
|
-
bg: "$
|
|
3210
|
+
bg: "$surface_brighter",
|
|
3319
3211
|
pb: "0"
|
|
3320
3212
|
}
|
|
3321
3213
|
},
|
|
3322
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ React30.createElement(
|
|
3323
3215
|
ScreenShare,
|
|
3324
3216
|
{
|
|
3325
3217
|
width: "100%",
|
|
@@ -3331,19 +3223,19 @@ function ShareScreenOptions() {
|
|
|
3331
3223
|
}
|
|
3332
3224
|
)
|
|
3333
3225
|
),
|
|
3334
|
-
/* @__PURE__ */
|
|
3226
|
+
/* @__PURE__ */ React30.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React30.createElement(Text, { variant: "body2" }, "Share Screen"), /* @__PURE__ */ React30.createElement(
|
|
3335
3227
|
Text,
|
|
3336
3228
|
{
|
|
3337
3229
|
variant: "caption",
|
|
3338
3230
|
css: {
|
|
3339
|
-
c: "$
|
|
3231
|
+
c: "$on_surface_low",
|
|
3340
3232
|
textAlign: "center"
|
|
3341
3233
|
}
|
|
3342
3234
|
},
|
|
3343
3235
|
"Share your tab, window or your entire screen"
|
|
3344
3236
|
))
|
|
3345
3237
|
),
|
|
3346
|
-
/* @__PURE__ */
|
|
3238
|
+
/* @__PURE__ */ React30.createElement(
|
|
3347
3239
|
Flex,
|
|
3348
3240
|
{
|
|
3349
3241
|
direction: "column",
|
|
@@ -3352,7 +3244,7 @@ function ShareScreenOptions() {
|
|
|
3352
3244
|
gap: "$6"
|
|
3353
3245
|
}
|
|
3354
3246
|
},
|
|
3355
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ React30.createElement(
|
|
3356
3248
|
IconButton,
|
|
3357
3249
|
{
|
|
3358
3250
|
onClick: () => {
|
|
@@ -3363,13 +3255,13 @@ function ShareScreenOptions() {
|
|
|
3363
3255
|
p: "$6",
|
|
3364
3256
|
display: "flex",
|
|
3365
3257
|
justifyContent: "center",
|
|
3366
|
-
border: "$
|
|
3258
|
+
border: "$border_bright 1px solid",
|
|
3367
3259
|
r: "$2",
|
|
3368
|
-
bg: "$
|
|
3260
|
+
bg: "$surface_bright",
|
|
3369
3261
|
pb: "0"
|
|
3370
3262
|
}
|
|
3371
3263
|
},
|
|
3372
|
-
/* @__PURE__ */
|
|
3264
|
+
/* @__PURE__ */ React30.createElement(
|
|
3373
3265
|
PdfShare,
|
|
3374
3266
|
{
|
|
3375
3267
|
width: "100%",
|
|
@@ -3380,41 +3272,30 @@ function ShareScreenOptions() {
|
|
|
3380
3272
|
}
|
|
3381
3273
|
}
|
|
3382
3274
|
),
|
|
3383
|
-
/* @__PURE__ */
|
|
3275
|
+
/* @__PURE__ */ React30.createElement(
|
|
3384
3276
|
Flex,
|
|
3385
3277
|
{
|
|
3386
3278
|
direction: "row",
|
|
3279
|
+
align: "center",
|
|
3387
3280
|
css: {
|
|
3388
3281
|
position: "absolute",
|
|
3389
3282
|
top: "29%",
|
|
3390
3283
|
left: "54%",
|
|
3391
3284
|
padding: "$2 $4",
|
|
3392
3285
|
r: "$2",
|
|
3393
|
-
bg: "$
|
|
3394
|
-
zIndex: "2"
|
|
3286
|
+
bg: "$primary_bright",
|
|
3287
|
+
zIndex: "2",
|
|
3288
|
+
gap: "$2"
|
|
3395
3289
|
}
|
|
3396
3290
|
},
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
|
|
3399
|
-
{
|
|
3400
|
-
css: {
|
|
3401
|
-
w: "$10",
|
|
3402
|
-
h: "$8",
|
|
3403
|
-
"&:hover": {
|
|
3404
|
-
bg: "$transparent !important",
|
|
3405
|
-
border: "none"
|
|
3406
|
-
}
|
|
3407
|
-
}
|
|
3408
|
-
},
|
|
3409
|
-
/* @__PURE__ */ React31.createElement(StarIcon, null)
|
|
3410
|
-
),
|
|
3411
|
-
/* @__PURE__ */ React31.createElement(
|
|
3291
|
+
/* @__PURE__ */ React30.createElement(StarIcon, { height: 14, width: 14 }),
|
|
3292
|
+
/* @__PURE__ */ React30.createElement(
|
|
3412
3293
|
Text,
|
|
3413
3294
|
{
|
|
3414
3295
|
variant: "xs",
|
|
3415
3296
|
css: {
|
|
3416
3297
|
fontWeight: "$semiBold",
|
|
3417
|
-
c: "$
|
|
3298
|
+
c: "$on_primary_high",
|
|
3418
3299
|
pr: "$4"
|
|
3419
3300
|
}
|
|
3420
3301
|
},
|
|
@@ -3422,12 +3303,12 @@ function ShareScreenOptions() {
|
|
|
3422
3303
|
)
|
|
3423
3304
|
)
|
|
3424
3305
|
),
|
|
3425
|
-
/* @__PURE__ */
|
|
3306
|
+
/* @__PURE__ */ React30.createElement(Flex, { direction: "column", align: "center" }, /* @__PURE__ */ React30.createElement(Text, { variant: "body2" }, "Share PDF"), /* @__PURE__ */ React30.createElement(
|
|
3426
3307
|
Text,
|
|
3427
3308
|
{
|
|
3428
3309
|
variant: "caption",
|
|
3429
3310
|
css: {
|
|
3430
|
-
c: "$
|
|
3311
|
+
c: "$on_surface_low",
|
|
3431
3312
|
textAlign: "center"
|
|
3432
3313
|
}
|
|
3433
3314
|
},
|
|
@@ -3435,7 +3316,7 @@ function ShareScreenOptions() {
|
|
|
3435
3316
|
))
|
|
3436
3317
|
)
|
|
3437
3318
|
),
|
|
3438
|
-
/* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ React30.createElement(
|
|
3439
3320
|
Dropdown.Item,
|
|
3440
3321
|
{
|
|
3441
3322
|
css: {
|
|
@@ -3448,7 +3329,7 @@ function ShareScreenOptions() {
|
|
|
3448
3329
|
}
|
|
3449
3330
|
}
|
|
3450
3331
|
},
|
|
3451
|
-
/* @__PURE__ */
|
|
3332
|
+
/* @__PURE__ */ React30.createElement(
|
|
3452
3333
|
Button,
|
|
3453
3334
|
{
|
|
3454
3335
|
variant: "standard",
|
|
@@ -3465,19 +3346,19 @@ function ShareScreenOptions() {
|
|
|
3465
3346
|
"Cancel"
|
|
3466
3347
|
)
|
|
3467
3348
|
)
|
|
3468
|
-
)), openModals.has(MODALS2.PDF_SHARE) && /* @__PURE__ */
|
|
3349
|
+
)), openModals.has(MODALS2.PDF_SHARE) && /* @__PURE__ */ React30.createElement(PDFFileOptions, { onOpenChange: (value) => updateState(MODALS2.PDF_SHARE, value) }));
|
|
3469
3350
|
}
|
|
3470
3351
|
|
|
3471
3352
|
// src/Prebuilt/components/ScreenShare.jsx
|
|
3472
3353
|
var ScreenshareToggle = ({ css = {} }) => {
|
|
3473
|
-
const isAllowedToPublish = useHMSStore17(
|
|
3354
|
+
const isAllowedToPublish = useHMSStore17(selectIsAllowedToPublish2);
|
|
3474
3355
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
|
3475
3356
|
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare4();
|
|
3476
3357
|
const isVideoScreenshare = amIScreenSharing && !!video;
|
|
3477
3358
|
if (!isAllowedToPublish.screen || !isScreenshareSupported()) {
|
|
3478
3359
|
return null;
|
|
3479
3360
|
}
|
|
3480
|
-
return /* @__PURE__ */
|
|
3361
|
+
return /* @__PURE__ */ React31.createElement(Fragment5, null, /* @__PURE__ */ React31.createElement(Flex, { direction: "row" }, /* @__PURE__ */ React31.createElement(
|
|
3481
3362
|
ScreenShareButton,
|
|
3482
3363
|
{
|
|
3483
3364
|
variant: "standard",
|
|
@@ -3489,24 +3370,24 @@ var ScreenshareToggle = ({ css = {} }) => {
|
|
|
3489
3370
|
toggleScreenShare();
|
|
3490
3371
|
}
|
|
3491
3372
|
},
|
|
3492
|
-
/* @__PURE__ */
|
|
3493
|
-
), /* @__PURE__ */
|
|
3373
|
+
/* @__PURE__ */ React31.createElement(Tooltip, { title: `${!isVideoScreenshare ? "Start" : "Stop"} screen sharing` }, /* @__PURE__ */ React31.createElement(Box, null, /* @__PURE__ */ React31.createElement(ShareScreenIcon2, null)))
|
|
3374
|
+
), /* @__PURE__ */ React31.createElement(ShareScreenOptions, null)));
|
|
3494
3375
|
};
|
|
3495
3376
|
|
|
3496
3377
|
// src/Prebuilt/components/ScreenshareHintModal.jsx
|
|
3497
3378
|
init_define_process_env();
|
|
3498
|
-
import
|
|
3499
|
-
import { useHMSActions as
|
|
3379
|
+
import React32 from "react";
|
|
3380
|
+
import { useHMSActions as useHMSActions14 } from "@100mslive/react-sdk";
|
|
3500
3381
|
var ScreenShareHintModal = ({ onClose }) => {
|
|
3501
|
-
const hmsActions =
|
|
3502
|
-
return /* @__PURE__ */
|
|
3382
|
+
const hmsActions = useHMSActions14();
|
|
3383
|
+
return /* @__PURE__ */ React32.createElement(Dialog.Root, { defaultOpen: true, onOpenChange: (value) => !value && onClose() }, /* @__PURE__ */ React32.createElement(DialogContent, { title: "AudioOnly Screenshare" }, /* @__PURE__ */ React32.createElement(
|
|
3503
3384
|
"img",
|
|
3504
3385
|
{
|
|
3505
3386
|
src: "https://images.app.100ms.live/share-audio.png",
|
|
3506
3387
|
alt: "AudioOnly Screenshare instructions",
|
|
3507
3388
|
width: "100%"
|
|
3508
3389
|
}
|
|
3509
|
-
), /* @__PURE__ */
|
|
3390
|
+
), /* @__PURE__ */ React32.createElement(DialogRow, { justify: "end" }, /* @__PURE__ */ React32.createElement(
|
|
3510
3391
|
Button,
|
|
3511
3392
|
{
|
|
3512
3393
|
variant: "primary",
|
|
@@ -3525,7 +3406,7 @@ var ScreenShareHintModal = ({ onClose }) => {
|
|
|
3525
3406
|
|
|
3526
3407
|
// src/Prebuilt/components/Footer/ChatToggle.jsx
|
|
3527
3408
|
init_define_process_env();
|
|
3528
|
-
import
|
|
3409
|
+
import React33 from "react";
|
|
3529
3410
|
import { selectUnreadHMSMessagesCount, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
|
|
3530
3411
|
import { ChatIcon, ChatUnreadIcon } from "@100mslive/react-icons";
|
|
3531
3412
|
var ChatToggle = () => {
|
|
@@ -3536,12 +3417,12 @@ var ChatToggle = () => {
|
|
|
3536
3417
|
if (!isFeatureEnabled) {
|
|
3537
3418
|
return;
|
|
3538
3419
|
}
|
|
3539
|
-
return /* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ React33.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React33.createElement(IconButton_default, { onClick: toggleChat, active: !isChatOpen, "data-testid": "chat_btn" }, countUnreadMessages === 0 ? /* @__PURE__ */ React33.createElement(ChatIcon, null) : /* @__PURE__ */ React33.createElement(ChatUnreadIcon, { "data-testid": "chat_unread_btn" })));
|
|
3540
3421
|
};
|
|
3541
3422
|
|
|
3542
3423
|
// src/Prebuilt/components/Footer/ConferencingFooter.jsx
|
|
3543
|
-
var TranscriptionButton =
|
|
3544
|
-
var VirtualBackground =
|
|
3424
|
+
var TranscriptionButton = React34.lazy(() => import("./transcription-XYVVYRAS.js"));
|
|
3425
|
+
var VirtualBackground = React34.lazy(() => import("./VirtualBackground-R3JHARN5.js"));
|
|
3545
3426
|
var ScreenshareAudio = () => {
|
|
3546
3427
|
const {
|
|
3547
3428
|
amIScreenSharing,
|
|
@@ -3549,14 +3430,14 @@ var ScreenshareAudio = () => {
|
|
|
3549
3430
|
screenShareAudioTrackId: audio,
|
|
3550
3431
|
toggleScreenShare
|
|
3551
3432
|
} = useScreenShare5();
|
|
3552
|
-
const isAllowedToPublish = useHMSStore19(
|
|
3433
|
+
const isAllowedToPublish = useHMSStore19(selectIsAllowedToPublish3);
|
|
3553
3434
|
const isAudioScreenshare = amIScreenSharing && !video && !!audio;
|
|
3554
3435
|
const [showModal, setShowModal] = useState16(false);
|
|
3555
3436
|
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.AUDIO_ONLY_SCREENSHARE);
|
|
3556
3437
|
if (!isFeatureEnabled || !isAllowedToPublish.screen || !isScreenshareSupported()) {
|
|
3557
3438
|
return null;
|
|
3558
3439
|
}
|
|
3559
|
-
return /* @__PURE__ */
|
|
3440
|
+
return /* @__PURE__ */ React34.createElement(Fragment6, null, /* @__PURE__ */ React34.createElement(Tooltip, { title: `${!isAudioScreenshare ? "Start" : "Stop"} audio sharing`, key: "shareAudio" }, /* @__PURE__ */ React34.createElement(
|
|
3560
3441
|
IconButton_default,
|
|
3561
3442
|
{
|
|
3562
3443
|
active: !isAudioScreenshare,
|
|
@@ -3569,12 +3450,12 @@ var ScreenshareAudio = () => {
|
|
|
3569
3450
|
},
|
|
3570
3451
|
"data-testid": "screenshare_audio"
|
|
3571
3452
|
},
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
)), showModal && /* @__PURE__ */
|
|
3453
|
+
/* @__PURE__ */ React34.createElement(MusicIcon, null)
|
|
3454
|
+
)), showModal && /* @__PURE__ */ React34.createElement(ScreenShareHintModal, { onClose: () => setShowModal(false) }));
|
|
3574
3455
|
};
|
|
3575
3456
|
var ConferencingFooter = () => {
|
|
3576
3457
|
const isMobile = useMedia6(config.media.md);
|
|
3577
|
-
return /* @__PURE__ */
|
|
3458
|
+
return /* @__PURE__ */ React34.createElement(Footer.Root, null, /* @__PURE__ */ React34.createElement(Footer.Left, null, /* @__PURE__ */ React34.createElement(ScreenshareAudio, null), /* @__PURE__ */ React34.createElement(Suspense2, { fallback: "" }, /* @__PURE__ */ React34.createElement(VirtualBackground, null)), FeatureFlags.enableTranscription ? /* @__PURE__ */ React34.createElement(TranscriptionButton, null) : null, /* @__PURE__ */ React34.createElement(
|
|
3578
3459
|
Flex,
|
|
3579
3460
|
{
|
|
3580
3461
|
align: "center",
|
|
@@ -3586,16 +3467,16 @@ var ConferencingFooter = () => {
|
|
|
3586
3467
|
}
|
|
3587
3468
|
}
|
|
3588
3469
|
},
|
|
3589
|
-
isMobile && /* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
)), /* @__PURE__ */
|
|
3470
|
+
isMobile && /* @__PURE__ */ React34.createElement(EmojiReaction, null),
|
|
3471
|
+
/* @__PURE__ */ React34.createElement(MetaActions_default, { isMobile: true })
|
|
3472
|
+
)), /* @__PURE__ */ React34.createElement(Footer.Center, null, /* @__PURE__ */ React34.createElement(AudioVideoToggle, null), /* @__PURE__ */ React34.createElement(ScreenshareToggle, null), /* @__PURE__ */ React34.createElement(PIP, null), /* @__PURE__ */ React34.createElement(MoreSettings, null), /* @__PURE__ */ React34.createElement(Flex, { align: "center", css: { display: "none", "@md": { display: "flex" } } }, /* @__PURE__ */ React34.createElement(ChatToggle, null)), /* @__PURE__ */ React34.createElement(LeaveRoom, null)), /* @__PURE__ */ React34.createElement(Footer.Right, null, !isMobile && /* @__PURE__ */ React34.createElement(EmojiReaction, null), /* @__PURE__ */ React34.createElement(MetaActions_default, null), /* @__PURE__ */ React34.createElement(ChatToggle, null)));
|
|
3592
3473
|
};
|
|
3593
3474
|
|
|
3594
3475
|
// src/Prebuilt/components/Footer/StreamingFooter.jsx
|
|
3595
3476
|
init_define_process_env();
|
|
3596
|
-
import
|
|
3477
|
+
import React35 from "react";
|
|
3597
3478
|
var StreamingFooter = () => {
|
|
3598
|
-
return /* @__PURE__ */
|
|
3479
|
+
return /* @__PURE__ */ React35.createElement(
|
|
3599
3480
|
Footer.Root,
|
|
3600
3481
|
{
|
|
3601
3482
|
css: {
|
|
@@ -3605,7 +3486,7 @@ var StreamingFooter = () => {
|
|
|
3605
3486
|
}
|
|
3606
3487
|
}
|
|
3607
3488
|
},
|
|
3608
|
-
/* @__PURE__ */
|
|
3489
|
+
/* @__PURE__ */ React35.createElement(
|
|
3609
3490
|
Footer.Left,
|
|
3610
3491
|
{
|
|
3611
3492
|
css: {
|
|
@@ -3615,9 +3496,9 @@ var StreamingFooter = () => {
|
|
|
3615
3496
|
}
|
|
3616
3497
|
}
|
|
3617
3498
|
},
|
|
3618
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ React35.createElement(AudioVideoToggle, null)
|
|
3619
3500
|
),
|
|
3620
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ React35.createElement(
|
|
3621
3502
|
Footer.Center,
|
|
3622
3503
|
{
|
|
3623
3504
|
css: {
|
|
@@ -3626,9 +3507,9 @@ var StreamingFooter = () => {
|
|
|
3626
3507
|
}
|
|
3627
3508
|
}
|
|
3628
3509
|
},
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3631
|
-
/* @__PURE__ */
|
|
3510
|
+
/* @__PURE__ */ React35.createElement(ScreenshareToggle, { css: { "@sm": { display: "none" } } }),
|
|
3511
|
+
/* @__PURE__ */ React35.createElement(Box, { css: { "@md": { display: "none" } } }, /* @__PURE__ */ React35.createElement(PIP, null)),
|
|
3512
|
+
/* @__PURE__ */ React35.createElement(
|
|
3632
3513
|
Box,
|
|
3633
3514
|
{
|
|
3634
3515
|
css: {
|
|
@@ -3640,34 +3521,34 @@ var StreamingFooter = () => {
|
|
|
3640
3521
|
}
|
|
3641
3522
|
}
|
|
3642
3523
|
},
|
|
3643
|
-
/* @__PURE__ */
|
|
3524
|
+
/* @__PURE__ */ React35.createElement(StreamActions, null)
|
|
3644
3525
|
),
|
|
3645
|
-
/* @__PURE__ */
|
|
3646
|
-
/* @__PURE__ */
|
|
3647
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ React35.createElement(MoreSettings, null),
|
|
3527
|
+
/* @__PURE__ */ React35.createElement(Box, { css: { "@md": { display: "none" } } }, /* @__PURE__ */ React35.createElement(LeaveRoom, null)),
|
|
3528
|
+
/* @__PURE__ */ React35.createElement(Flex, { align: "center", css: { display: "none", "@md": { display: "flex" } } }, /* @__PURE__ */ React35.createElement(ChatToggle, null))
|
|
3648
3529
|
),
|
|
3649
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ React35.createElement(Footer.Right, null, /* @__PURE__ */ React35.createElement(EmojiReaction, null), /* @__PURE__ */ React35.createElement(MetaActions_default, null), /* @__PURE__ */ React35.createElement(ChatToggle, null))
|
|
3650
3531
|
);
|
|
3651
3532
|
};
|
|
3652
3533
|
|
|
3653
3534
|
// src/Prebuilt/components/Footer.jsx
|
|
3654
3535
|
var Footer2 = () => {
|
|
3655
|
-
return isStreamingKit() ? /* @__PURE__ */
|
|
3536
|
+
return isStreamingKit() ? /* @__PURE__ */ React36.createElement(StreamingFooter, null) : /* @__PURE__ */ React36.createElement(ConferencingFooter, null);
|
|
3656
3537
|
};
|
|
3657
3538
|
|
|
3658
3539
|
// src/Prebuilt/components/RoleChangeRequestModal.jsx
|
|
3659
3540
|
init_define_process_env();
|
|
3660
|
-
import
|
|
3661
|
-
import { selectRoleChangeRequest, useHMSActions as
|
|
3541
|
+
import React37 from "react";
|
|
3542
|
+
import { selectRoleChangeRequest, useHMSActions as useHMSActions15, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
|
|
3662
3543
|
var RoleChangeRequestModal = () => {
|
|
3663
3544
|
var _a, _b;
|
|
3664
|
-
const hmsActions =
|
|
3545
|
+
const hmsActions = useHMSActions15();
|
|
3665
3546
|
const isHeadless = useIsHeadless();
|
|
3666
3547
|
const roleChangeRequest = useHMSStore20(selectRoleChangeRequest);
|
|
3667
3548
|
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role) || isHeadless) {
|
|
3668
3549
|
return null;
|
|
3669
3550
|
}
|
|
3670
|
-
return /* @__PURE__ */
|
|
3551
|
+
return /* @__PURE__ */ React37.createElement(
|
|
3671
3552
|
RequestDialog,
|
|
3672
3553
|
{
|
|
3673
3554
|
title: "Role Change Request",
|
|
@@ -3690,9 +3571,9 @@ var Conference = () => {
|
|
|
3690
3571
|
const roomState = useHMSStore21(selectRoomState);
|
|
3691
3572
|
const prevState = usePrevious(roomState);
|
|
3692
3573
|
const isConnectedToRoom = useHMSStore21(selectIsConnectedToRoom2);
|
|
3693
|
-
const hmsActions =
|
|
3574
|
+
const hmsActions = useHMSActions16();
|
|
3694
3575
|
const [hideControls, setHideControls] = useState17(false);
|
|
3695
|
-
const dropdownList = useHMSStore21(
|
|
3576
|
+
const dropdownList = useHMSStore21(selectAppData3(APP_DATA.dropdownList));
|
|
3696
3577
|
const skipPreview = useSkipPreview();
|
|
3697
3578
|
const { showPreview } = useHMSPrebuiltContext();
|
|
3698
3579
|
const authTokenInAppData = useAuthToken();
|
|
@@ -3700,6 +3581,7 @@ var Conference = () => {
|
|
|
3700
3581
|
const footerRef = useRef7();
|
|
3701
3582
|
const dropdownListRef = useRef7();
|
|
3702
3583
|
const performAutoHide = hideControls && (isAndroid || isIOS || isIPadOS);
|
|
3584
|
+
const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
|
3703
3585
|
const toggleControls = () => {
|
|
3704
3586
|
var _a2;
|
|
3705
3587
|
if (((_a2 = dropdownListRef.current) == null ? void 0 : _a2.length) === 0) {
|
|
@@ -3756,9 +3638,12 @@ var Conference = () => {
|
|
|
3756
3638
|
}
|
|
3757
3639
|
}, [isHeadless, hmsActions]);
|
|
3758
3640
|
if (!isConnectedToRoom) {
|
|
3759
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ React38.createElement(FullPageProgress_default, { loadingText: "Joining..." });
|
|
3642
|
+
}
|
|
3643
|
+
if (isHLSStarted) {
|
|
3644
|
+
return /* @__PURE__ */ React38.createElement(FullPageProgress_default, { loadingText: "Starting live stream..." });
|
|
3760
3645
|
}
|
|
3761
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ React38.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !isHeadless && /* @__PURE__ */ React38.createElement(
|
|
3762
3647
|
Box,
|
|
3763
3648
|
{
|
|
3764
3649
|
ref: headerRef,
|
|
@@ -3772,8 +3657,8 @@ var Conference = () => {
|
|
|
3772
3657
|
},
|
|
3773
3658
|
"data-testid": "header"
|
|
3774
3659
|
},
|
|
3775
|
-
/* @__PURE__ */
|
|
3776
|
-
), /* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ React38.createElement(Header, null)
|
|
3661
|
+
), /* @__PURE__ */ React38.createElement(
|
|
3777
3662
|
Box,
|
|
3778
3663
|
{
|
|
3779
3664
|
css: {
|
|
@@ -3786,8 +3671,8 @@ var Conference = () => {
|
|
|
3786
3671
|
"data-testid": "conferencing",
|
|
3787
3672
|
onClick: toggleControls
|
|
3788
3673
|
},
|
|
3789
|
-
/* @__PURE__ */
|
|
3790
|
-
), !isHeadless && /* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ React38.createElement(ConferenceMainView, null)
|
|
3675
|
+
), !isHeadless && /* @__PURE__ */ React38.createElement(
|
|
3791
3676
|
Box,
|
|
3792
3677
|
{
|
|
3793
3678
|
ref: footerRef,
|
|
@@ -3802,11 +3687,11 @@ var Conference = () => {
|
|
|
3802
3687
|
},
|
|
3803
3688
|
"data-testid": "footer"
|
|
3804
3689
|
},
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
-
), /* @__PURE__ */
|
|
3690
|
+
/* @__PURE__ */ React38.createElement(Footer2, null)
|
|
3691
|
+
), /* @__PURE__ */ React38.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ React38.createElement(HLSFailureModal, null));
|
|
3807
3692
|
};
|
|
3808
3693
|
var conference_default = Conference;
|
|
3809
3694
|
export {
|
|
3810
3695
|
conference_default as default
|
|
3811
3696
|
};
|
|
3812
|
-
//# sourceMappingURL=conference-
|
|
3697
|
+
//# sourceMappingURL=conference-IKSFGLVK.js.map
|