@100mslive/roomkit-react 0.3.24-alpha.0 → 0.3.24-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Theme/ThemeProvider.d.ts +1 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +34109 -37488
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +36389 -73
- package/dist/index.js.map +4 -4
- package/dist/meta.cjs.json +5568 -5617
- package/dist/meta.esbuild.json +6032 -8744
- package/package.json +7 -7
- package/src/Prebuilt/App.tsx +3 -6
- package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +11 -4
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +3 -3
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +3 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -2
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +30 -43
- package/src/Prebuilt/layouts/HLSView.jsx +2 -3
- package/src/Prebuilt/layouts/SidePane.tsx +6 -12
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +64 -69
- package/src/Theme/ThemeProvider.tsx +9 -3
- package/dist/ConferenceScreen-CLPW3BGP.css +0 -2780
- package/dist/ConferenceScreen-CLPW3BGP.css.map +0 -7
- package/dist/ConferenceScreen-M6RBPTAJ.js +0 -1774
- package/dist/ConferenceScreen-M6RBPTAJ.js.map +0 -7
- package/dist/EmbedView-DDSO7ZCV.js +0 -17
- package/dist/EmbedView-DDSO7ZCV.js.map +0 -7
- package/dist/EmbedView-HGIUZHKA.css +0 -2780
- package/dist/EmbedView-HGIUZHKA.css.map +0 -7
- package/dist/EmojiReaction-23JDKJD4.js +0 -11
- package/dist/EmojiReaction-23JDKJD4.js.map +0 -7
- package/dist/HLSView-OW77EAAO.css +0 -2780
- package/dist/HLSView-OW77EAAO.css.map +0 -7
- package/dist/HLSView-Q6GEB3UM.js +0 -1666
- package/dist/HLSView-Q6GEB3UM.js.map +0 -7
- package/dist/LeaveScreen-BYTE73MT.js +0 -556
- package/dist/LeaveScreen-BYTE73MT.js.map +0 -7
- package/dist/LeaveScreen-P7AATEIF.css +0 -2780
- package/dist/LeaveScreen-P7AATEIF.css.map +0 -7
- package/dist/MoreSettings-LV5X2U6K.css +0 -2780
- package/dist/MoreSettings-LV5X2U6K.css.map +0 -7
- package/dist/MoreSettings-WSHMMNOC.js +0 -16
- package/dist/MoreSettings-WSHMMNOC.js.map +0 -7
- package/dist/PDFView-RIPRIIH6.css +0 -2780
- package/dist/PDFView-RIPRIIH6.css.map +0 -7
- package/dist/PDFView-ZFSG2ESE.js +0 -84
- package/dist/PDFView-ZFSG2ESE.js.map +0 -7
- package/dist/Polls-QWW5LTTB.js +0 -1584
- package/dist/Polls-QWW5LTTB.js.map +0 -7
- package/dist/Polls-ULYGUPPF.css +0 -2780
- package/dist/Polls-ULYGUPPF.css.map +0 -7
- package/dist/RaiseHand-K7NFLH7H.js +0 -10
- package/dist/RaiseHand-K7NFLH7H.js.map +0 -7
- package/dist/RoleProminence-235AFT7F.js +0 -116
- package/dist/RoleProminence-235AFT7F.js.map +0 -7
- package/dist/RoleProminence-6XN3POS5.css +0 -2780
- package/dist/RoleProminence-6XN3POS5.css.map +0 -7
- package/dist/RoomDetailsPane-O5TFMTPI.css +0 -2780
- package/dist/RoomDetailsPane-O5TFMTPI.css.map +0 -7
- package/dist/RoomDetailsPane-RF3D3TDR.js +0 -53
- package/dist/RoomDetailsPane-RF3D3TDR.js.map +0 -7
- package/dist/ScreenshareLayout-KNEB3AJJ.css +0 -2780
- package/dist/ScreenshareLayout-KNEB3AJJ.css.map +0 -7
- package/dist/ScreenshareLayout-PSQMS3NC.js +0 -358
- package/dist/ScreenshareLayout-PSQMS3NC.js.map +0 -7
- package/dist/SidePaneTabs-I6DECE5R.css +0 -2780
- package/dist/SidePaneTabs-I6DECE5R.css.map +0 -7
- package/dist/SidePaneTabs-NXHBI2JB.js +0 -1354
- package/dist/SidePaneTabs-NXHBI2JB.js.map +0 -7
- package/dist/VBPicker-2CQ3IIO7.js +0 -322
- package/dist/VBPicker-2CQ3IIO7.js.map +0 -7
- package/dist/VBPicker-DCNYGO23.css +0 -2780
- package/dist/VBPicker-DCNYGO23.css.map +0 -7
- package/dist/WaitingView-NZIUOXBI.js +0 -10
- package/dist/WaitingView-NZIUOXBI.js.map +0 -7
- package/dist/WhiteboardLayout-4YLFM3EY.js +0 -96
- package/dist/WhiteboardLayout-4YLFM3EY.js.map +0 -7
- package/dist/WhiteboardLayout-JUOBDFKY.css +0 -2780
- package/dist/WhiteboardLayout-JUOBDFKY.css.map +0 -7
- package/dist/chunk-3C7IESSI.js +0 -254
- package/dist/chunk-3C7IESSI.js.map +0 -7
- package/dist/chunk-7FD3VT6Q.js +0 -114
- package/dist/chunk-7FD3VT6Q.js.map +0 -7
- package/dist/chunk-AHI4HCY3.js +0 -62
- package/dist/chunk-AHI4HCY3.js.map +0 -7
- package/dist/chunk-BGSYLCVD.js +0 -6337
- package/dist/chunk-BGSYLCVD.js.map +0 -7
- package/dist/chunk-DANANDDE.js +0 -418
- package/dist/chunk-DANANDDE.js.map +0 -7
- package/dist/chunk-ETRNLEWQ.js +0 -2658
- package/dist/chunk-ETRNLEWQ.js.map +0 -7
- package/dist/chunk-EWPHJFZJ.js +0 -487
- package/dist/chunk-EWPHJFZJ.js.map +0 -7
- package/dist/chunk-F63YJBI4.js +0 -98
- package/dist/chunk-F63YJBI4.js.map +0 -7
- package/dist/chunk-GLAJUP3O.js +0 -576
- package/dist/chunk-GLAJUP3O.js.map +0 -7
- package/dist/chunk-GOXRTCTY.js +0 -90
- package/dist/chunk-GOXRTCTY.js.map +0 -7
- package/dist/chunk-HMCBZI3A.js +0 -59
- package/dist/chunk-HMCBZI3A.js.map +0 -7
- package/dist/chunk-HVYTC3PX.js +0 -171
- package/dist/chunk-HVYTC3PX.js.map +0 -7
- package/dist/chunk-LJVP6AWF.js +0 -262
- package/dist/chunk-LJVP6AWF.js.map +0 -7
- package/dist/chunk-LXJGCRKM.js +0 -30
- package/dist/chunk-LXJGCRKM.js.map +0 -7
- package/dist/chunk-MG3UGW66.js +0 -16800
- package/dist/chunk-MG3UGW66.js.map +0 -7
- package/dist/chunk-MUKUP7JU.js +0 -161
- package/dist/chunk-MUKUP7JU.js.map +0 -7
- package/dist/chunk-OV6MVDCL.js +0 -41
- package/dist/chunk-OV6MVDCL.js.map +0 -7
- package/dist/chunk-P6NV2XO4.js +0 -178
- package/dist/chunk-P6NV2XO4.js.map +0 -7
- package/dist/chunk-REL3HBSD.js +0 -71
- package/dist/chunk-REL3HBSD.js.map +0 -7
- package/dist/chunk-U4SQBXPZ.js +0 -830
- package/dist/chunk-U4SQBXPZ.js.map +0 -7
- package/dist/chunk-YEL5ZTFU.js +0 -136
- package/dist/chunk-YEL5ZTFU.js.map +0 -7
package/dist/chunk-LJVP6AWF.js
DELETED
@@ -1,262 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
LiveStatus,
|
3
|
-
RecordingPauseStatus,
|
4
|
-
RecordingStatus,
|
5
|
-
StreamActions
|
6
|
-
} from "./chunk-3C7IESSI.js";
|
7
|
-
import {
|
8
|
-
HorizontalDivider,
|
9
|
-
Label,
|
10
|
-
Logo,
|
11
|
-
Sheet,
|
12
|
-
SpeakerTag,
|
13
|
-
useSheetToggle,
|
14
|
-
useSidepaneToggle
|
15
|
-
} from "./chunk-MG3UGW66.js";
|
16
|
-
import {
|
17
|
-
Text
|
18
|
-
} from "./chunk-MUKUP7JU.js";
|
19
|
-
import {
|
20
|
-
ToastManager
|
21
|
-
} from "./chunk-DANANDDE.js";
|
22
|
-
import {
|
23
|
-
Box,
|
24
|
-
Flex
|
25
|
-
} from "./chunk-GOXRTCTY.js";
|
26
|
-
import {
|
27
|
-
IconButton_default,
|
28
|
-
useRoomLayoutHeader
|
29
|
-
} from "./chunk-BGSYLCVD.js";
|
30
|
-
import {
|
31
|
-
SHEET_OPTIONS,
|
32
|
-
SIDE_PANE_OPTIONS,
|
33
|
-
__async,
|
34
|
-
config,
|
35
|
-
init_define_process_env
|
36
|
-
} from "./chunk-GLAJUP3O.js";
|
37
|
-
|
38
|
-
// src/Prebuilt/components/Header/Header.tsx
|
39
|
-
init_define_process_env();
|
40
|
-
import React3 from "react";
|
41
|
-
import { useMedia as useMedia2 } from "react-use";
|
42
|
-
import { HMSRoomState, selectRoomState, useHMSStore as useHMSStore2 } from "@100mslive/react-sdk";
|
43
|
-
|
44
|
-
// src/Prebuilt/components/Header/RoomDetailsHeader.tsx
|
45
|
-
init_define_process_env();
|
46
|
-
import React from "react";
|
47
|
-
import { useMedia } from "react-use";
|
48
|
-
import { ChevronRightIcon } from "@100mslive/react-icons";
|
49
|
-
var RoomDetailsHeader = () => {
|
50
|
-
const { title, description } = useRoomLayoutHeader();
|
51
|
-
const isMobile = useMedia(config.media.md);
|
52
|
-
const clipLength = 30;
|
53
|
-
const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);
|
54
|
-
const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);
|
55
|
-
if (!title && !description || isMobile && !title) {
|
56
|
-
return null;
|
57
|
-
}
|
58
|
-
return /* @__PURE__ */ React.createElement(Flex, { direction: isMobile ? "row" : "column", css: { ml: "$8", alignItems: isMobile ? "center" : "start" } }, /* @__PURE__ */ React.createElement(Text, { variant: "sm", css: { c: "$on_surface_high", fontWeight: "$semiBold" } }, title), !isMobile && /* @__PURE__ */ React.createElement(Flex, { align: "end", css: { color: "$on_surface_high" } }, /* @__PURE__ */ React.createElement(Text, { variant: "xs", css: { c: "$on_surface_medium" } }, description.slice(0, clipLength)), description.length > clipLength ? /* @__PURE__ */ React.createElement(
|
59
|
-
"span",
|
60
|
-
{
|
61
|
-
style: { fontWeight: "600", fontSize: "12px", cursor: "pointer", lineHeight: "1rem" },
|
62
|
-
onClick: toggleDetailsPane
|
63
|
-
},
|
64
|
-
"\xA0...more"
|
65
|
-
) : null), isMobile && description ? /* @__PURE__ */ React.createElement(Flex, { css: { color: "$on_surface_medium" } }, /* @__PURE__ */ React.createElement(ChevronRightIcon, { height: 16, width: 16, onClick: toggleDetailsSheet })) : null);
|
66
|
-
};
|
67
|
-
|
68
|
-
// src/Prebuilt/components/Header/common.jsx
|
69
|
-
init_define_process_env();
|
70
|
-
import React2 from "react";
|
71
|
-
import {
|
72
|
-
DeviceType,
|
73
|
-
getAudioDeviceCategory,
|
74
|
-
HMSAudioDeviceCategory,
|
75
|
-
selectIsLocalVideoEnabled,
|
76
|
-
selectLocalVideoTrackID,
|
77
|
-
selectVideoTrackByID,
|
78
|
-
useDevices,
|
79
|
-
useHMSActions,
|
80
|
-
useHMSStore
|
81
|
-
} from "@100mslive/react-sdk";
|
82
|
-
import {
|
83
|
-
BluetoothIcon,
|
84
|
-
CameraFlipIcon,
|
85
|
-
CheckIcon,
|
86
|
-
CrossIcon,
|
87
|
-
HeadphonesIcon,
|
88
|
-
SpeakerIcon,
|
89
|
-
TelePhoneIcon
|
90
|
-
} from "@100mslive/react-icons";
|
91
|
-
var CamaraFlipActions = () => {
|
92
|
-
const actions = useHMSActions();
|
93
|
-
const { allDevices } = useDevices();
|
94
|
-
const { videoInput } = allDevices;
|
95
|
-
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
96
|
-
const videoTrackId = useHMSStore(selectLocalVideoTrackID);
|
97
|
-
const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));
|
98
|
-
if (!videoInput || !(videoInput == null ? void 0 : videoInput.length) || !(localVideoTrack == null ? void 0 : localVideoTrack.facingMode)) {
|
99
|
-
return null;
|
100
|
-
}
|
101
|
-
return /* @__PURE__ */ React2.createElement(Box, null, /* @__PURE__ */ React2.createElement(
|
102
|
-
IconButton_default,
|
103
|
-
{
|
104
|
-
disabled: !isVideoOn,
|
105
|
-
onClick: () => __async(void 0, null, function* () {
|
106
|
-
try {
|
107
|
-
yield actions.switchCamera();
|
108
|
-
} catch (e) {
|
109
|
-
ToastManager.addToast({
|
110
|
-
title: `Error while flipping camera ${e.message || ""}`,
|
111
|
-
variant: "error"
|
112
|
-
});
|
113
|
-
}
|
114
|
-
})
|
115
|
-
},
|
116
|
-
/* @__PURE__ */ React2.createElement(CameraFlipIcon, null)
|
117
|
-
));
|
118
|
-
};
|
119
|
-
var AudioActions = () => {
|
120
|
-
const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();
|
121
|
-
const shouldShowAudioOutput = "setSinkId" in HTMLMediaElement.prototype;
|
122
|
-
const { audioInput, audioOutput } = allDevices;
|
123
|
-
let availableAudioDevices = audioInput;
|
124
|
-
let selectedAudio = selectedDeviceIDs.audioInput;
|
125
|
-
if (shouldShowAudioOutput) {
|
126
|
-
availableAudioDevices = audioOutput;
|
127
|
-
selectedAudio = selectedDeviceIDs.audioOutput;
|
128
|
-
}
|
129
|
-
const hmsActions = useHMSActions();
|
130
|
-
const audioFiltered = availableAudioDevices == null ? void 0 : availableAudioDevices.find((item) => !!item.label);
|
131
|
-
const currentSelection = availableAudioDevices == null ? void 0 : availableAudioDevices.find((item) => item.deviceId === selectedAudio);
|
132
|
-
if (!audioFiltered) {
|
133
|
-
return null;
|
134
|
-
}
|
135
|
-
const deviceCategory = getAudioDeviceCategory(currentSelection == null ? void 0 : currentSelection.label);
|
136
|
-
let AudioIcon = /* @__PURE__ */ React2.createElement(SpeakerIcon, null);
|
137
|
-
if (deviceCategory === HMSAudioDeviceCategory.BLUETOOTH) {
|
138
|
-
AudioIcon = /* @__PURE__ */ React2.createElement(BluetoothIcon, null);
|
139
|
-
} else if (deviceCategory === HMSAudioDeviceCategory.WIRED) {
|
140
|
-
AudioIcon = /* @__PURE__ */ React2.createElement(HeadphonesIcon, null);
|
141
|
-
} else if (deviceCategory === HMSAudioDeviceCategory.EARPIECE) {
|
142
|
-
AudioIcon = /* @__PURE__ */ React2.createElement(TelePhoneIcon, null);
|
143
|
-
}
|
144
|
-
return /* @__PURE__ */ React2.createElement(
|
145
|
-
AudioSelectionSheet,
|
146
|
-
{
|
147
|
-
audioDevices: availableAudioDevices,
|
148
|
-
audioSelected: selectedAudio,
|
149
|
-
onChange: (deviceId) => __async(void 0, null, function* () {
|
150
|
-
try {
|
151
|
-
yield updateDevice({
|
152
|
-
deviceId,
|
153
|
-
deviceType: shouldShowAudioOutput ? DeviceType.audioOutput : DeviceType.audioInput
|
154
|
-
});
|
155
|
-
} catch (e) {
|
156
|
-
ToastManager.addToast({
|
157
|
-
title: `Error while changing audio device ${e.message || ""}`,
|
158
|
-
variant: "error"
|
159
|
-
});
|
160
|
-
}
|
161
|
-
})
|
162
|
-
},
|
163
|
-
/* @__PURE__ */ React2.createElement(
|
164
|
-
Box,
|
165
|
-
{
|
166
|
-
onClick: () => __async(void 0, null, function* () {
|
167
|
-
yield hmsActions.refreshDevices();
|
168
|
-
})
|
169
|
-
},
|
170
|
-
/* @__PURE__ */ React2.createElement(IconButton_default, null, AudioIcon)
|
171
|
-
)
|
172
|
-
);
|
173
|
-
};
|
174
|
-
var AudioSelectionSheet = ({ audioDevices, audioSelected, onChange, children }) => {
|
175
|
-
return /* @__PURE__ */ React2.createElement(Sheet.Root, null, /* @__PURE__ */ React2.createElement(Sheet.Trigger, { asChild: true }, children), /* @__PURE__ */ React2.createElement(Sheet.Content, null, /* @__PURE__ */ React2.createElement(Sheet.Title, { css: { py: "$10", px: "$8", alignItems: "center" } }, /* @__PURE__ */ React2.createElement(Flex, { direction: "row", justify: "between", css: { w: "100%" } }, /* @__PURE__ */ React2.createElement(Text, { variant: "h6", css: { display: "flex" } }, "Audio"), /* @__PURE__ */ React2.createElement(Sheet.Close, null, /* @__PURE__ */ React2.createElement(IconButton_default, { as: "div", "data-testid": "dialog_cross_icon" }, /* @__PURE__ */ React2.createElement(CrossIcon, null))))), /* @__PURE__ */ React2.createElement(HorizontalDivider, null), /* @__PURE__ */ React2.createElement(
|
176
|
-
Flex,
|
177
|
-
{
|
178
|
-
direction: "column",
|
179
|
-
css: {
|
180
|
-
px: "$8",
|
181
|
-
maxHeight: "80vh",
|
182
|
-
overflowY: "auto"
|
183
|
-
}
|
184
|
-
},
|
185
|
-
audioDevices.map((audioDevice) => {
|
186
|
-
return /* @__PURE__ */ React2.createElement(
|
187
|
-
SelectWithLabel,
|
188
|
-
{
|
189
|
-
key: audioDevice.deviceId,
|
190
|
-
label: audioDevice.label,
|
191
|
-
id: audioDevice.deviceId,
|
192
|
-
checked: audioDevice.deviceId === audioSelected,
|
193
|
-
onChange: () => onChange(audioDevice.deviceId)
|
194
|
-
}
|
195
|
-
);
|
196
|
-
})
|
197
|
-
)));
|
198
|
-
};
|
199
|
-
var SelectWithLabel = ({ label, icon = /* @__PURE__ */ React2.createElement(React2.Fragment, null), checked, id, onChange }) => {
|
200
|
-
return /* @__PURE__ */ React2.createElement(
|
201
|
-
Flex,
|
202
|
-
{
|
203
|
-
align: "center",
|
204
|
-
css: {
|
205
|
-
my: "$2",
|
206
|
-
py: "$8",
|
207
|
-
w: "100%",
|
208
|
-
borderBottom: "1px solid $border_default"
|
209
|
-
},
|
210
|
-
onClick: onChange
|
211
|
-
},
|
212
|
-
/* @__PURE__ */ React2.createElement(
|
213
|
-
Label,
|
214
|
-
{
|
215
|
-
htmlFor: id,
|
216
|
-
css: {
|
217
|
-
fontSize: "$md",
|
218
|
-
fontWeight: "$semiBold",
|
219
|
-
color: "$on_surface_high",
|
220
|
-
cursor: "pointer",
|
221
|
-
display: "flex",
|
222
|
-
alignItems: "center",
|
223
|
-
gap: "$8",
|
224
|
-
flex: "1 1 0"
|
225
|
-
}
|
226
|
-
},
|
227
|
-
icon,
|
228
|
-
label
|
229
|
-
),
|
230
|
-
checked && /* @__PURE__ */ React2.createElement(CheckIcon, { width: 24, height: 24 })
|
231
|
-
);
|
232
|
-
};
|
233
|
-
|
234
|
-
// src/Prebuilt/components/Header/Header.tsx
|
235
|
-
var Header = () => {
|
236
|
-
const roomState = useHMSStore2(selectRoomState);
|
237
|
-
const isMobile = useMedia2(config.media.md);
|
238
|
-
if (roomState !== HMSRoomState.Connected) {
|
239
|
-
return /* @__PURE__ */ React3.createElement(React3.Fragment, null);
|
240
|
-
}
|
241
|
-
return /* @__PURE__ */ React3.createElement(Flex, { justify: "between", align: "center", css: { position: "relative", height: "100%" } }, /* @__PURE__ */ React3.createElement(Flex, { align: "center", gap: "2", css: { position: "absolute", left: "$10" } }, /* @__PURE__ */ React3.createElement(Logo, null), /* @__PURE__ */ React3.createElement(RoomDetailsHeader, null), /* @__PURE__ */ React3.createElement(SpeakerTag, null), isMobile && /* @__PURE__ */ React3.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React3.createElement(LiveStatus, null), /* @__PURE__ */ React3.createElement(RecordingStatus, null), /* @__PURE__ */ React3.createElement(RecordingPauseStatus, null))), /* @__PURE__ */ React3.createElement(
|
242
|
-
Flex,
|
243
|
-
{
|
244
|
-
align: "center",
|
245
|
-
css: {
|
246
|
-
position: "absolute",
|
247
|
-
right: "$10",
|
248
|
-
gap: "$4"
|
249
|
-
}
|
250
|
-
},
|
251
|
-
/* @__PURE__ */ React3.createElement(StreamActions, null),
|
252
|
-
isMobile ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(CamaraFlipActions, null), /* @__PURE__ */ React3.createElement(AudioActions, null)) : null
|
253
|
-
));
|
254
|
-
};
|
255
|
-
|
256
|
-
// src/Prebuilt/components/Header/index.tsx
|
257
|
-
init_define_process_env();
|
258
|
-
|
259
|
-
export {
|
260
|
-
Header
|
261
|
-
};
|
262
|
-
//# sourceMappingURL=chunk-LJVP6AWF.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/Header/Header.tsx", "../src/Prebuilt/components/Header/RoomDetailsHeader.tsx", "../src/Prebuilt/components/Header/common.jsx", "../src/Prebuilt/components/Header/index.tsx"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSRoomState, selectRoomState, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Flex } from '../../..';\n// @ts-ignore: No implicit any\nimport { Logo, SpeakerTag } from './HeaderComponents';\n// @ts-ignore: No implicit any\nimport { RoomDetailsHeader } from './RoomDetailsHeader';\nimport { LiveStatus, RecordingPauseStatus, RecordingStatus, StreamActions } from './StreamActions';\n// @ts-ignore: No implicit any\nimport { AudioActions, CamaraFlipActions } from './common';\n\nexport const Header = () => {\n const roomState = useHMSStore(selectRoomState);\n const isMobile = useMedia(cssConfig.media.md);\n // Header should be present only inside the call - not in preview, leave room states\n if (roomState !== HMSRoomState.Connected) {\n return <></>;\n }\n return (\n <Flex justify=\"between\" align=\"center\" css={{ position: 'relative', height: '100%' }}>\n <Flex align=\"center\" gap=\"2\" css={{ position: 'absolute', left: '$10' }}>\n <Logo />\n <RoomDetailsHeader />\n <SpeakerTag />\n {isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <LiveStatus />\n <RecordingStatus />\n <RecordingPauseStatus />\n </Flex>\n )}\n </Flex>\n <Flex\n align=\"center\"\n css={{\n position: 'absolute',\n right: '$10',\n gap: '$4',\n }}\n >\n <StreamActions />\n {isMobile ? (\n <>\n <CamaraFlipActions />\n <AudioActions />\n </>\n ) : null}\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { ChevronRightIcon } from '@100mslive/react-icons';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { useRoomLayoutHeader } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSheetToggle } from '../AppData/useSheet';\n// @ts-ignore\nimport { useSidepaneToggle } from '../AppData/useSidepane';\nimport { SHEET_OPTIONS, SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const RoomDetailsHeader = () => {\n const { title, description } = useRoomLayoutHeader();\n const isMobile = useMedia(cssConfig.media.md);\n const clipLength = 30;\n const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);\n const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);\n\n if ((!title && !description) || (isMobile && !title)) {\n return null;\n }\n\n return (\n <Flex direction={isMobile ? 'row' : 'column'} css={{ ml: '$8', alignItems: isMobile ? 'center' : 'start' }}>\n <Text variant=\"sm\" css={{ c: '$on_surface_high', fontWeight: '$semiBold' }}>\n {title}\n </Text>\n {!isMobile && (\n <Flex align=\"end\" css={{ color: '$on_surface_high' }}>\n <Text variant=\"xs\" css={{ c: '$on_surface_medium' }}>\n {description.slice(0, clipLength)}\n </Text>\n {description.length > clipLength ? (\n <span\n style={{ fontWeight: '600', fontSize: '12px', cursor: 'pointer', lineHeight: '1rem' }}\n onClick={toggleDetailsPane}\n >\n ...more\n </span>\n ) : null}\n </Flex>\n )}\n {isMobile && description ? (\n <Flex css={{ color: '$on_surface_medium' }}>\n <ChevronRightIcon height={16} width={16} onClick={toggleDetailsSheet} />\n </Flex>\n ) : null}\n </Flex>\n );\n};\n", "import React from 'react';\nimport {\n DeviceType,\n getAudioDeviceCategory,\n HMSAudioDeviceCategory,\n selectIsLocalVideoEnabled,\n selectLocalVideoTrackID,\n selectVideoTrackByID,\n useDevices,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport {\n BluetoothIcon,\n CameraFlipIcon,\n CheckIcon,\n CrossIcon,\n HeadphonesIcon,\n SpeakerIcon,\n TelePhoneIcon,\n} from '@100mslive/react-icons';\nimport { HorizontalDivider } from '../../../Divider';\nimport { Label } from '../../../Label';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport IconButton from '../../IconButton';\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const CamaraFlipActions = () => {\n const actions = useHMSActions();\n const { allDevices } = useDevices();\n const { videoInput } = allDevices;\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));\n if (!videoInput || !videoInput?.length || !localVideoTrack?.facingMode) {\n return null;\n }\n return (\n <Box>\n <IconButton\n disabled={!isVideoOn}\n onClick={async () => {\n try {\n await actions.switchCamera();\n } catch (e) {\n ToastManager.addToast({\n title: `Error while flipping camera ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <CameraFlipIcon />\n </IconButton>\n </Box>\n );\n};\n\n// It will handle and show audio input devices in Mweb while audio output devices in desktop\nexport const AudioActions = () => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n\n // don't show speaker selector where the API is not supported, and use\n // a generic word(\"Audio\") for Mic. In some cases(Chrome Android for example) this changes both mic and speaker keeping them in sync.\n const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype;\n const { audioInput, audioOutput } = allDevices;\n let availableAudioDevices = audioInput;\n let selectedAudio = selectedDeviceIDs.audioInput;\n if (shouldShowAudioOutput) {\n availableAudioDevices = audioOutput;\n selectedAudio = selectedDeviceIDs.audioOutput;\n }\n const hmsActions = useHMSActions();\n const audioFiltered = availableAudioDevices?.find(item => !!item.label);\n const currentSelection = availableAudioDevices?.find(item => item.deviceId === selectedAudio);\n\n if (!audioFiltered) {\n return null;\n }\n const deviceCategory = getAudioDeviceCategory(currentSelection?.label);\n let AudioIcon = <SpeakerIcon />;\n if (deviceCategory === HMSAudioDeviceCategory.BLUETOOTH) {\n AudioIcon = <BluetoothIcon />;\n } else if (deviceCategory === HMSAudioDeviceCategory.WIRED) {\n AudioIcon = <HeadphonesIcon />;\n } else if (deviceCategory === HMSAudioDeviceCategory.EARPIECE) {\n AudioIcon = <TelePhoneIcon />;\n }\n return (\n <AudioSelectionSheet\n audioDevices={availableAudioDevices}\n audioSelected={selectedAudio}\n onChange={async deviceId => {\n try {\n await updateDevice({\n deviceId,\n deviceType: shouldShowAudioOutput ? DeviceType.audioOutput : DeviceType.audioInput,\n });\n } catch (e) {\n ToastManager.addToast({\n title: `Error while changing audio device ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <Box\n onClick={async () => {\n // refresh device as `devicechange` listener won't work in mobile device\n await hmsActions.refreshDevices();\n }}\n >\n <IconButton>{AudioIcon}</IconButton>\n </Box>\n </AudioSelectionSheet>\n );\n};\n\nconst AudioSelectionSheet = ({ audioDevices, audioSelected, onChange, children }) => {\n return (\n <Sheet.Root>\n <Sheet.Trigger asChild>{children}</Sheet.Trigger>\n <Sheet.Content>\n <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%' }}>\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n Audio\n </Text>\n <Sheet.Close>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Flex\n direction=\"column\"\n css={{\n px: '$8',\n maxHeight: '80vh',\n overflowY: 'auto',\n }}\n >\n {audioDevices.map(audioDevice => {\n return (\n <SelectWithLabel\n key={audioDevice.deviceId}\n label={audioDevice.label}\n id={audioDevice.deviceId}\n checked={audioDevice.deviceId === audioSelected}\n onChange={() => onChange(audioDevice.deviceId)}\n />\n );\n })}\n </Flex>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n\nconst SelectWithLabel = ({ label, icon = <></>, checked, id, onChange }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n my: '$2',\n py: '$8',\n w: '100%',\n borderBottom: '1px solid $border_default',\n }}\n onClick={onChange}\n >\n <Label\n htmlFor={id}\n css={{\n fontSize: '$md',\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n flex: '1 1 0',\n }}\n >\n {icon}\n {label}\n </Label>\n {checked && <CheckIcon width={24} height={24} />}\n </Flex>\n );\n};\n", "export { Header } from './Header';\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAOA,YAAW;AAClB,SAAS,YAAAC,iBAAgB;AACzB,SAAS,cAAc,iBAAiB,eAAAC,oBAAmB;;;ACF3D;AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AAU1B,IAAM,oBAAoB,MAAM;AACrC,QAAM,EAAE,OAAO,YAAY,IAAI,oBAAoB;AACnD,QAAM,WAAW,SAAS,OAAU,MAAM,EAAE;AAC5C,QAAM,aAAa;AACnB,QAAM,oBAAoB,kBAAkB,kBAAkB,YAAY;AAC1E,QAAM,qBAAqB,eAAe,cAAc,YAAY;AAEpE,MAAK,CAAC,SAAS,CAAC,eAAiB,YAAY,CAAC,OAAQ;AACpD,WAAO;AAAA,EACT;AAEA,SACE,oCAAC,QAAK,WAAW,WAAW,QAAQ,UAAU,KAAK,EAAE,IAAI,MAAM,YAAY,WAAW,WAAW,QAAQ,KACvG,oCAAC,QAAK,SAAQ,MAAK,KAAK,EAAE,GAAG,oBAAoB,YAAY,YAAY,KACtE,KACH,GACC,CAAC,YACA,oCAAC,QAAK,OAAM,OAAM,KAAK,EAAE,OAAO,mBAAmB,KACjD,oCAAC,QAAK,SAAQ,MAAK,KAAK,EAAE,GAAG,qBAAqB,KAC/C,YAAY,MAAM,GAAG,UAAU,CAClC,GACC,YAAY,SAAS,aACpB;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,YAAY,OAAO,UAAU,QAAQ,QAAQ,WAAW,YAAY,OAAO;AAAA,MACpF,SAAS;AAAA;AAAA,IACV;AAAA,EAED,IACE,IACN,GAED,YAAY,cACX,oCAAC,QAAK,KAAK,EAAE,OAAO,qBAAqB,KACvC,oCAAC,oBAAiB,QAAQ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gBAAAA,OAAA,cAAC,uBAAkB,GACnB,gBAAAA,OAAA,cAAC,kBAAa,CAChB,IACE;AAAA,EACN,CACF;AAEJ;;;AGnDA;",
|
6
|
-
"names": ["React", "useMedia", "useHMSStore", "React", "React", "useHMSStore", "useMedia", "React"]
|
7
|
-
}
|
package/dist/chunk-LXJGCRKM.js
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
useSidepaneReset
|
3
|
-
} from "./chunk-MG3UGW66.js";
|
4
|
-
import {
|
5
|
-
useRoomLayoutConferencingScreen
|
6
|
-
} from "./chunk-BGSYLCVD.js";
|
7
|
-
import {
|
8
|
-
APP_DATA,
|
9
|
-
init_define_process_env
|
10
|
-
} from "./chunk-GLAJUP3O.js";
|
11
|
-
|
12
|
-
// src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx
|
13
|
-
init_define_process_env();
|
14
|
-
import { useEffect } from "react";
|
15
|
-
import { selectAppData, useHMSStore } from "@100mslive/react-sdk";
|
16
|
-
var useSidepaneResetOnLayoutUpdate = (layoutKey, sidepaneOption) => {
|
17
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
18
|
-
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
19
|
-
const resetSidePane = useSidepaneReset();
|
20
|
-
useEffect(() => {
|
21
|
-
if (sidepane === sidepaneOption && !(elements == null ? void 0 : elements[layoutKey])) {
|
22
|
-
resetSidePane();
|
23
|
-
}
|
24
|
-
}, [elements, elements == null ? void 0 : elements[layoutKey], resetSidePane, sidepane, layoutKey, sidepaneOption]);
|
25
|
-
};
|
26
|
-
|
27
|
-
export {
|
28
|
-
useSidepaneResetOnLayoutUpdate
|
29
|
-
};
|
30
|
-
//# sourceMappingURL=chunk-LXJGCRKM.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx"],
|
4
|
-
"sourcesContent": ["import { useEffect } from 'react';\nimport { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { selectAppData, useHMSStore } from '@100mslive/react-sdk';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore\nimport { useSidepaneReset } from './useSidepane';\nimport { APP_DATA, SidePaneOption } from '../../common/constants';\n\n// Closes the sidepane if an element is removed from the layout via the customiser\nexport const useSidepaneResetOnLayoutUpdate = (\n layoutKey: keyof DefaultConferencingScreen_Elements,\n sidepaneOption: SidePaneOption,\n) => {\n const { elements } = useRoomLayoutConferencingScreen();\n const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));\n const resetSidePane = useSidepaneReset();\n useEffect(() => {\n if (sidepane === sidepaneOption && !elements?.[layoutKey]) {\n resetSidePane();\n }\n }, [elements, elements?.[layoutKey], resetSidePane, sidepane, layoutKey, sidepaneOption]);\n};\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;AAAA;AAAA,SAAS,iBAAiB;AAE1B,SAAS,eAAe,mBAAmB;AAOpC,IAAM,iCAAiC,CAC5C,WACA,mBACG;AACH,QAAM,EAAE,SAAS,IAAI,gCAAgC;AACrD,QAAM,WAAW,YAAY,cAAc,SAAS,QAAQ,CAAC;AAC7D,QAAM,gBAAgB,iBAAiB;AACvC,YAAU,MAAM;AACd,QAAI,aAAa,kBAAkB,EAAC,qCAAW,aAAY;AACzD,oBAAc;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,UAAU,qCAAW,YAAY,eAAe,UAAU,WAAW,cAAc,CAAC;AAC1F;",
|
6
|
-
"names": []
|
7
|
-
}
|