@100mslive/roomkit-react 0.3.22-alpha.2 → 0.3.22-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Accordion/Accordion.d.ts +322 -134
- package/dist/Accordion/index.d.ts +322 -134
- package/dist/Avatar/Avatar.d.ts +141 -47
- package/dist/Button/Button.d.ts +141 -47
- package/dist/Checkbox/Checkbox.d.ts +322 -134
- package/dist/Collapsible/Collapsible.d.ts +483 -201
- package/dist/Divider/Divider.d.ts +322 -134
- package/dist/Dropdown/Dropdown.d.ts +1932 -804
- package/dist/Fieldset/Fieldset.d.ts +141 -47
- package/dist/Footer/Footer.d.ts +1288 -536
- package/dist/{HLSView-XRGOWFRB.js → HLSView-CSOBLYBP.js} +24 -38
- package/dist/HLSView-CSOBLYBP.js.map +7 -0
- package/dist/{PDFView-RJK44WVO.css → HLSView-QZMIDGI4.css} +3 -3
- package/dist/{EmbedView-Y24VRONT.css.map → HLSView-QZMIDGI4.css.map} +1 -1
- package/dist/IconButton/IconButton.d.ts +141 -47
- package/dist/Input/Input.d.ts +926 -362
- package/dist/Label/Label.d.ts +141 -47
- package/dist/Layout/Box.d.ts +141 -47
- package/dist/Layout/Flex.d.ts +141 -47
- package/dist/Link/Link.d.ts +141 -47
- package/dist/Modal/Dialog.d.ts +987 -329
- package/dist/Modal/DialogContent.d.ts +1127 -469
- package/dist/Pagination/StyledPagination.d.ts +644 -268
- package/dist/Popover/index.d.ts +483 -201
- package/dist/Prebuilt/IconButton.d.ts +322 -134
- package/dist/Prebuilt/components/Chat/ChatBody.d.ts +322 -134
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +805 -335
- package/dist/Prebuilt/components/Settings/common.d.ts +322 -134
- package/dist/Progress/index.d.ts +322 -134
- package/dist/RadioGroup/RadioGroup.d.ts +483 -201
- package/dist/ReactSelect/ReactSelect.d.ts +1610 -670
- package/dist/Select/Select.d.ts +483 -201
- package/dist/Sheet/Sheet.d.ts +987 -329
- package/dist/Slider/Slider.d.ts +141 -47
- package/dist/Stats/StyledStats.d.ts +966 -402
- package/dist/Switch/Switch.d.ts +141 -47
- package/dist/Tabs/Tabs.d.ts +644 -268
- package/dist/Text/Text.d.ts +141 -47
- package/dist/TextArea/TextArea.d.ts +141 -47
- package/dist/Theme/base.config.d.ts +78 -26
- package/dist/Theme/stitches.config.d.ts +1514 -1067
- package/dist/TileMenu/StyledMenuTile.d.ts +1127 -469
- package/dist/Toast/Toast.d.ts +946 -382
- package/dist/Video/Video.d.ts +141 -47
- package/dist/VideoList/StyledVideoList.d.ts +483 -201
- package/dist/VideoTile/StyledVideoTile.d.ts +1610 -670
- package/dist/chunk-4VBHLZDR.js +34747 -0
- package/dist/chunk-4VBHLZDR.js.map +7 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +22687 -22873
- 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 +15 -25
- package/dist/meta.cjs.json +5125 -5444
- package/dist/meta.esbuild.json +6238 -9055
- package/package.json +8 -8
- package/src/Avatar/Avatar.tsx +1 -1
- package/src/Popover/Popover.stories.tsx +1 -1
- package/src/Prebuilt/App.tsx +2 -6
- package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
- package/src/Prebuilt/components/Notifications/Notifications.tsx +159 -11
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +2 -23
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +5 -1
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +5 -7
- package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +1 -23
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +5 -13
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -32
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +31 -43
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
- package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +1 -3
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +0 -6
- package/src/Prebuilt/layouts/HLSView.jsx +0 -1
- package/src/Prebuilt/layouts/PDFView.jsx +0 -1
- package/src/Prebuilt/layouts/SidePane.tsx +6 -12
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +34 -35
- package/dist/ConferenceScreen-5G5WGPIO.css +0 -2780
- package/dist/ConferenceScreen-5G5WGPIO.css.map +0 -7
- package/dist/ConferenceScreen-KS5URW6Z.js +0 -1778
- package/dist/ConferenceScreen-KS5URW6Z.js.map +0 -7
- package/dist/EmbedView-BCRQ3GHV.js +0 -17
- package/dist/EmbedView-BCRQ3GHV.js.map +0 -7
- package/dist/EmbedView-Y24VRONT.css +0 -2780
- package/dist/EmojiReaction-NA5F5DWN.js +0 -11
- package/dist/EmojiReaction-NA5F5DWN.js.map +0 -7
- package/dist/HLSView-DC43TOIW.css +0 -2780
- package/dist/HLSView-DC43TOIW.css.map +0 -7
- package/dist/HLSView-XRGOWFRB.js.map +0 -7
- package/dist/LeaveScreen-3OZN3MU3.css +0 -2780
- package/dist/LeaveScreen-3OZN3MU3.css.map +0 -7
- package/dist/LeaveScreen-PC4KB6OG.js +0 -556
- package/dist/LeaveScreen-PC4KB6OG.js.map +0 -7
- package/dist/MoreSettings-KTRYHDB2.css +0 -2780
- package/dist/MoreSettings-KTRYHDB2.css.map +0 -7
- package/dist/MoreSettings-XLNYT7PW.js +0 -16
- package/dist/MoreSettings-XLNYT7PW.js.map +0 -7
- package/dist/PDFView-LJ7I3K3H.js +0 -84
- package/dist/PDFView-LJ7I3K3H.js.map +0 -7
- package/dist/PDFView-RJK44WVO.css.map +0 -7
- package/dist/Polls-AULCHMLW.js +0 -1584
- package/dist/Polls-AULCHMLW.js.map +0 -7
- package/dist/Polls-K4GO5ZOC.css +0 -2780
- package/dist/Polls-K4GO5ZOC.css.map +0 -7
- package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +0 -1
- package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +0 -1
- package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +0 -1
- package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +0 -1
- package/dist/RaiseHand-E4OVMBW6.js +0 -10
- package/dist/RaiseHand-E4OVMBW6.js.map +0 -7
- package/dist/RoleProminence-LHUXHLVI.css +0 -2780
- package/dist/RoleProminence-LHUXHLVI.css.map +0 -7
- package/dist/RoleProminence-RWJP2Z36.js +0 -116
- package/dist/RoleProminence-RWJP2Z36.js.map +0 -7
- package/dist/RoomDetailsPane-6BM2FPWW.css +0 -2780
- package/dist/RoomDetailsPane-6BM2FPWW.css.map +0 -7
- package/dist/RoomDetailsPane-7OP2CNJW.js +0 -53
- package/dist/RoomDetailsPane-7OP2CNJW.js.map +0 -7
- package/dist/ScreenshareLayout-RHTD2PQT.css +0 -2780
- package/dist/ScreenshareLayout-RHTD2PQT.css.map +0 -7
- package/dist/ScreenshareLayout-TM7DLYLH.js +0 -358
- package/dist/ScreenshareLayout-TM7DLYLH.js.map +0 -7
- package/dist/SidePaneTabs-T7BKZ2AT.js +0 -1354
- package/dist/SidePaneTabs-T7BKZ2AT.js.map +0 -7
- package/dist/SidePaneTabs-TBUPHNAU.css +0 -2780
- package/dist/SidePaneTabs-TBUPHNAU.css.map +0 -7
- package/dist/VBPicker-M5VYFEUB.css +0 -2780
- package/dist/VBPicker-M5VYFEUB.css.map +0 -7
- package/dist/VBPicker-TQLIL3NC.js +0 -322
- package/dist/VBPicker-TQLIL3NC.js.map +0 -7
- package/dist/WaitingView-TLJ52XYA.js +0 -10
- package/dist/WaitingView-TLJ52XYA.js.map +0 -7
- package/dist/WhiteboardLayout-PZZTM2FW.css +0 -2780
- package/dist/WhiteboardLayout-PZZTM2FW.css.map +0 -7
- package/dist/WhiteboardLayout-YYZ5UVGG.js +0 -96
- package/dist/WhiteboardLayout-YYZ5UVGG.js.map +0 -7
- package/dist/android-perm-1.png +0 -0
- package/dist/audio-level.png +0 -0
- package/dist/chunk-42XPBCZO.js +0 -487
- package/dist/chunk-42XPBCZO.js.map +0 -7
- package/dist/chunk-4BQ3AMVG.js +0 -16802
- package/dist/chunk-4BQ3AMVG.js.map +0 -7
- package/dist/chunk-4L5OKEIV.js +0 -90
- package/dist/chunk-4L5OKEIV.js.map +0 -7
- package/dist/chunk-6BX3VCVC.js +0 -6337
- package/dist/chunk-6BX3VCVC.js.map +0 -7
- package/dist/chunk-A3COGXMF.js +0 -114
- package/dist/chunk-A3COGXMF.js.map +0 -7
- package/dist/chunk-B3HHL3ND.js +0 -178
- package/dist/chunk-B3HHL3ND.js.map +0 -7
- package/dist/chunk-B5NLX6N6.js +0 -41
- package/dist/chunk-B5NLX6N6.js.map +0 -7
- package/dist/chunk-BXBPZGSP.js +0 -161
- package/dist/chunk-BXBPZGSP.js.map +0 -7
- package/dist/chunk-DVVFWHQG.js +0 -136
- package/dist/chunk-DVVFWHQG.js.map +0 -7
- package/dist/chunk-GV2DTYSU.js +0 -262
- package/dist/chunk-GV2DTYSU.js.map +0 -7
- package/dist/chunk-KF2YEUWU.js +0 -254
- package/dist/chunk-KF2YEUWU.js.map +0 -7
- package/dist/chunk-KQXTIHI6.js +0 -59
- package/dist/chunk-KQXTIHI6.js.map +0 -7
- package/dist/chunk-MR3HE7HV.js +0 -830
- package/dist/chunk-MR3HE7HV.js.map +0 -7
- package/dist/chunk-OQBTPJPO.js +0 -71
- package/dist/chunk-OQBTPJPO.js.map +0 -7
- package/dist/chunk-P7OOTR7P.js +0 -2595
- package/dist/chunk-P7OOTR7P.js.map +0 -7
- package/dist/chunk-THDU2DKP.js +0 -30
- package/dist/chunk-THDU2DKP.js.map +0 -7
- package/dist/chunk-U4QYH2BP.js +0 -98
- package/dist/chunk-U4QYH2BP.js.map +0 -7
- package/dist/chunk-USEEH3QW.js +0 -418
- package/dist/chunk-USEEH3QW.js.map +0 -7
- package/dist/chunk-UZW3C3ML.js +0 -171
- package/dist/chunk-UZW3C3ML.js.map +0 -7
- package/dist/chunk-YDIB6WKJ.js +0 -576
- package/dist/chunk-YDIB6WKJ.js.map +0 -7
- package/dist/chunk-ZFTULCCP.js +0 -62
- package/dist/chunk-ZFTULCCP.js.map +0 -7
- package/dist/empty-chat.svg +0 -12
- package/dist/ios-perm-0.png +0 -0
- package/dist/pdf-share.png +0 -0
- package/dist/screen-share.png +0 -0
- package/dist/transaction_error.svg +0 -12
- package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +0 -18
- package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +0 -56
- package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +0 -24
- package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +0 -71
package/dist/chunk-KF2YEUWU.js
DELETED
@@ -1,254 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
Button,
|
3
|
-
HorizontalDivider,
|
4
|
-
Loading,
|
5
|
-
Popover,
|
6
|
-
Sheet,
|
7
|
-
_s
|
8
|
-
} from "./chunk-4BQ3AMVG.js";
|
9
|
-
import {
|
10
|
-
Text
|
11
|
-
} from "./chunk-BXBPZGSP.js";
|
12
|
-
import {
|
13
|
-
ToastManager,
|
14
|
-
useRecordingHandler
|
15
|
-
} from "./chunk-USEEH3QW.js";
|
16
|
-
import {
|
17
|
-
Box,
|
18
|
-
Flex
|
19
|
-
} from "./chunk-4L5OKEIV.js";
|
20
|
-
import {
|
21
|
-
Tooltip,
|
22
|
-
formatTime,
|
23
|
-
useRoomLayoutConferencingScreen
|
24
|
-
} from "./chunk-6BX3VCVC.js";
|
25
|
-
import {
|
26
|
-
__async,
|
27
|
-
config,
|
28
|
-
init_define_process_env
|
29
|
-
} from "./chunk-YDIB6WKJ.js";
|
30
|
-
|
31
|
-
// src/Prebuilt/components/Header/StreamActions.tsx
|
32
|
-
init_define_process_env();
|
33
|
-
import React, { useCallback, useEffect, useRef, useState } from "react";
|
34
|
-
import { useMedia } from "react-use";
|
35
|
-
import {
|
36
|
-
HMSRoomState,
|
37
|
-
selectHLSState,
|
38
|
-
selectIsConnectedToRoom,
|
39
|
-
selectPermissions,
|
40
|
-
selectRecordingState,
|
41
|
-
selectRoomState,
|
42
|
-
useHMSActions,
|
43
|
-
useHMSStore,
|
44
|
-
useRecordingStreaming
|
45
|
-
} from "@100mslive/react-sdk";
|
46
|
-
import { AlertTriangleIcon, CrossIcon, PauseCircleIcon, RecordIcon } from "@100mslive/react-icons";
|
47
|
-
var getRecordingText = ({
|
48
|
-
isBrowserRecordingOn,
|
49
|
-
isServerRecordingOn,
|
50
|
-
isHLSRecordingOn
|
51
|
-
}, delimiter = ", ") => {
|
52
|
-
if (!isBrowserRecordingOn && !isServerRecordingOn && !isHLSRecordingOn) {
|
53
|
-
return "";
|
54
|
-
}
|
55
|
-
const title = [];
|
56
|
-
if (isBrowserRecordingOn) {
|
57
|
-
title.push("Browser");
|
58
|
-
}
|
59
|
-
if (isServerRecordingOn) {
|
60
|
-
title.push("Server");
|
61
|
-
}
|
62
|
-
if (isHLSRecordingOn) {
|
63
|
-
title.push("HLS");
|
64
|
-
}
|
65
|
-
return title.join(delimiter);
|
66
|
-
};
|
67
|
-
var LiveStatus = () => {
|
68
|
-
var _a;
|
69
|
-
const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();
|
70
|
-
const hlsState = useHMSStore(selectHLSState);
|
71
|
-
const isMobile = useMedia(config.media.md);
|
72
|
-
const intervalRef = useRef(null);
|
73
|
-
const { screenType } = useRoomLayoutConferencingScreen();
|
74
|
-
const [liveTime, setLiveTime] = useState(0);
|
75
|
-
const startTimer = useCallback(() => {
|
76
|
-
intervalRef.current = setInterval(() => {
|
77
|
-
var _a2;
|
78
|
-
const timeStamp = (_a2 = hlsState == null ? void 0 : hlsState.variants[0]) == null ? void 0 : _a2[screenType === "hls_live_streaming" ? "startedAt" : "initialisedAt"];
|
79
|
-
if ((hlsState == null ? void 0 : hlsState.running) && timeStamp) {
|
80
|
-
setLiveTime(Date.now() - timeStamp.getTime());
|
81
|
-
}
|
82
|
-
}, 1e3);
|
83
|
-
}, [hlsState == null ? void 0 : hlsState.running, hlsState == null ? void 0 : hlsState.variants, screenType]);
|
84
|
-
useEffect(() => {
|
85
|
-
if (hlsState == null ? void 0 : hlsState.running) {
|
86
|
-
startTimer();
|
87
|
-
}
|
88
|
-
if (!(hlsState == null ? void 0 : hlsState.running) && intervalRef.current) {
|
89
|
-
clearInterval(intervalRef.current);
|
90
|
-
}
|
91
|
-
return () => {
|
92
|
-
if (intervalRef.current) {
|
93
|
-
clearInterval(intervalRef.current);
|
94
|
-
}
|
95
|
-
};
|
96
|
-
}, [hlsState.running, isMobile, startTimer]);
|
97
|
-
if (!isHLSRunning && !isRTMPRunning) {
|
98
|
-
return null;
|
99
|
-
}
|
100
|
-
return /* @__PURE__ */ React.createElement(
|
101
|
-
Flex,
|
102
|
-
{
|
103
|
-
align: "center",
|
104
|
-
gap: "1",
|
105
|
-
css: {
|
106
|
-
border: "1px solid $border_default",
|
107
|
-
padding: "$4 $6 $4 $6",
|
108
|
-
borderRadius: "$1"
|
109
|
-
}
|
110
|
-
},
|
111
|
-
/* @__PURE__ */ React.createElement(Box, { css: { w: "$4", h: "$4", r: "$round", bg: "$alert_error_default", mr: "$2" } }),
|
112
|
-
/* @__PURE__ */ React.createElement(Flex, { align: "center", gap: "2" }, /* @__PURE__ */ React.createElement(Text, { variant: !isMobile ? "button" : "body2" }, "LIVE"), /* @__PURE__ */ React.createElement(Text, { variant: "caption" }, ((_a = hlsState == null ? void 0 : hlsState.variants) == null ? void 0 : _a.length) > 0 && isHLSRunning ? formatTime(liveTime) : ""))
|
113
|
-
);
|
114
|
-
};
|
115
|
-
var RecordingStatus = () => {
|
116
|
-
const { isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn, isRecordingOn } = useRecordingStreaming();
|
117
|
-
const permissions = useHMSStore(selectPermissions);
|
118
|
-
const isMobile = useMedia(config.media.md);
|
119
|
-
if (!isRecordingOn || // if only browser recording is enabled, stop recording is shown
|
120
|
-
// so no need to show this as it duplicates
|
121
|
-
[permissions == null ? void 0 : permissions.browserRecording, !isServerRecordingOn, !isHLSRecordingOn, isBrowserRecordingOn].every(
|
122
|
-
(value) => !!value
|
123
|
-
)) {
|
124
|
-
if (!(isMobile && isRecordingOn))
|
125
|
-
return null;
|
126
|
-
}
|
127
|
-
return /* @__PURE__ */ React.createElement(
|
128
|
-
Tooltip,
|
129
|
-
{
|
130
|
-
boxCss: { zIndex: 1 },
|
131
|
-
title: getRecordingText({
|
132
|
-
isBrowserRecordingOn,
|
133
|
-
isServerRecordingOn,
|
134
|
-
isHLSRecordingOn
|
135
|
-
})
|
136
|
-
},
|
137
|
-
/* @__PURE__ */ React.createElement(
|
138
|
-
Flex,
|
139
|
-
{
|
140
|
-
css: {
|
141
|
-
color: "$alert_error_default",
|
142
|
-
alignItems: "center"
|
143
|
-
}
|
144
|
-
},
|
145
|
-
/* @__PURE__ */ React.createElement(RecordIcon, { width: 24, height: 24 })
|
146
|
-
)
|
147
|
-
);
|
148
|
-
};
|
149
|
-
var RecordingPauseStatus = () => {
|
150
|
-
const recording = useHMSStore(selectRecordingState);
|
151
|
-
if (recording.hls && recording.hls.state === _s.PAUSED) {
|
152
|
-
return /* @__PURE__ */ React.createElement(
|
153
|
-
Tooltip,
|
154
|
-
{
|
155
|
-
boxCss: { zIndex: 1 },
|
156
|
-
title: getRecordingText({
|
157
|
-
isBrowserRecordingOn: false,
|
158
|
-
isServerRecordingOn: false,
|
159
|
-
isHLSRecordingOn: true
|
160
|
-
})
|
161
|
-
},
|
162
|
-
/* @__PURE__ */ React.createElement(
|
163
|
-
Flex,
|
164
|
-
{
|
165
|
-
css: {
|
166
|
-
color: "$on_surface_high",
|
167
|
-
alignItems: "center"
|
168
|
-
}
|
169
|
-
},
|
170
|
-
/* @__PURE__ */ React.createElement(PauseCircleIcon, { width: 24, height: 24 })
|
171
|
-
)
|
172
|
-
);
|
173
|
-
}
|
174
|
-
return null;
|
175
|
-
};
|
176
|
-
var StartRecording = () => {
|
177
|
-
const permissions = useHMSStore(selectPermissions);
|
178
|
-
const [open, setOpen] = useState(false);
|
179
|
-
const { startRecording, recordingStarted } = useRecordingHandler();
|
180
|
-
const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();
|
181
|
-
const hmsActions = useHMSActions();
|
182
|
-
if (!(permissions == null ? void 0 : permissions.browserRecording) || isHLSRunning) {
|
183
|
-
return null;
|
184
|
-
}
|
185
|
-
if (isBrowserRecordingOn) {
|
186
|
-
return /* @__PURE__ */ React.createElement(Popover.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(Popover.Trigger, { asChild: true }, /* @__PURE__ */ React.createElement(Button, { variant: "danger", "data-testid": "stop_recording", icon: true, outlined: true, onClick: () => setOpen(true) }, /* @__PURE__ */ React.createElement(RecordIcon, null), /* @__PURE__ */ React.createElement(Text, { as: "span", css: { "@md": { display: "none" }, color: "currentColor" } }, "Stop Recording"))), /* @__PURE__ */ React.createElement(Popover.Portal, null, /* @__PURE__ */ React.createElement(Popover.Content, { align: "end", sideOffset: 8, css: { w: "$64" } }, /* @__PURE__ */ React.createElement(Text, { variant: "body1", css: { color: "$on_surface_medium" } }, "Are you sure you want to end the recording?"), /* @__PURE__ */ React.createElement(
|
187
|
-
Button,
|
188
|
-
{
|
189
|
-
"data-testid": "stop_recording_confirm",
|
190
|
-
variant: "danger",
|
191
|
-
icon: true,
|
192
|
-
css: { ml: "auto" },
|
193
|
-
onClick: () => __async(void 0, null, function* () {
|
194
|
-
try {
|
195
|
-
yield hmsActions.stopRTMPAndRecording();
|
196
|
-
} catch (error) {
|
197
|
-
const err = error;
|
198
|
-
ToastManager.addToast({
|
199
|
-
title: err.message,
|
200
|
-
variant: "error"
|
201
|
-
});
|
202
|
-
}
|
203
|
-
setOpen(false);
|
204
|
-
})
|
205
|
-
},
|
206
|
-
"Stop"
|
207
|
-
))));
|
208
|
-
}
|
209
|
-
return /* @__PURE__ */ React.createElement(
|
210
|
-
Button,
|
211
|
-
{
|
212
|
-
"data-testid": "start_recording",
|
213
|
-
variant: "standard",
|
214
|
-
icon: true,
|
215
|
-
disabled: recordingStarted || isStreamingOn,
|
216
|
-
onClick: () => __async(void 0, null, function* () {
|
217
|
-
yield startRecording();
|
218
|
-
})
|
219
|
-
},
|
220
|
-
recordingStarted ? /* @__PURE__ */ React.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ React.createElement(RecordIcon, null),
|
221
|
-
/* @__PURE__ */ React.createElement(Text, { as: "span", css: { "@md": { display: "none" }, color: "currentColor" } }, recordingStarted ? "Starting" : "Start", " Recording")
|
222
|
-
);
|
223
|
-
};
|
224
|
-
var StreamActions = () => {
|
225
|
-
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
226
|
-
const isMobile = useMedia(config.media.md);
|
227
|
-
const roomState = useHMSStore(selectRoomState);
|
228
|
-
return /* @__PURE__ */ React.createElement(Flex, { align: "center", css: { gap: "$4" } }, !isMobile && /* @__PURE__ */ React.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React.createElement(RecordingPauseStatus, null), /* @__PURE__ */ React.createElement(RecordingStatus, null), roomState !== HMSRoomState.Preview ? /* @__PURE__ */ React.createElement(LiveStatus, null) : null), isConnected && !isMobile ? /* @__PURE__ */ React.createElement(StartRecording, null) : null);
|
229
|
-
};
|
230
|
-
var StopRecordingInSheet = ({
|
231
|
-
onStopRecording,
|
232
|
-
onClose
|
233
|
-
}) => {
|
234
|
-
return /* @__PURE__ */ React.createElement(Sheet.Root, { open: true }, /* @__PURE__ */ React.createElement(Sheet.Content, null, /* @__PURE__ */ React.createElement(Sheet.Title, { css: { p: "$10" } }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", justify: "between", css: { w: "100%", c: "$alert_error_default" } }, /* @__PURE__ */ React.createElement(Flex, { justify: "start", align: "center", gap: "3" }, /* @__PURE__ */ React.createElement(AlertTriangleIcon, null), /* @__PURE__ */ React.createElement(Text, { variant: "h5", css: { c: "$alert_error_default" } }, "Stop Recording")), /* @__PURE__ */ React.createElement(Sheet.Close, { css: { color: "white" }, onClick: onClose }, /* @__PURE__ */ React.createElement(CrossIcon, null)))), /* @__PURE__ */ React.createElement(HorizontalDivider, null), /* @__PURE__ */ React.createElement(Box, { as: "div", css: { p: "$10", overflowY: "scroll", maxHeight: "70vh" } }, /* @__PURE__ */ React.createElement(Text, { variant: "caption", css: { c: "$on_surface_medium", pb: "$8" } }, "Are you sure you want to stop recording? You can\u2019t undo this action."), /* @__PURE__ */ React.createElement(
|
235
|
-
Button,
|
236
|
-
{
|
237
|
-
variant: "danger",
|
238
|
-
css: { width: "100%" },
|
239
|
-
type: "submit",
|
240
|
-
"data-testid": "popup_change_btn",
|
241
|
-
onClick: onStopRecording
|
242
|
-
},
|
243
|
-
"Stop"
|
244
|
-
))));
|
245
|
-
};
|
246
|
-
|
247
|
-
export {
|
248
|
-
LiveStatus,
|
249
|
-
RecordingStatus,
|
250
|
-
RecordingPauseStatus,
|
251
|
-
StreamActions,
|
252
|
-
StopRecordingInSheet
|
253
|
-
};
|
254
|
-
//# sourceMappingURL=chunk-KF2YEUWU.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/Header/StreamActions.tsx"],
|
4
|
-
"sourcesContent": ["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSRecordingState } from '@100mslive/hms-video-store';\nimport {\n HMSRoomState,\n selectHLSState,\n selectIsConnectedToRoom,\n selectPermissions,\n selectRecordingState,\n selectRoomState,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, CrossIcon, PauseCircleIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Button, config as cssConfig, Flex, HorizontalDivider, Loading, Popover, Text, Tooltip } from '../../..';\nimport { Sheet } from '../../../Sheet';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useRecordingHandler } from '../../common/hooks';\n// @ts-ignore\nimport { formatTime } from '../../common/utils';\n\nexport const getRecordingText = (\n {\n isBrowserRecordingOn,\n isServerRecordingOn,\n isHLSRecordingOn,\n }: { isBrowserRecordingOn: boolean; isServerRecordingOn: boolean; isHLSRecordingOn: boolean },\n delimiter = ', ',\n) => {\n if (!isBrowserRecordingOn && !isServerRecordingOn && !isHLSRecordingOn) {\n return '';\n }\n const title: string[] = [];\n if (isBrowserRecordingOn) {\n title.push('Browser');\n }\n if (isServerRecordingOn) {\n title.push('Server');\n }\n if (isHLSRecordingOn) {\n title.push('HLS');\n }\n return title.join(delimiter);\n};\n\nexport const LiveStatus = () => {\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const hlsState = useHMSStore(selectHLSState);\n const isMobile = useMedia(cssConfig.media.md);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n const { screenType } = useRoomLayoutConferencingScreen();\n const [liveTime, setLiveTime] = useState(0);\n\n const startTimer = useCallback(() => {\n intervalRef.current = setInterval(() => {\n const timeStamp = hlsState?.variants[0]?.[screenType === 'hls_live_streaming' ? 'startedAt' : 'initialisedAt'];\n if (hlsState?.running && timeStamp) {\n setLiveTime(Date.now() - timeStamp.getTime());\n }\n }, 1000);\n }, [hlsState?.running, hlsState?.variants, screenType]);\n\n useEffect(() => {\n if (hlsState?.running) {\n startTimer();\n }\n if (!hlsState?.running && intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n return () => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n };\n }, [hlsState.running, isMobile, startTimer]);\n\n if (!isHLSRunning && !isRTMPRunning) {\n return null;\n }\n return (\n <Flex\n align=\"center\"\n gap=\"1\"\n css={{\n border: '1px solid $border_default',\n padding: '$4 $6 $4 $6',\n borderRadius: '$1',\n }}\n >\n <Box css={{ w: '$4', h: '$4', r: '$round', bg: '$alert_error_default', mr: '$2' }} />\n <Flex align=\"center\" gap=\"2\">\n <Text variant={!isMobile ? 'button' : 'body2'}>LIVE</Text>\n <Text variant=\"caption\">{hlsState?.variants?.length > 0 && isHLSRunning ? formatTime(liveTime) : ''}</Text>\n </Flex>\n </Flex>\n );\n};\n\nexport const RecordingStatus = () => {\n const { isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn, isRecordingOn } = useRecordingStreaming();\n const permissions = useHMSStore(selectPermissions);\n const isMobile = useMedia(cssConfig.media.md);\n\n if (\n !isRecordingOn ||\n // if only browser recording is enabled, stop recording is shown\n // so no need to show this as it duplicates\n [permissions?.browserRecording, !isServerRecordingOn, !isHLSRecordingOn, isBrowserRecordingOn].every(\n value => !!value,\n )\n ) {\n // show recording icon in mobile without popover\n if (!(isMobile && isRecordingOn)) return null;\n }\n\n return (\n <Tooltip\n boxCss={{ zIndex: 1 }}\n title={getRecordingText({\n isBrowserRecordingOn,\n isServerRecordingOn,\n isHLSRecordingOn,\n })}\n >\n <Flex\n css={{\n color: '$alert_error_default',\n alignItems: 'center',\n }}\n >\n <RecordIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n );\n};\n\nexport const RecordingPauseStatus = () => {\n const recording = useHMSStore(selectRecordingState);\n if (recording.hls && recording.hls.state === HMSRecordingState.PAUSED) {\n return (\n <Tooltip\n boxCss={{ zIndex: 1 }}\n title={getRecordingText({\n isBrowserRecordingOn: false,\n isServerRecordingOn: false,\n isHLSRecordingOn: true,\n })}\n >\n <Flex\n css={{\n color: '$on_surface_high',\n alignItems: 'center',\n }}\n >\n <PauseCircleIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n );\n }\n return null;\n};\n\nconst StartRecording = () => {\n const permissions = useHMSStore(selectPermissions);\n const [open, setOpen] = useState(false);\n const { startRecording, recordingStarted } = useRecordingHandler();\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <Button variant=\"danger\" data-testid=\"stop_recording\" icon outlined onClick={() => setOpen(true)}>\n <RecordIcon />\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n Stop Recording\n </Text>\n </Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content align=\"end\" sideOffset={8} css={{ w: '$64' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium' }}>\n Are you sure you want to end the recording?\n </Text>\n <Button\n data-testid=\"stop_recording_confirm\"\n variant=\"danger\"\n icon\n css={{ ml: 'auto' }}\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n const err = error as Error;\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setOpen(false);\n }}\n >\n Stop\n </Button>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n }\n return (\n <Button\n data-testid=\"start_recording\"\n variant=\"standard\"\n icon\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n await startRecording();\n }}\n >\n {recordingStarted ? <Loading size={24} color=\"currentColor\" /> : <RecordIcon />}\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n {recordingStarted ? 'Starting' : 'Start'} Recording\n </Text>\n </Button>\n );\n};\n\n/**\n * @description only start recording button will be shown.\n */\nexport const StreamActions = () => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const isMobile = useMedia(cssConfig.media.md);\n const roomState = useHMSStore(selectRoomState);\n\n return (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n {!isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <RecordingPauseStatus />\n <RecordingStatus />\n {roomState !== HMSRoomState.Preview ? <LiveStatus /> : null}\n </Flex>\n )}\n {isConnected && !isMobile ? <StartRecording /> : null}\n </Flex>\n );\n};\n\nexport const StopRecordingInSheet = ({\n onStopRecording,\n onClose,\n}: {\n onStopRecording: () => void;\n onClose: () => void;\n}) => {\n return (\n <Sheet.Root open={true}>\n <Sheet.Content>\n <Sheet.Title css={{ p: '$10' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%', c: '$alert_error_default' }}>\n <Flex justify=\"start\" align=\"center\" gap=\"3\">\n <AlertTriangleIcon />\n <Text variant=\"h5\" css={{ c: '$alert_error_default' }}>\n Stop Recording\n </Text>\n </Flex>\n <Sheet.Close css={{ color: 'white' }} onClick={onClose}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Box as=\"div\" css={{ p: '$10', overflowY: 'scroll', maxHeight: '70vh' }}>\n <Text variant=\"caption\" css={{ c: '$on_surface_medium', pb: '$8' }}>\n Are you sure you want to stop recording? You can\u2019t undo this action.\n </Text>\n <Button\n variant=\"danger\"\n css={{ width: '100%' }}\n type=\"submit\"\n data-testid=\"popup_change_btn\"\n onClick={onStopRecording}\n >\n Stop\n </Button>\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AAChE,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB,WAAW,iBAAiB,kBAAkB;AAUnE,IAAM,mBAAmB,CAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF,GACA,YAAY,SACT;AACH,MAAI,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,kBAAkB;AACtE,WAAO;AAAA,EACT;AACA,QAAM,QAAkB,C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M,MAAN,EAAW,MAAM,QAChB,oCAAC,MAAM,SAAN,MACC,oCAAC,MAAM,OAAN,EAAY,KAAK,EAAE,GAAG,MAAM,KAC3B,oCAAC,QAAK,WAAU,OAAM,SAAQ,WAAU,KAAK,EAAE,GAAG,QAAQ,GAAG,uBAAuB,KAClF,oCAAC,QAAK,SAAQ,SAAQ,OAAM,UAAS,KAAI,OACvC,oCAAC,uBAAkB,GACnB,oCAAC,QAAK,SAAQ,MAAK,KAAK,EAAE,GAAG,uBAAuB,KAAG,gBAEvD,CACF,GACA,oCAAC,MAAM,OAAN,EAAY,KAAK,EAAE,OAAO,QAAQ,GAAG,SAAS,WAC7C,oCAAC,eAAU,CACb,CACF,CACF,GACA,oCAAC,uBAAkB,GACnB,oCAAC,OAAI,IAAG,OAAM,KAAK,EAAE,GAAG,OAAO,WAAW,UAAU,WAAW,OAAO,KACpE,oCAAC,QAAK,SAAQ,WAAU,KAAK,EAAE,GAAG,sBAAsB,IAAI,KAAK,KAAG,2EAEpE,GACA;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,KAAK,EAAE,OAAO,OAAO;AAAA,MACrB,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,SAAS;AAAA;AAAA,IACV;AAAA,EAED,CACF,CACF,CACF;AAEJ;",
|
6
|
-
"names": ["_a"]
|
7
|
-
}
|
package/dist/chunk-KQXTIHI6.js
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
useVideoTileContext
|
3
|
-
} from "./chunk-B3HHL3ND.js";
|
4
|
-
import {
|
5
|
-
VideoTile_default
|
6
|
-
} from "./chunk-4BQ3AMVG.js";
|
7
|
-
import {
|
8
|
-
Box
|
9
|
-
} from "./chunk-4L5OKEIV.js";
|
10
|
-
import {
|
11
|
-
__spreadValues,
|
12
|
-
init_define_process_env
|
13
|
-
} from "./chunk-YDIB6WKJ.js";
|
14
|
-
|
15
|
-
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
16
|
-
init_define_process_env();
|
17
|
-
import React from "react";
|
18
|
-
var Grid = React.forwardRef(
|
19
|
-
({ tiles, edgeToEdge }, ref) => {
|
20
|
-
const videoTileProps = useVideoTileContext();
|
21
|
-
return /* @__PURE__ */ React.createElement(
|
22
|
-
Box,
|
23
|
-
{
|
24
|
-
ref,
|
25
|
-
css: {
|
26
|
-
flex: "1 1 0",
|
27
|
-
gap: "$4",
|
28
|
-
display: "flex",
|
29
|
-
placeContent: "center",
|
30
|
-
alignItems: "center",
|
31
|
-
justifyContent: "center",
|
32
|
-
flexFlow: "row wrap",
|
33
|
-
minHeight: 0,
|
34
|
-
"@md": { gap: edgeToEdge ? 0 : "$4" }
|
35
|
-
}
|
36
|
-
},
|
37
|
-
tiles == null ? void 0 : tiles.map((tile) => {
|
38
|
-
var _a, _b, _c, _d;
|
39
|
-
return /* @__PURE__ */ React.createElement(
|
40
|
-
VideoTile_default,
|
41
|
-
__spreadValues({
|
42
|
-
key: ((_a = tile.track) == null ? void 0 : _a.id) || ((_b = tile.peer) == null ? void 0 : _b.id),
|
43
|
-
width: tile.width,
|
44
|
-
height: tile.height,
|
45
|
-
peerId: (_c = tile.peer) == null ? void 0 : _c.id,
|
46
|
-
trackId: (_d = tile.track) == null ? void 0 : _d.id,
|
47
|
-
rootCSS: { padding: 0 },
|
48
|
-
objectFit: "contain"
|
49
|
-
}, videoTileProps)
|
50
|
-
);
|
51
|
-
})
|
52
|
-
);
|
53
|
-
}
|
54
|
-
);
|
55
|
-
|
56
|
-
export {
|
57
|
-
Grid
|
58
|
-
};
|
59
|
-
//# sourceMappingURL=chunk-KQXTIHI6.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/VideoLayouts/Grid.tsx"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';\nimport { Box } from '../../../Layout';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../VideoTile';\nimport { useVideoTileContext } from '../hooks/useVideoTileLayout';\n\nexport const Grid = React.forwardRef<HTMLDivElement, { tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean }>(\n ({ tiles, edgeToEdge }, ref) => {\n const videoTileProps = useVideoTileContext();\n return (\n <Box\n ref={ref}\n css={{\n flex: '1 1 0',\n gap: '$4',\n display: 'flex',\n placeContent: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n flexFlow: 'row wrap',\n minHeight: 0,\n '@md': { gap: edgeToEdge ? 0 : '$4' },\n }}\n >\n {tiles?.map(tile => {\n return (\n <VideoTile\n key={tile.track?.id || tile.peer?.id}\n width={tile.width}\n height={tile.height}\n peerId={tile.peer?.id}\n trackId={tile.track?.id}\n rootCSS={{ padding: 0 }}\n objectFit=\"contain\"\n {...videoTileProps}\n />\n );\n })}\n </Box>\n );\n },\n);\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA,OAAO,WAAW;AAOX,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC,EAAE,OAAO,WAAW,GAAG,QAAQ;AAC9B,UAAM,iBAAiB,oBAAoB;AAC3C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,KAAK;AAAA,UACH,MAAM;AAAA,UACN,KAAK;AAAA,UACL,SAAS;AAAA,UACT,cAAc;AAAA,UACd,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,UAAU;AAAA,UACV,WAAW;AAAA,UACX,OAAO,EAAE,KAAK,aAAa,IAAI,KAAK;AAAA,QACtC;AAAA;AAAA,MAEC,+BAAO,IAAI,UAAQ;AAzB5B;AA0BU,eACE;AAAA,UAAC;AAAA;AAAA,YACC,OAAK,UAAK,UAAL,mBAAY,SAAM,UAAK,SAAL,mBAAW;AAAA,YAClC,OAAO,KAAK;AAAA,YACZ,QAAQ,KAAK;AAAA,YACb,SAAQ,UAAK,SAAL,mBAAW;AAAA,YACnB,UAAS,UAAK,UAAL,mBAAY;AAAA,YACrB,SAAS,EAAE,SAAS,EAAE;AAAA,YACtB,WAAU;AAAA,aACN;AAAA,QACN;AAAA,MAEJ;AAAA,IACF;AAAA,EAEJ;AACF;",
|
6
|
-
"names": []
|
7
|
-
}
|