@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-P57IRMAR.js → HLSView-HNVYG5VE.js} +309 -151
- package/dist/HLSView-HNVYG5VE.js.map +7 -0
- package/dist/Prebuilt/App.d.ts +3 -0
- package/dist/Prebuilt/AppContext.d.ts +13 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
- package/dist/Prebuilt/components/Chat/ChatFooter.d.ts +7 -0
- package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
- package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
- package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +4 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
- package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +9 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +11 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +8 -0
- package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
- package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -0
- package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +6 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +15 -0
- package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +9 -0
- package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
- package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +13 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +13 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +9 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +7 -0
- package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
- package/dist/{VirtualBackground-GGCQJ5JM.js → VirtualBackground-UM2FOUHQ.js} +5 -11
- package/dist/VirtualBackground-UM2FOUHQ.js.map +7 -0
- package/dist/{chunk-P5X32KOD.js → chunk-364HP22I.js} +8 -5
- package/dist/chunk-364HP22I.js.map +7 -0
- package/dist/{chunk-OSM4QEQG.js → chunk-LYSAET4G.js} +3742 -5462
- package/dist/chunk-LYSAET4G.js.map +7 -0
- package/dist/chunk-POE7H4IE.js +898 -0
- package/dist/chunk-POE7H4IE.js.map +7 -0
- package/dist/conference-UWLJHMB2.js +5727 -0
- package/dist/conference-UWLJHMB2.js.map +7 -0
- package/dist/index.cjs.js +9655 -15326
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2513 -3456
- package/dist/meta.esbuild.json +2807 -3838
- package/package.json +8 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +58 -53
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +11 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +16 -11
- package/src/Prebuilt/common/constants.js +4 -114
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +1 -9
- package/src/Prebuilt/components/AppData/AppData.jsx +11 -15
- package/src/Prebuilt/components/AppData/useUISettings.js +6 -10
- package/src/Prebuilt/components/AudioVideoToggle.jsx +10 -2
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +75 -27
- package/src/Prebuilt/components/Chat/ChatBody.jsx +95 -36
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +199 -0
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +84 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
- package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
- package/src/Prebuilt/components/Connection/TileConnection.tsx +71 -0
- package/src/Prebuilt/components/EmojiReaction.jsx +19 -22
- package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +13 -9
- package/src/Prebuilt/components/Footer/Footer.tsx +98 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +187 -179
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +94 -0
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
- package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +3 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +63 -18
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
- package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
- package/src/Prebuilt/components/Header/{StreamActions.jsx → StreamActions.tsx} +54 -67
- package/src/Prebuilt/components/Header/common.jsx +5 -2
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +23 -4
- package/src/Prebuilt/components/InsetTile.tsx +128 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +67 -25
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +18 -11
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +36 -0
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +66 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +20 -6
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +43 -18
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +16 -7
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +216 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +107 -45
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +46 -30
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/Pagination.tsx +60 -0
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +16 -15
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +16 -8
- package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +48 -22
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.tsx +119 -0
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +43 -36
- package/src/Prebuilt/components/SecondaryTiles.tsx +36 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +16 -17
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +33 -27
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +58 -15
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +65 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +43 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +110 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +74 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +59 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +52 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +10 -0
- package/src/Prebuilt/components/VideoTile.jsx +116 -74
- package/src/Prebuilt/components/conference.jsx +86 -85
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -3
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +127 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +26 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
- package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
- package/src/Prebuilt/images/empty-chat.svg +12 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +17 -50
- package/src/Prebuilt/layouts/HLSView.jsx +138 -51
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +108 -0
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +96 -0
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
- package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
- package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
- package/src/Prebuilt/services/FeatureFlags.jsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +1 -0
- package/dist/HLSView-P57IRMAR.js.map +0 -7
- package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
- package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
- package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
- package/dist/chunk-IVTWKQI3.js +0 -827
- package/dist/chunk-IVTWKQI3.js.map +0 -7
- package/dist/chunk-OSM4QEQG.js.map +0 -7
- package/dist/chunk-P5X32KOD.js.map +0 -7
- package/dist/chunk-RVCZPPTL.js +0 -1100
- package/dist/chunk-RVCZPPTL.js.map +0 -7
- package/dist/conference-P6I6ESVF.js +0 -8995
- package/dist/conference-P6I6ESVF.js.map +0 -7
- package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +0 -150
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -39
- package/src/Prebuilt/components/EqualProminence.jsx +0 -180
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
- package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
- package/src/Prebuilt/components/Header/Header.jsx +0 -8
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
- package/src/Prebuilt/components/LeaveCard.jsx +0 -19
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +0 -219
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/Pagination.jsx +0 -29
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +0 -26
- package/src/Prebuilt/components/VideoList.jsx +0 -73
- package/src/Prebuilt/components/gridView.jsx +0 -85
- package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
- package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
- package/src/Prebuilt/images/Logo.svg +0 -8
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
- package/src/Prebuilt/layouts/InsetView.jsx +0 -260
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
- package/src/Prebuilt/layouts/SidePane.jsx +0 -52
- package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
- package/src/Prebuilt/layouts/mainView.jsx +0 -141
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
- /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
- /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
- /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
- /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
@@ -1,17 +1,17 @@
|
|
1
1
|
import {
|
2
|
+
APP_DATA,
|
2
3
|
Button,
|
3
4
|
Dialog,
|
4
5
|
DialogContent,
|
5
6
|
DialogRow,
|
6
7
|
Dropdown,
|
8
|
+
EMOJI_REACTION_TYPE,
|
7
9
|
Slider,
|
8
10
|
ToastManager,
|
9
11
|
useTheme
|
10
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-LYSAET4G.js";
|
11
13
|
import {
|
12
|
-
APP_DATA,
|
13
14
|
Box,
|
14
|
-
EMOJI_REACTION_TYPE,
|
15
15
|
Flex,
|
16
16
|
IconButton,
|
17
17
|
IconButton_default,
|
@@ -20,21 +20,20 @@ import {
|
|
20
20
|
Tooltip,
|
21
21
|
__async,
|
22
22
|
__objRest,
|
23
|
-
|
23
|
+
__spreadValues,
|
24
|
+
config,
|
24
25
|
styled
|
25
|
-
} from "./chunk-
|
26
|
+
} from "./chunk-POE7H4IE.js";
|
26
27
|
|
27
28
|
// src/Prebuilt/layouts/HLSView.jsx
|
28
|
-
|
29
|
-
import
|
30
|
-
import { useFullscreen, useToggle } from "react-use";
|
29
|
+
import React10, { useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState4 } from "react";
|
30
|
+
import { useFullscreen, useMedia, useToggle } from "react-use";
|
31
31
|
import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents as HMSHLSPlayerEvents2 } from "@100mslive/hls-player";
|
32
32
|
import screenfull from "screenfull";
|
33
33
|
import { selectAppData, selectHLSState, useHMSActions, useHMSStore } from "@100mslive/react-sdk";
|
34
|
-
import { ExpandIcon, ShrinkIcon } from "@100mslive/react-icons";
|
34
|
+
import { ColoredHandIcon, ExpandIcon, RadioIcon, ShrinkIcon } from "@100mslive/react-icons";
|
35
35
|
|
36
36
|
// src/Prebuilt/components/HlsStatsOverlay.jsx
|
37
|
-
init_define_process_env();
|
38
37
|
import React, { memo } from "react";
|
39
38
|
import { CloseIcon } from "@100mslive/react-icons";
|
40
39
|
function HlsStatsOverlay({ hlsStatsState, onClose }) {
|
@@ -114,14 +113,11 @@ var HlsStatsRow = memo(({ label, children }) => {
|
|
114
113
|
));
|
115
114
|
});
|
116
115
|
|
117
|
-
// src/Prebuilt/components/HMSVideo/index.js
|
118
|
-
init_define_process_env();
|
119
|
-
|
120
116
|
// src/Prebuilt/components/HMSVideo/Controls.jsx
|
121
|
-
init_define_process_env();
|
122
117
|
var VideoControls = styled(Flex, {
|
123
118
|
justifyContent: "center",
|
124
119
|
alignItems: "center",
|
120
|
+
alignSelf: "stretch",
|
125
121
|
width: "100%",
|
126
122
|
gap: "$2"
|
127
123
|
});
|
@@ -129,36 +125,33 @@ var LeftControls = styled(Flex, {
|
|
129
125
|
justifyContent: "flex-start",
|
130
126
|
alignItems: "center",
|
131
127
|
width: "100%",
|
132
|
-
gap: "$
|
128
|
+
gap: "$4"
|
133
129
|
});
|
134
130
|
var RightControls = styled(Flex, {
|
135
131
|
justifyContent: "flex-end",
|
136
132
|
alignItems: "center",
|
137
133
|
width: "100%",
|
138
|
-
gap: "$
|
134
|
+
gap: "$4"
|
139
135
|
});
|
140
136
|
|
141
137
|
// src/Prebuilt/components/HMSVideo/HMSVideo.jsx
|
142
|
-
init_define_process_env();
|
143
138
|
import React2, { forwardRef } from "react";
|
144
|
-
var HMSVideo = forwardRef((
|
145
|
-
|
139
|
+
var HMSVideo = forwardRef((_a, videoRef) => {
|
140
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
141
|
+
return /* @__PURE__ */ React2.createElement(Flex, __spreadValues({ "data-testid": "hms-video", css: { size: "100%", position: "relative" }, direction: "column" }, props), /* @__PURE__ */ React2.createElement("video", { style: { flex: "1 1 0", margin: "0 auto", minHeight: "0" }, ref: videoRef, playsInline: true }), children);
|
146
142
|
});
|
147
143
|
|
148
144
|
// src/Prebuilt/components/HMSVideo/PlayButton.jsx
|
149
|
-
init_define_process_env();
|
150
145
|
import React3 from "react";
|
151
146
|
import { PauseIcon, PlayIcon } from "@100mslive/react-icons";
|
152
147
|
var PlayButton = ({ onClick, isPaused }) => {
|
153
|
-
return /* @__PURE__ */ React3.createElement(Tooltip, { title: isPaused ? "Play" : "Pause", side: "top" }, /* @__PURE__ */ React3.createElement(IconButton, { onClick, "data-testid": "play_pause_btn" }, isPaused ? /* @__PURE__ */ React3.createElement(PlayIcon, { width:
|
148
|
+
return /* @__PURE__ */ React3.createElement(Tooltip, { title: isPaused ? "Play" : "Pause", side: "top" }, /* @__PURE__ */ React3.createElement(IconButton, { onClick, "data-testid": "play_pause_btn" }, isPaused ? /* @__PURE__ */ React3.createElement(PlayIcon, { width: 20, height: 20 }) : /* @__PURE__ */ React3.createElement(PauseIcon, { width: 20, height: 20 })));
|
154
149
|
};
|
155
150
|
|
156
151
|
// src/Prebuilt/components/HMSVideo/VideoProgress.jsx
|
157
|
-
init_define_process_env();
|
158
152
|
import React4, { useEffect, useRef, useState } from "react";
|
159
153
|
|
160
154
|
// src/Prebuilt/components/HMSVideo/HMSVIdeoUtils.js
|
161
|
-
init_define_process_env();
|
162
155
|
function getPercentage(a, b) {
|
163
156
|
return a / b * 100;
|
164
157
|
}
|
@@ -218,7 +211,7 @@ var VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
|
218
211
|
Flex,
|
219
212
|
{
|
220
213
|
ref: progressRootRef,
|
221
|
-
css: {
|
214
|
+
css: { cursor: "pointer", h: "$4", alignSelf: "stretch" },
|
222
215
|
onClick: onProgressChangeHandler
|
223
216
|
},
|
224
217
|
/* @__PURE__ */ React4.createElement(
|
@@ -228,8 +221,7 @@ var VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
|
228
221
|
css: {
|
229
222
|
display: "inline",
|
230
223
|
width: `${videoProgress}%`,
|
231
|
-
background: "$primary_default"
|
232
|
-
height: "0.3rem"
|
224
|
+
background: "$primary_default"
|
233
225
|
}
|
234
226
|
}
|
235
227
|
),
|
@@ -239,8 +231,8 @@ var VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
|
239
231
|
id: "video-buffer",
|
240
232
|
css: {
|
241
233
|
width: `${bufferProgress - videoProgress}%`,
|
242
|
-
background: "$
|
243
|
-
|
234
|
+
background: "$on_surface_high",
|
235
|
+
opacity: "25%"
|
244
236
|
}
|
245
237
|
}
|
246
238
|
),
|
@@ -250,8 +242,8 @@ var VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
|
250
242
|
id: "video-rest",
|
251
243
|
css: {
|
252
244
|
width: `${100 - bufferProgress}%`,
|
253
|
-
background: "$
|
254
|
-
|
245
|
+
background: "$on_surface_high",
|
246
|
+
opacity: "10%"
|
255
247
|
}
|
256
248
|
}
|
257
249
|
)
|
@@ -259,7 +251,6 @@ var VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
|
259
251
|
};
|
260
252
|
|
261
253
|
// src/Prebuilt/components/HMSVideo/VideoTime.jsx
|
262
|
-
init_define_process_env();
|
263
254
|
import React5, { useEffect as useEffect2, useState as useState2 } from "react";
|
264
255
|
import { HMSHLSPlayerEvents } from "@100mslive/hls-player";
|
265
256
|
var VideoTime = ({ hlsPlayer: hlsPlayer2 }) => {
|
@@ -279,10 +270,10 @@ var VideoTime = ({ hlsPlayer: hlsPlayer2 }) => {
|
|
279
270
|
Text,
|
280
271
|
{
|
281
272
|
css: {
|
282
|
-
minWidth: "$16"
|
283
|
-
|
284
|
-
|
285
|
-
|
273
|
+
minWidth: "$16",
|
274
|
+
c: "$on_surface_medium",
|
275
|
+
display: "flex",
|
276
|
+
justifyContent: "center"
|
286
277
|
}
|
287
278
|
},
|
288
279
|
videoTime
|
@@ -290,44 +281,72 @@ var VideoTime = ({ hlsPlayer: hlsPlayer2 }) => {
|
|
290
281
|
};
|
291
282
|
|
292
283
|
// src/Prebuilt/components/HMSVideo/VolumeControl.jsx
|
293
|
-
init_define_process_env();
|
294
284
|
import React6, { useState as useState3 } from "react";
|
295
|
-
import {
|
285
|
+
import { VolumeOneIcon, VolumeTwoIcon, VolumeZeroIcon } from "@100mslive/react-icons";
|
296
286
|
var VolumeControl = ({ hlsPlayer: hlsPlayer2 }) => {
|
297
287
|
var _a;
|
298
288
|
const [volume, setVolume] = useState3((_a = hlsPlayer2 == null ? void 0 : hlsPlayer2.volume) != null ? _a : 100);
|
299
|
-
|
300
|
-
|
289
|
+
const [showSlider, setShowSlider] = useState3(false);
|
290
|
+
return /* @__PURE__ */ React6.createElement(
|
291
|
+
Flex,
|
301
292
|
{
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
293
|
+
align: "center",
|
294
|
+
css: { color: "$on_surface_high" },
|
295
|
+
onMouseOver: (event) => {
|
296
|
+
event.stopPropagation();
|
297
|
+
setShowSlider(true);
|
298
|
+
},
|
299
|
+
onMouseLeave: (event) => {
|
300
|
+
event.stopPropagation();
|
301
|
+
setShowSlider(false);
|
302
|
+
}
|
303
|
+
},
|
304
|
+
/* @__PURE__ */ React6.createElement(
|
305
|
+
VolumeIcon,
|
306
|
+
{
|
307
|
+
volume,
|
308
|
+
onClick: () => {
|
309
|
+
if (volume > 0) {
|
310
|
+
setVolume(0);
|
311
|
+
hlsPlayer2 == null ? void 0 : hlsPlayer2.setVolume(0);
|
312
|
+
} else {
|
313
|
+
setVolume(100);
|
314
|
+
hlsPlayer2 == null ? void 0 : hlsPlayer2.setVolume(100);
|
315
|
+
}
|
307
316
|
}
|
308
317
|
}
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
318
|
+
),
|
319
|
+
/* @__PURE__ */ React6.createElement(
|
320
|
+
Slider,
|
321
|
+
{
|
322
|
+
css: {
|
323
|
+
mx: "$4",
|
324
|
+
w: "$20",
|
325
|
+
cursor: "pointer",
|
326
|
+
"@sm": { w: "$14" },
|
327
|
+
"@xs": { w: "$14" },
|
328
|
+
opacity: showSlider ? "1" : "0",
|
329
|
+
display: showSlider ? "" : "none",
|
330
|
+
transition: `all .2s ease .5s`
|
331
|
+
},
|
332
|
+
min: 0,
|
333
|
+
max: 100,
|
334
|
+
step: 1,
|
335
|
+
value: [volume],
|
336
|
+
onValueChange: (volume2) => {
|
337
|
+
hlsPlayer2.setVolume(volume2[0]);
|
338
|
+
setVolume(volume2[0]);
|
339
|
+
},
|
340
|
+
thumbStyles: { w: "$6", h: "$6" }
|
341
|
+
}
|
342
|
+
)
|
343
|
+
);
|
344
|
+
};
|
345
|
+
var VolumeIcon = ({ volume, onClick }) => {
|
346
|
+
if (volume === 0) {
|
347
|
+
return /* @__PURE__ */ React6.createElement(VolumeZeroIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick });
|
348
|
+
}
|
349
|
+
return volume < 50 ? /* @__PURE__ */ React6.createElement(VolumeOneIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick }) : /* @__PURE__ */ React6.createElement(VolumeTwoIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick });
|
331
350
|
};
|
332
351
|
|
333
352
|
// src/Prebuilt/components/HMSVideo/index.js
|
@@ -345,7 +364,6 @@ var HMSVideoPlayer = {
|
|
345
364
|
};
|
346
365
|
|
347
366
|
// src/Prebuilt/components/HMSVideo/FullscreenButton.jsx
|
348
|
-
init_define_process_env();
|
349
367
|
import React7 from "react";
|
350
368
|
var FullScreenButton = ({ isFullScreen, icon, onToggle }) => {
|
351
369
|
return /* @__PURE__ */ React7.createElement(Tooltip, { title: `${isFullScreen ? "Exit" : "Go"} fullscreen`, side: "top" }, /* @__PURE__ */ React7.createElement(
|
@@ -362,7 +380,6 @@ var FullScreenButton = ({ isFullScreen, icon, onToggle }) => {
|
|
362
380
|
};
|
363
381
|
|
364
382
|
// src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx
|
365
|
-
init_define_process_env();
|
366
383
|
import React8 from "react";
|
367
384
|
function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
368
385
|
return /* @__PURE__ */ React8.createElement(
|
@@ -389,12 +406,10 @@ function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
|
389
406
|
}
|
390
407
|
|
391
408
|
// src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx
|
392
|
-
|
393
|
-
import
|
394
|
-
|
395
|
-
|
396
|
-
const [qualityDropDownOpen, setQualityDropDownOpen] = useState4(false);
|
397
|
-
return /* @__PURE__ */ React9.createElement(Dropdown.Root, { open: qualityDropDownOpen, onOpenChange: (value) => setQualityDropDownOpen(value) }, /* @__PURE__ */ React9.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "quality_selector" }, /* @__PURE__ */ React9.createElement(
|
409
|
+
import React9 from "react";
|
410
|
+
import { CheckIcon, SettingsIcon } from "@100mslive/react-icons";
|
411
|
+
function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection, isAuto }) {
|
412
|
+
return /* @__PURE__ */ React9.createElement(Dropdown.Root, { open, onOpenChange: (value) => onOpen(value) }, /* @__PURE__ */ React9.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "quality_selector" }, /* @__PURE__ */ React9.createElement(
|
398
413
|
Flex,
|
399
414
|
{
|
400
415
|
css: {
|
@@ -411,7 +426,8 @@ function HLSQualitySelector({ layers, onQualityChange, selection, isAuto }) {
|
|
411
426
|
w: "$9",
|
412
427
|
h: "$9",
|
413
428
|
display: "inline-flex",
|
414
|
-
alignItems: "center"
|
429
|
+
alignItems: "center",
|
430
|
+
c: "$on_surface_high"
|
415
431
|
}
|
416
432
|
},
|
417
433
|
/* @__PURE__ */ React9.createElement(SettingsIcon, null)
|
@@ -423,7 +439,7 @@ function HLSQualitySelector({ layers, onQualityChange, selection, isAuto }) {
|
|
423
439
|
"@sm": "xs",
|
424
440
|
"@xs": "tiny"
|
425
441
|
},
|
426
|
-
css: { display: "flex", alignItems: "center", ml: "$2" }
|
442
|
+
css: { display: "flex", alignItems: "center", ml: "$2", c: "$on_surface_medium" }
|
427
443
|
},
|
428
444
|
isAuto && /* @__PURE__ */ React9.createElement(React9.Fragment, null, "Auto", /* @__PURE__ */ React9.createElement(
|
429
445
|
Box,
|
@@ -432,7 +448,7 @@ function HLSQualitySelector({ layers, onQualityChange, selection, isAuto }) {
|
|
432
448
|
mx: "$2",
|
433
449
|
w: "$2",
|
434
450
|
h: "$2",
|
435
|
-
background: "$
|
451
|
+
background: "$on_surface_medium",
|
436
452
|
r: "$1"
|
437
453
|
}
|
438
454
|
}
|
@@ -440,11 +456,64 @@ function HLSQualitySelector({ layers, onQualityChange, selection, isAuto }) {
|
|
440
456
|
selection && Math.min(selection.width, selection.height),
|
441
457
|
"p"
|
442
458
|
)))
|
443
|
-
)), layers.length > 0 && /* @__PURE__ */ React9.createElement(
|
444
|
-
|
445
|
-
|
459
|
+
)), layers.length > 0 && /* @__PURE__ */ React9.createElement(
|
460
|
+
Dropdown.Content,
|
461
|
+
{
|
462
|
+
sideOffset: 5,
|
463
|
+
align: "end",
|
464
|
+
css: {
|
465
|
+
height: "auto",
|
466
|
+
maxHeight: "$52",
|
467
|
+
w: "$40",
|
468
|
+
bg: "$surface_bright",
|
469
|
+
py: "$4",
|
470
|
+
gap: "$4",
|
471
|
+
display: "grid"
|
472
|
+
}
|
473
|
+
},
|
474
|
+
layers.map((layer) => {
|
475
|
+
return /* @__PURE__ */ React9.createElement(
|
476
|
+
Dropdown.Item,
|
477
|
+
{
|
478
|
+
onClick: () => onQualityChange(layer),
|
479
|
+
key: layer.width,
|
480
|
+
css: {
|
481
|
+
bg: !isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) ? "$surface_default" : "$surface_bright",
|
482
|
+
"&:hover": {
|
483
|
+
bg: "$surface_brighter"
|
484
|
+
},
|
485
|
+
p: "$2 $4 $2 $8",
|
486
|
+
h: "$12",
|
487
|
+
gap: "$2"
|
488
|
+
}
|
489
|
+
},
|
490
|
+
/* @__PURE__ */ React9.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold" } }, getQualityText(layer)),
|
491
|
+
/* @__PURE__ */ React9.createElement(Text, { variant: "caption", css: { flex: "1 1 0", c: "$on_surface_low", pl: "$2" } }, getBitrateText(layer)),
|
492
|
+
!isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) && /* @__PURE__ */ React9.createElement(CheckIcon, { width: "16px", height: "16px" })
|
493
|
+
);
|
494
|
+
}),
|
495
|
+
/* @__PURE__ */ React9.createElement(
|
496
|
+
Dropdown.Item,
|
497
|
+
{
|
498
|
+
onClick: () => onQualityChange({ height: "auto" }),
|
499
|
+
key: "auto",
|
500
|
+
css: {
|
501
|
+
bg: !isAuto ? "$surface_bright" : "$surface_default",
|
502
|
+
"&:hover": {
|
503
|
+
bg: "$surface_brighter"
|
504
|
+
},
|
505
|
+
p: "$2 $4 $2 $8",
|
506
|
+
h: "$12",
|
507
|
+
gap: "$2"
|
508
|
+
}
|
509
|
+
},
|
510
|
+
/* @__PURE__ */ React9.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", flex: "1 1 0" } }, "Auto"),
|
511
|
+
isAuto && /* @__PURE__ */ React9.createElement(CheckIcon, { width: "16px", height: "16px" })
|
512
|
+
)
|
513
|
+
));
|
446
514
|
}
|
447
|
-
var getQualityText = (layer) => `${Math.min(layer.height, layer.width)}p
|
515
|
+
var getQualityText = (layer) => `${Math.min(layer.height, layer.width)}p `;
|
516
|
+
var getBitrateText = (layer) => `(${(Number(layer.bitrate / 1e3) / 1e3).toFixed(2)} Mbps)`;
|
448
517
|
|
449
518
|
// src/Prebuilt/layouts/HLSView.jsx
|
450
519
|
var hlsPlayer;
|
@@ -455,21 +524,27 @@ var HLSView = () => {
|
|
455
524
|
const hlsState = useHMSStore(selectHLSState);
|
456
525
|
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
457
526
|
const hmsActions = useHMSActions();
|
458
|
-
const { themeType } = useTheme();
|
459
|
-
|
527
|
+
const { themeType, theme } = useTheme();
|
528
|
+
const [streamEnded, setStreamEnded] = useState4(false);
|
529
|
+
let [hlsStatsState, setHlsStatsState] = useState4(null);
|
460
530
|
const hlsUrl = (_a = hlsState.variants[0]) == null ? void 0 : _a.url;
|
461
|
-
const [availableLayers, setAvailableLayers] =
|
462
|
-
const [isVideoLive, setIsVideoLive] =
|
463
|
-
const [isUserSelectedAuto, setIsUserSelectedAuto] =
|
464
|
-
const [currentSelectedQuality, setCurrentSelectedQuality] =
|
465
|
-
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] =
|
466
|
-
const [isPaused, setIsPaused] =
|
531
|
+
const [availableLayers, setAvailableLayers] = useState4([]);
|
532
|
+
const [isVideoLive, setIsVideoLive] = useState4(true);
|
533
|
+
const [isUserSelectedAuto, setIsUserSelectedAuto] = useState4(true);
|
534
|
+
const [currentSelectedQuality, setCurrentSelectedQuality] = useState4(null);
|
535
|
+
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState4(false);
|
536
|
+
const [isPaused, setIsPaused] = useState4(false);
|
467
537
|
const isFullScreenSupported = screenfull.isEnabled;
|
468
538
|
const [show, toggle] = useToggle(false);
|
539
|
+
const [controlsVisible, setControlsVisible] = useState4(true);
|
540
|
+
const controlsRef = useRef2();
|
541
|
+
const controlsTimerRef = useRef2();
|
542
|
+
const [qualityDropDownOpen, setQualityDropDownOpen] = useState4(false);
|
543
|
+
const isMobile = useMedia(config.media.md);
|
469
544
|
const isFullScreen = useFullscreen(hlsViewRef, show, {
|
470
545
|
onClose: () => toggle(false)
|
471
546
|
});
|
472
|
-
const [showLoader, setShowLoader] =
|
547
|
+
const [showLoader, setShowLoader] = useState4(false);
|
473
548
|
useEffect3(() => {
|
474
549
|
const videoEl = videoRef.current;
|
475
550
|
const showLoader2 = () => setShowLoader(true);
|
@@ -481,6 +556,17 @@ var HLSView = () => {
|
|
481
556
|
videoEl == null ? void 0 : videoEl.removeEventListener("waiting", showLoader2);
|
482
557
|
};
|
483
558
|
}, []);
|
559
|
+
useEffect3(() => {
|
560
|
+
const videoElem = videoRef.current;
|
561
|
+
const setStreamEndedCallback = () => {
|
562
|
+
setStreamEnded(true);
|
563
|
+
videoElem == null ? void 0 : videoElem.removeEventListener("ended", setStreamEndedCallback);
|
564
|
+
};
|
565
|
+
videoElem == null ? void 0 : videoElem.addEventListener("ended", setStreamEndedCallback);
|
566
|
+
return () => {
|
567
|
+
videoElem == null ? void 0 : videoElem.removeEventListener("ended", setStreamEndedCallback);
|
568
|
+
};
|
569
|
+
}, [hlsUrl]);
|
484
570
|
useEffect3(() => {
|
485
571
|
let videoEl = videoRef.current;
|
486
572
|
const manifestLoadedHandler = ({ layers }) => {
|
@@ -491,6 +577,7 @@ var HLSView = () => {
|
|
491
577
|
};
|
492
578
|
const metadataLoadedHandler = (_a2) => {
|
493
579
|
var _b = _a2, { payload } = _b, rest = __objRest(_b, ["payload"]);
|
580
|
+
var _a3;
|
494
581
|
const parsePayload = (str) => {
|
495
582
|
try {
|
496
583
|
return JSON.parse(str);
|
@@ -502,7 +589,7 @@ var HLSView = () => {
|
|
502
589
|
const parsedPayload = parsePayload(payload);
|
503
590
|
switch (parsedPayload.type) {
|
504
591
|
case EMOJI_REACTION_TYPE:
|
505
|
-
window.showFlyingEmoji(parsedPayload == null ? void 0 : parsedPayload.emojiId, parsedPayload == null ? void 0 : parsedPayload.senderId);
|
592
|
+
(_a3 = window.showFlyingEmoji) == null ? void 0 : _a3.call(window, { emojiId: parsedPayload == null ? void 0 : parsedPayload.emojiId, senderId: parsedPayload == null ? void 0 : parsedPayload.senderId });
|
506
593
|
break;
|
507
594
|
default: {
|
508
595
|
const toast = {
|
@@ -577,6 +664,41 @@ var HLSView = () => {
|
|
577
664
|
const sfnOverlayClose = () => {
|
578
665
|
hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);
|
579
666
|
};
|
667
|
+
useEffect3(() => {
|
668
|
+
if (controlsVisible && isFullScreen && !qualityDropDownOpen) {
|
669
|
+
if (controlsTimerRef.current) {
|
670
|
+
clearTimeout(controlsTimerRef.current);
|
671
|
+
}
|
672
|
+
controlsTimerRef.current = setTimeout(() => {
|
673
|
+
setControlsVisible(false);
|
674
|
+
}, 5e3);
|
675
|
+
}
|
676
|
+
if (!isFullScreen && controlsTimerRef.current) {
|
677
|
+
clearTimeout(controlsTimerRef.current);
|
678
|
+
}
|
679
|
+
return () => {
|
680
|
+
if (controlsTimerRef.current) {
|
681
|
+
clearTimeout(controlsTimerRef.current);
|
682
|
+
}
|
683
|
+
};
|
684
|
+
}, [controlsVisible, isFullScreen, qualityDropDownOpen]);
|
685
|
+
const onHoverHandler = useCallback(
|
686
|
+
(event) => {
|
687
|
+
if (event.type === "mouseenter" || qualityDropDownOpen) {
|
688
|
+
setControlsVisible(true);
|
689
|
+
return;
|
690
|
+
}
|
691
|
+
if (event.type === "mouseleave") {
|
692
|
+
setControlsVisible(false);
|
693
|
+
} else if (isFullScreen && !controlsVisible && event.type === "mousemove") {
|
694
|
+
setControlsVisible(true);
|
695
|
+
if (controlsTimerRef.current) {
|
696
|
+
clearTimeout(controlsTimerRef.current);
|
697
|
+
}
|
698
|
+
}
|
699
|
+
},
|
700
|
+
[controlsVisible, isFullScreen, qualityDropDownOpen]
|
701
|
+
);
|
580
702
|
return /* @__PURE__ */ React10.createElement(
|
581
703
|
Flex,
|
582
704
|
{
|
@@ -588,7 +710,7 @@ var HLSView = () => {
|
|
588
710
|
}
|
589
711
|
},
|
590
712
|
(hlsStatsState == null ? void 0 : hlsStatsState.url) && enablHlsStats ? /* @__PURE__ */ React10.createElement(HlsStatsOverlay, { hlsStatsState, onClose: sfnOverlayClose }) : null,
|
591
|
-
hlsUrl &&
|
713
|
+
hlsUrl && !streamEnded ? /* @__PURE__ */ React10.createElement(
|
592
714
|
Flex,
|
593
715
|
{
|
594
716
|
id: "hls-player-container",
|
@@ -612,74 +734,110 @@ var HLSView = () => {
|
|
612
734
|
},
|
613
735
|
/* @__PURE__ */ React10.createElement(Loading, { width: 72, height: 72 })
|
614
736
|
),
|
615
|
-
/* @__PURE__ */ React10.createElement(
|
616
|
-
HMSVideoPlayer.
|
617
|
-
{
|
618
|
-
onValueChange: (currentTime) => {
|
619
|
-
hlsPlayer.seekTo(currentTime);
|
620
|
-
},
|
621
|
-
hlsPlayer
|
622
|
-
}
|
623
|
-
), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Controls.Root, { css: { p: "$4 $8" } }, /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Controls.Left, null, /* @__PURE__ */ React10.createElement(
|
624
|
-
HMSVideoPlayer.PlayButton,
|
625
|
-
{
|
626
|
-
onClick: () => __async(void 0, null, function* () {
|
627
|
-
isPaused ? yield hlsPlayer == null ? void 0 : hlsPlayer.play() : hlsPlayer == null ? void 0 : hlsPlayer.pause();
|
628
|
-
}),
|
629
|
-
isPaused
|
630
|
-
}
|
631
|
-
), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Duration, { hlsPlayer }), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Volume, { hlsPlayer })), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Controls.Right, null, availableLayers.length > 0 ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
632
|
-
IconButton,
|
737
|
+
/* @__PURE__ */ React10.createElement(
|
738
|
+
HMSVideoPlayer.Root,
|
633
739
|
{
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
setIsVideoLive(true);
|
639
|
-
}),
|
640
|
-
key: "jump-to-live_btn",
|
641
|
-
"data-testid": "jump-to-live_btn"
|
740
|
+
ref: videoRef,
|
741
|
+
onMouseEnter: onHoverHandler,
|
742
|
+
onMouseMove: onHoverHandler,
|
743
|
+
onMouseLeave: onHoverHandler
|
642
744
|
},
|
643
|
-
/* @__PURE__ */ React10.createElement(
|
644
|
-
|
745
|
+
/* @__PURE__ */ React10.createElement(
|
746
|
+
Flex,
|
645
747
|
{
|
748
|
+
ref: controlsRef,
|
749
|
+
direction: "column",
|
750
|
+
justify: "flex-end",
|
751
|
+
align: "flex-start",
|
646
752
|
css: {
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
"@sm": "xs"
|
753
|
+
position: "absolute",
|
754
|
+
bottom: "0",
|
755
|
+
left: "0",
|
756
|
+
background: `linear-gradient(180deg, ${theme.colors.background_dim.value}00 29.46%, ${theme.colors.background_dim.value}A3 100%);`,
|
757
|
+
width: "100%",
|
758
|
+
pt: "$8",
|
759
|
+
flexShrink: 0,
|
760
|
+
transition: "visibility 0s 0.5s, opacity 0.5s linear",
|
761
|
+
visibility: controlsVisible ? `` : `hidden`,
|
762
|
+
opacity: controlsVisible ? `1` : "0"
|
658
763
|
}
|
659
764
|
},
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
765
|
+
!isMobile && /* @__PURE__ */ React10.createElement(
|
766
|
+
HMSVideoPlayer.Controls.Root,
|
767
|
+
{
|
768
|
+
css: {
|
769
|
+
p: "$4 $8"
|
770
|
+
}
|
771
|
+
},
|
772
|
+
/* @__PURE__ */ React10.createElement(HMSVideoPlayer.Controls.Left, null, /* @__PURE__ */ React10.createElement(
|
773
|
+
HMSVideoPlayer.PlayButton,
|
774
|
+
{
|
775
|
+
onClick: () => __async(void 0, null, function* () {
|
776
|
+
isPaused ? yield hlsPlayer == null ? void 0 : hlsPlayer.play() : hlsPlayer == null ? void 0 : hlsPlayer.pause();
|
777
|
+
}),
|
778
|
+
isPaused
|
779
|
+
}
|
780
|
+
), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Duration, { hlsPlayer }), /* @__PURE__ */ React10.createElement(HMSVideoPlayer.Volume, { hlsPlayer }), /* @__PURE__ */ React10.createElement(
|
781
|
+
IconButton,
|
782
|
+
{
|
783
|
+
variant: "standard",
|
784
|
+
css: { px: "$2" },
|
785
|
+
onClick: () => __async(void 0, null, function* () {
|
786
|
+
yield hlsPlayer.seekToLivePosition();
|
787
|
+
setIsVideoLive(true);
|
788
|
+
}),
|
789
|
+
key: "jump-to-live_btn",
|
790
|
+
"data-testid": "jump-to-live_btn"
|
791
|
+
},
|
792
|
+
/* @__PURE__ */ React10.createElement(Tooltip, { title: "Go to Live", side: "top" }, /* @__PURE__ */ React10.createElement(Flex, { justify: "center", gap: 2, align: "center" }, /* @__PURE__ */ React10.createElement(
|
793
|
+
Box,
|
794
|
+
{
|
795
|
+
css: {
|
796
|
+
height: "$4",
|
797
|
+
width: "$4",
|
798
|
+
background: isVideoLive ? "$alert_error_default" : "$on_primary_medium",
|
799
|
+
r: "$1"
|
800
|
+
}
|
801
|
+
}
|
802
|
+
), /* @__PURE__ */ React10.createElement(
|
803
|
+
Text,
|
804
|
+
{
|
805
|
+
variant: {
|
806
|
+
"@sm": "xs"
|
807
|
+
},
|
808
|
+
css: {
|
809
|
+
c: isVideoLive ? "$on_surface_high" : "$on_surface_medium"
|
810
|
+
}
|
811
|
+
},
|
812
|
+
isVideoLive ? "LIVE" : "GO LIVE"
|
813
|
+
)))
|
814
|
+
)),
|
815
|
+
/* @__PURE__ */ React10.createElement(HMSVideoPlayer.Controls.Right, null, availableLayers.length > 0 ? /* @__PURE__ */ React10.createElement(
|
816
|
+
HLSQualitySelector,
|
817
|
+
{
|
818
|
+
layers: availableLayers,
|
819
|
+
onOpen: setQualityDropDownOpen,
|
820
|
+
open: qualityDropDownOpen,
|
821
|
+
selection: currentSelectedQuality,
|
822
|
+
onQualityChange: handleQuality,
|
823
|
+
isAuto: isUserSelectedAuto
|
824
|
+
}
|
825
|
+
) : null, isFullScreenSupported ? /* @__PURE__ */ React10.createElement(
|
826
|
+
FullScreenButton,
|
827
|
+
{
|
828
|
+
isFullScreen,
|
829
|
+
onToggle: toggle,
|
830
|
+
icon: isFullScreen ? /* @__PURE__ */ React10.createElement(ShrinkIcon, null) : /* @__PURE__ */ React10.createElement(ExpandIcon, null)
|
831
|
+
}
|
832
|
+
) : null)
|
833
|
+
)
|
834
|
+
)
|
835
|
+
)
|
836
|
+
) : /* @__PURE__ */ React10.createElement(Flex, { align: "center", justify: "center", direction: "column", css: { size: "100%", px: "$10" } }, /* @__PURE__ */ React10.createElement(Flex, { css: { c: "$on_surface_high", r: "$round", bg: "$surface_default", p: "$2" } }, streamEnded ? /* @__PURE__ */ React10.createElement(ColoredHandIcon, { height: 56, width: 56 }) : /* @__PURE__ */ React10.createElement(RadioIcon, { height: 56, width: 56 })), /* @__PURE__ */ React10.createElement(Text, { variant: "h5", css: { c: "$on_surface_high", mt: "$10", mb: 0, textAlign: "center" } }, streamEnded ? "Stream has ended" : "Stream yet to start"), /* @__PURE__ */ React10.createElement(Text, { variant: "md", css: { textAlign: "center", mt: "$4", c: "$on_surface_medium" } }, streamEnded ? "Have a nice day!" : "Sit back and relax"))
|
679
837
|
);
|
680
838
|
};
|
681
839
|
var HLSView_default = HLSView;
|
682
840
|
export {
|
683
841
|
HLSView_default as default
|
684
842
|
};
|
685
|
-
//# sourceMappingURL=HLSView-
|
843
|
+
//# sourceMappingURL=HLSView-HNVYG5VE.js.map
|