@100mslive/roomkit-react 0.3.20 → 0.3.21-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/README.md +6 -6
  2. package/dist/{HLSView-E242LM6X.css → HLSView-3CVLSXRH.css} +3 -3
  3. package/dist/{HLSView-E242LM6X.css.map → HLSView-3CVLSXRH.css.map} +1 -1
  4. package/dist/{HLSView-6QAHWMQF.js → HLSView-3JERKVTE.js} +63 -47
  5. package/dist/HLSView-3JERKVTE.js.map +7 -0
  6. package/dist/Prebuilt/AppContext.d.ts +1 -1
  7. package/dist/Prebuilt/components/AuthToken.d.ts +1 -1
  8. package/dist/Prebuilt/components/VirtualBackground/VBHandler.d.ts +1 -0
  9. package/dist/Prebuilt/components/peerTileUtils.d.ts +7 -0
  10. package/dist/{chunk-ACEDLM3B.js → chunk-J5FLGI2T.js} +541 -510
  11. package/dist/chunk-J5FLGI2T.js.map +7 -0
  12. package/dist/index.cjs.css +2 -2
  13. package/dist/index.cjs.css.map +1 -1
  14. package/dist/index.cjs.js +608 -561
  15. package/dist/index.cjs.js.map +4 -4
  16. package/dist/index.css +2 -2
  17. package/dist/index.css.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/meta.cjs.json +89 -69
  20. package/dist/meta.esbuild.json +101 -81
  21. package/package.json +7 -7
  22. package/src/Prebuilt/App.tsx +5 -5
  23. package/src/Prebuilt/AppContext.tsx +1 -1
  24. package/src/Prebuilt/components/AuthToken.tsx +1 -1
  25. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +24 -4
  26. package/src/Prebuilt/components/Header/common.jsx +5 -3
  27. package/src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx +13 -3
  28. package/src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx +1 -1
  29. package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +1 -1
  30. package/src/Prebuilt/components/ScreenshareTile.tsx +2 -2
  31. package/src/Prebuilt/components/Settings/SettingsModal.jsx +1 -2
  32. package/src/Prebuilt/components/TileMenu/TileMenu.tsx +7 -6
  33. package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +3 -3
  34. package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +4 -2
  35. package/src/Prebuilt/components/VideoTile.tsx +2 -2
  36. package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +13 -1
  37. package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +3 -2
  38. package/src/Prebuilt/components/{peerTileUtils.jsx → peerTileUtils.tsx} +21 -6
  39. package/src/Prebuilt/layouts/HLSView.jsx +2 -5
  40. package/dist/HLSView-6QAHWMQF.js.map +0 -7
  41. package/dist/chunk-ACEDLM3B.js.map +0 -7
@@ -39,11 +39,11 @@ import {
39
39
  useRoomLayoutHeader,
40
40
  useSidepaneToggle,
41
41
  useTheme
42
- } from "./chunk-ACEDLM3B.js";
42
+ } from "./chunk-J5FLGI2T.js";
43
43
 
44
44
  // src/Prebuilt/layouts/HLSView.jsx
45
45
  init_define_process_env();
46
- import React15, { useCallback as useCallback3, useEffect as useEffect3, useRef, useState as useState4 } from "react";
46
+ import React15, { useCallback as useCallback3, useEffect as useEffect4, useRef, useState as useState5 } from "react";
47
47
  import { useFullscreen, useMedia as useMedia4, usePrevious, useToggle } from "react-use";
48
48
  import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents as HMSHLSPlayerEvents2 } from "@100mslive/hls-player";
49
49
  import screenfull from "screenfull";
@@ -170,9 +170,29 @@ var RightControls = styled(Flex, {
170
170
 
171
171
  // src/Prebuilt/components/HMSVideo/HMSVideo.jsx
172
172
  init_define_process_env();
173
- import React2, { forwardRef } from "react";
173
+ import React2, { forwardRef, useEffect, useState } from "react";
174
174
  var HMSVideo = forwardRef((_a, videoRef) => {
175
175
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
176
+ const [width, setWidth] = useState("auto");
177
+ useEffect(() => {
178
+ const updatingVideoWidth = () => {
179
+ const videoEl2 = videoRef.current;
180
+ if (!videoEl2) {
181
+ return;
182
+ }
183
+ if (videoEl2.videoWidth > videoEl2.videoHeight && width !== "100%") {
184
+ setWidth("100%");
185
+ }
186
+ };
187
+ const videoEl = videoRef.current;
188
+ if (!videoEl) {
189
+ return;
190
+ }
191
+ videoEl.addEventListener("loadedmetadata", updatingVideoWidth);
192
+ return () => {
193
+ videoEl.removeEventListener("loadedmetadata", updatingVideoWidth);
194
+ };
195
+ }, []);
176
196
  return /* @__PURE__ */ React2.createElement(
177
197
  Flex,
178
198
  __spreadValues({
@@ -183,9 +203,8 @@ var HMSVideo = forwardRef((_a, videoRef) => {
183
203
  justifyContent: "center",
184
204
  transition: "all 0.3s ease-in-out",
185
205
  "@md": {
186
- height: "auto",
187
206
  "& video": {
188
- height: "$60 !important"
207
+ height: props.isFullScreen ? "" : "$60 !important"
189
208
  }
190
209
  },
191
210
  "& video::cue": {
@@ -214,7 +233,7 @@ var HMSVideo = forwardRef((_a, videoRef) => {
214
233
  style: {
215
234
  margin: "0 auto",
216
235
  objectFit: "contain",
217
- width: "auto",
236
+ width,
218
237
  height: "100%",
219
238
  maxWidth: "100%"
220
239
  },
@@ -406,7 +425,7 @@ var PlayPauseSeekOverlayControls = ({
406
425
 
407
426
  // src/Prebuilt/components/HMSVideo/VideoProgress.tsx
408
427
  init_define_process_env();
409
- import React7, { useCallback, useEffect, useState } from "react";
428
+ import React7, { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
410
429
 
411
430
  // src/Prebuilt/components/HMSVideo/utils.ts
412
431
  init_define_process_env();
@@ -444,8 +463,8 @@ var VideoProgress = ({
444
463
  setSeekProgress
445
464
  }) => {
446
465
  const { hlsPlayer: hlsPlayer2 } = useHMSPlayerContext();
447
- const [videoProgress, setVideoProgress] = useState(0);
448
- const [bufferProgress, setBufferProgress] = useState(0);
466
+ const [videoProgress, setVideoProgress] = useState2(0);
467
+ const [bufferProgress, setBufferProgress] = useState2(0);
449
468
  const videoEl = hlsPlayer2 == null ? void 0 : hlsPlayer2.getVideoElement();
450
469
  const setProgress = useCallback(() => {
451
470
  var _a;
@@ -471,7 +490,7 @@ var VideoProgress = ({
471
490
  }
472
491
  setProgress();
473
492
  }, [seekProgress, setProgress, videoEl]);
474
- useEffect(() => {
493
+ useEffect2(() => {
475
494
  if (!videoEl) {
476
495
  return;
477
496
  }
@@ -534,11 +553,11 @@ var VideoProgress = ({
534
553
 
535
554
  // src/Prebuilt/components/HMSVideo/VideoTime.tsx
536
555
  init_define_process_env();
537
- import React8, { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
556
+ import React8, { useCallback as useCallback2, useEffect as useEffect3, useState as useState3 } from "react";
538
557
  import { HMSHLSPlayerEvents } from "@100mslive/hls-player";
539
558
  var VideoTime = () => {
540
559
  const { hlsPlayer: hlsPlayer2 } = useHMSPlayerContext();
541
- const [videoTime, setVideoTime] = useState2(getDurationFromSeconds2(0));
560
+ const [videoTime, setVideoTime] = useState3(getDurationFromSeconds2(0));
542
561
  const updateTime = useCallback2(
543
562
  (currentTime) => {
544
563
  const videoEl = hlsPlayer2 == null ? void 0 : hlsPlayer2.getVideoElement();
@@ -551,7 +570,7 @@ var VideoTime = () => {
551
570
  },
552
571
  [hlsPlayer2]
553
572
  );
554
- useEffect2(() => {
573
+ useEffect3(() => {
555
574
  const timeupdateHandler = (currentTime) => {
556
575
  updateTime(currentTime);
557
576
  };
@@ -583,13 +602,13 @@ var VideoTime = () => {
583
602
 
584
603
  // src/Prebuilt/components/HMSVideo/VolumeControl.tsx
585
604
  init_define_process_env();
586
- import React9, { useState as useState3 } from "react";
605
+ import React9, { useState as useState4 } from "react";
587
606
  import { VolumeOneIcon, VolumeTwoIcon, VolumeZeroIcon } from "@100mslive/react-icons";
588
607
  var VolumeControl = () => {
589
608
  var _a;
590
609
  const { hlsPlayer: hlsPlayer2 } = useHMSPlayerContext();
591
- const [volume, setVolume] = useState3((_a = hlsPlayer2 == null ? void 0 : hlsPlayer2.volume) != null ? _a : 100);
592
- const [showSlider, setShowSlider] = useState3(false);
610
+ const [volume, setVolume] = useState4((_a = hlsPlayer2 == null ? void 0 : hlsPlayer2.volume) != null ? _a : 100);
611
+ const [showSlider, setShowSlider] = useState4(false);
593
612
  return /* @__PURE__ */ React9.createElement(
594
613
  Flex,
595
614
  {
@@ -1027,7 +1046,7 @@ var ToggleChat = ({ isFullScreen = false }) => {
1027
1046
  const showChat = !!(elements == null ? void 0 : elements.chat);
1028
1047
  const isMobile = useMedia4(config.media.md);
1029
1048
  const hmsActions = useHMSActions();
1030
- useEffect3(() => {
1049
+ useEffect4(() => {
1031
1050
  match({ sidepane, isMobile, showChat, isFullScreen }).with({ isFullScreen: true }, () => {
1032
1051
  hmsActions.setAppData(APP_DATA.sidePane, "");
1033
1052
  }).with({ isMobile: true, showChat: true, sidepane: P.when((value) => !value) }, () => {
@@ -1049,30 +1068,30 @@ var HLSView = () => {
1049
1068
  const notification = useHMSNotifications(HMSNotificationTypes.POLL_STOPPED);
1050
1069
  const hmsActions = useHMSActions();
1051
1070
  const { themeType } = useTheme();
1052
- const [streamEnded, setStreamEnded] = useState4(false);
1053
- let [hlsStatsState, setHlsStatsState] = useState4(null);
1071
+ const [streamEnded, setStreamEnded] = useState5(false);
1072
+ let [hlsStatsState, setHlsStatsState] = useState5(null);
1054
1073
  const hlsUrl = (_a = hlsState.variants[0]) == null ? void 0 : _a.url;
1055
- const [availableLayers, setAvailableLayers] = useState4([]);
1056
- const [isVideoLive, setIsVideoLive] = useState4(true);
1057
- const [isCaptionEnabled, setIsCaptionEnabled] = useState4(true);
1058
- const [hasCaptions, setHasCaptions] = useState4(false);
1059
- const [currentSelectedQuality, setCurrentSelectedQuality] = useState4(null);
1060
- const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState4(false);
1061
- const [hoverControlsVisible, setHoverControlsVisible] = useState4({
1074
+ const [availableLayers, setAvailableLayers] = useState5([]);
1075
+ const [isVideoLive, setIsVideoLive] = useState5(true);
1076
+ const [isCaptionEnabled, setIsCaptionEnabled] = useState5(true);
1077
+ const [hasCaptions, setHasCaptions] = useState5(false);
1078
+ const [currentSelectedQuality, setCurrentSelectedQuality] = useState5(null);
1079
+ const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState5(false);
1080
+ const [hoverControlsVisible, setHoverControlsVisible] = useState5({
1062
1081
  seekForward: false,
1063
1082
  pausePlay: false,
1064
1083
  seekBackward: false
1065
1084
  });
1066
- const [isPaused, setIsPaused] = useState4(false);
1085
+ const [isPaused, setIsPaused] = useState5(false);
1067
1086
  const [show, toggle] = useToggle(false);
1068
1087
  const lastHlsUrl = usePrevious(hlsUrl);
1069
1088
  const vanillaStore = useHMSVanillaStore();
1070
- const [controlsVisible, setControlsVisible] = useState4(true);
1071
- const [isUserSelectedAuto, setIsUserSelectedAuto] = useState4(true);
1072
- const [qualityDropDownOpen, setQualityDropDownOpen] = useState4(false);
1089
+ const [controlsVisible, setControlsVisible] = useState5(true);
1090
+ const [isUserSelectedAuto, setIsUserSelectedAuto] = useState5(true);
1091
+ const [qualityDropDownOpen, setQualityDropDownOpen] = useState5(false);
1073
1092
  const controlsRef = useRef(null);
1074
1093
  const controlsTimerRef = useRef();
1075
- const [seekProgress, setSeekProgress] = useState4(false);
1094
+ const [seekProgress, setSeekProgress] = useState5(false);
1076
1095
  const isFullScreenSupported = screenfull.isEnabled;
1077
1096
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
1078
1097
  const showChat = !!(elements == null ? void 0 : elements.chat);
@@ -1081,8 +1100,8 @@ var HLSView = () => {
1081
1100
  const isFullScreen = useFullscreen(hlsViewRef, show, {
1082
1101
  onClose: () => toggle(false)
1083
1102
  });
1084
- const [showLoader, setShowLoader] = useState4(false);
1085
- useEffect3(() => {
1103
+ const [showLoader, setShowLoader] = useState5(false);
1104
+ useEffect4(() => {
1086
1105
  const videoEl = videoRef.current;
1087
1106
  const showLoader2 = () => setShowLoader(true);
1088
1107
  const hideLoader = () => setShowLoader(false);
@@ -1093,12 +1112,12 @@ var HLSView = () => {
1093
1112
  videoEl == null ? void 0 : videoEl.removeEventListener("waiting", showLoader2);
1094
1113
  };
1095
1114
  }, []);
1096
- useEffect3(() => {
1115
+ useEffect4(() => {
1097
1116
  if (streamEnded && lastHlsUrl !== hlsUrl) {
1098
1117
  setStreamEnded(false);
1099
1118
  }
1100
1119
  }, [hlsUrl, streamEnded, lastHlsUrl]);
1101
- useEffect3(() => {
1120
+ useEffect4(() => {
1102
1121
  if (!notification)
1103
1122
  return;
1104
1123
  const toastID = toastMap == null ? void 0 : toastMap[notification.data.id];
@@ -1107,7 +1126,7 @@ var HLSView = () => {
1107
1126
  delete toastMap[notification.data.id];
1108
1127
  }
1109
1128
  }, [notification]);
1110
- useEffect3(() => {
1129
+ useEffect4(() => {
1111
1130
  const videoElem = videoRef.current;
1112
1131
  const setStreamEndedCallback = () => {
1113
1132
  setStreamEnded(true);
@@ -1129,7 +1148,7 @@ var HLSView = () => {
1129
1148
  [availableLayers]
1130
1149
  //eslint-disable-line
1131
1150
  );
1132
- useEffect3(() => {
1151
+ useEffect4(() => {
1133
1152
  let videoEl = videoRef.current;
1134
1153
  const manifestLoadedHandler = ({ layers }) => {
1135
1154
  setAvailableLayers(layers);
@@ -1242,7 +1261,7 @@ var HLSView = () => {
1242
1261
  };
1243
1262
  }
1244
1263
  }, [hlsUrl, vanillaStore, hmsActions]);
1245
- useEffect3(() => {
1264
+ useEffect4(() => {
1246
1265
  const onHLSStats = (state) => setHlsStatsState(state);
1247
1266
  if (enablHlsStats) {
1248
1267
  hlsPlayer == null ? void 0 : hlsPlayer.on(HMSHLSPlayerEvents2.STATS, onHLSStats);
@@ -1264,7 +1283,7 @@ var HLSView = () => {
1264
1283
  const sfnOverlayClose = () => {
1265
1284
  hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);
1266
1285
  };
1267
- useEffect3(() => {
1286
+ useEffect4(() => {
1268
1287
  if (controlsVisible && isFullScreen && !qualityDropDownOpen) {
1269
1288
  if (controlsTimerRef.current) {
1270
1289
  clearTimeout(controlsTimerRef.current);
@@ -1413,12 +1432,7 @@ var HLSView = () => {
1413
1432
  justify: "center",
1414
1433
  css: {
1415
1434
  flex: isLandscape ? "2 1 0" : "1 1 0",
1416
- transition: "all 0.3s ease-in-out",
1417
- "&:fullscreen": {
1418
- "& video": {
1419
- height: "unset !important"
1420
- }
1421
- }
1435
+ transition: "all 0.3s ease-in-out"
1422
1436
  }
1423
1437
  },
1424
1438
  hlsViewRef.current && (isMobile || isLandscape) && /* @__PURE__ */ React15.createElement(Box, { css: { position: "fixed", left: "$4", top: "$4", zIndex: 11 } }, /* @__PURE__ */ React15.createElement(LeaveRoom, { screenType: "hls_live_streaming", container: hlsViewRef.current })),
@@ -1464,6 +1478,7 @@ var HLSView = () => {
1464
1478
  onMouseMove: onHoverHandler,
1465
1479
  onMouseLeave: onHoverHandler,
1466
1480
  onClick: onClickHandler,
1481
+ isFullScreen,
1467
1482
  onDoubleClick: (e) => {
1468
1483
  onDoubleClickHandler(e);
1469
1484
  }
@@ -1618,7 +1633,8 @@ var HLSView = () => {
1618
1633
  open: qualityDropDownOpen,
1619
1634
  selection: currentSelectedQuality,
1620
1635
  onQualityChange: handleQuality,
1621
- isAuto: isUserSelectedAuto
1636
+ isAuto: isUserSelectedAuto,
1637
+ containerRef: hlsViewRef.current
1622
1638
  }
1623
1639
  ) : null, isFullScreenSupported ? /* @__PURE__ */ React15.createElement(FullScreenButton, { isFullScreen, onToggle: toggle }) : null)
1624
1640
  )
@@ -1633,4 +1649,4 @@ var HLSView_default = HLSView;
1633
1649
  export {
1634
1650
  HLSView_default as default
1635
1651
  };
1636
- //# sourceMappingURL=HLSView-6QAHWMQF.js.map
1652
+ //# sourceMappingURL=HLSView-3JERKVTE.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/layouts/HLSView.jsx", "../src/Prebuilt/components/HlsStatsOverlay.jsx", "../src/Prebuilt/components/HMSVideo/index.ts", "../src/Prebuilt/components/HMSVideo/Controls.jsx", "../src/Prebuilt/components/HMSVideo/HMSVideo.jsx", "../src/Prebuilt/components/HMSVideo/PlayPauseSeekControls.tsx", "../src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx", "../src/Prebuilt/components/HMSVideo/PlayerContext.tsx", "../src/Prebuilt/components/HMSVideo/SeekControl.tsx", "../src/Prebuilt/components/HMSVideo/VideoProgress.tsx", "../src/Prebuilt/components/HMSVideo/utils.ts", "../src/Prebuilt/components/HMSVideo/VideoTime.tsx", "../src/Prebuilt/components/HMSVideo/VolumeControl.tsx", "../src/Prebuilt/components/HMSVideo/FullscreenButton.tsx", "../src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.tsx", "../src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx", "../src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx", "../src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx"],
4
+ "sourcesContent": ["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useFullscreen, useMedia, usePrevious, useToggle } from 'react-use';\nimport { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents } from '@100mslive/hls-player';\nimport screenfull from 'screenfull';\nimport { match, P } from 'ts-pattern';\nimport {\n HLSPlaylistType,\n HMSNotificationTypes,\n selectAppData,\n selectHLSState,\n selectPeerNameByID,\n selectPollByID,\n useHMSActions,\n useHMSNotifications,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { ColoredHandIcon, GoLiveIcon } from '@100mslive/react-icons';\nimport { ChatToggle } from '../components/Footer/ChatToggle';\nimport { HlsStatsOverlay } from '../components/HlsStatsOverlay';\nimport { HMSVideoPlayer } from '../components/HMSVideo';\nimport { FullScreenButton } from '../components/HMSVideo/FullscreenButton';\nimport { HLSAutoplayBlockedPrompt } from '../components/HMSVideo/HLSAutoplayBlockedPrompt';\nimport { HLSCaptionSelector } from '../components/HMSVideo/HLSCaptionSelector';\nimport { HLSQualitySelector } from '../components/HMSVideo/HLSQualitySelector';\nimport { HLSViewTitle } from '../components/HMSVideo/MwebHLSViewTitle';\nimport { HMSPlayerContext } from '../components/HMSVideo/PlayerContext';\nimport { LeaveRoom } from '../components/Leave/LeaveRoom';\nimport { ToastManager } from '../components/Toast/ToastManager';\nimport { Button } from '../../Button';\nimport { IconButton } from '../../IconButton';\nimport { Box, Flex } from '../../Layout';\nimport { Loading } from '../../Loading';\nimport { Text } from '../../Text';\nimport { config, theme, useTheme } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\nimport { WaitingView } from './WaitingView';\nimport { useSidepaneToggle } from '../components/AppData/useSidepane';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useIsLandscape, useKeyboardHandler } from '../common/hooks';\nimport { APP_DATA, EMOJI_REACTION_TYPE, POLL_STATE, POLL_VIEWS, SIDE_PANE_OPTIONS } from '../common/constants';\n\nlet hlsPlayer;\nconst toastMap = {};\n\nconst ToggleChat = ({ isFullScreen = false }) => {\n const { elements } = useRoomLayoutConferencingScreen();\n const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const showChat = !!elements?.chat;\n const isMobile = useMedia(config.media.md);\n const hmsActions = useHMSActions();\n\n useEffect(() => {\n match({ sidepane, isMobile, showChat, isFullScreen })\n .with({ isFullScreen: true }, () => {\n hmsActions.setAppData(APP_DATA.sidePane, '');\n })\n .with({ isMobile: true, showChat: true, sidepane: P.when(value => !value) }, () => {\n toggleChat();\n })\n .with({ showChat: false, isMobile: true, sidepane: SIDE_PANE_OPTIONS.CHAT }, () => {\n hmsActions.setAppData(APP_DATA.sidePane, '');\n })\n .otherwise(() => {\n //do nothing\n });\n }, [sidepane, isMobile, toggleChat, showChat, hmsActions, isFullScreen]);\n return null;\n};\nconst HLSView = () => {\n const videoRef = useRef(null);\n const hlsViewRef = useRef();\n const { elements } = useRoomLayoutConferencingScreen();\n const hlsState = useHMSStore(selectHLSState);\n const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));\n const notification = useHMSNotifications(HMSNotificationTypes.POLL_STOPPED);\n const hmsActions = useHMSActions();\n const { themeType } = useTheme();\n const [streamEnded, setStreamEnded] = useState(false);\n let [hlsStatsState, setHlsStatsState] = useState(null);\n const hlsUrl = hlsState.variants[0]?.url;\n const [availableLayers, setAvailableLayers] = useState([]);\n const [isVideoLive, setIsVideoLive] = useState(true);\n const [isCaptionEnabled, setIsCaptionEnabled] = useState(true);\n const [hasCaptions, setHasCaptions] = useState(false);\n const [currentSelectedQuality, setCurrentSelectedQuality] = useState(null);\n const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState(false);\n const [hoverControlsVisible, setHoverControlsVisible] = useState({\n seekForward: false,\n pausePlay: false,\n seekBackward: false,\n });\n const [isPaused, setIsPaused] = useState(false);\n const [show, toggle] = useToggle(false);\n const lastHlsUrl = usePrevious(hlsUrl);\n const vanillaStore = useHMSVanillaStore();\n const [controlsVisible, setControlsVisible] = useState(true);\n const [isUserSelectedAuto, setIsUserSelectedAuto] = useState(true);\n const [qualityDropDownOpen, setQualityDropDownOpen] = useState(false);\n const controlsRef = useRef(null);\n const controlsTimerRef = useRef();\n const [seekProgress, setSeekProgress] = useState(false);\n const isFullScreenSupported = screenfull.isEnabled;\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const showChat = !!elements?.chat;\n\n const isMobile = useMedia(config.media.md);\n const isLandscape = useIsLandscape();\n\n const isFullScreen = useFullscreen(hlsViewRef, show, {\n onClose: () => toggle(false),\n });\n const [showLoader, setShowLoader] = useState(false);\n\n // FIXME: move this logic to player controller in next release\n useEffect(() => {\n /**\n * @type {HTMLVideoElement} videoEl\n */\n const videoEl = videoRef.current;\n const showLoader = () => setShowLoader(true);\n const hideLoader = () => setShowLoader(false);\n videoEl?.addEventListener('playing', hideLoader);\n videoEl?.addEventListener('waiting', showLoader);\n return () => {\n videoEl?.removeEventListener('playing', hideLoader);\n videoEl?.removeEventListener('waiting', showLoader);\n };\n }, []);\n useEffect(() => {\n if (streamEnded && lastHlsUrl !== hlsUrl) {\n setStreamEnded(false);\n }\n }, [hlsUrl, streamEnded, lastHlsUrl]);\n\n useEffect(() => {\n if (!notification) return;\n const toastID = toastMap?.[notification.data.id];\n if (toastID) {\n ToastManager.removeToast(toastMap[notification.data.id]);\n delete toastMap[notification.data.id];\n }\n }, [notification]);\n\n useEffect(() => {\n const videoElem = videoRef.current;\n const setStreamEndedCallback = () => {\n setStreamEnded(true);\n // no point keeping the callback attached once the streaming is ended\n videoElem?.removeEventListener('ended', setStreamEndedCallback);\n };\n videoElem?.addEventListener('ended', setStreamEndedCallback);\n return () => {\n videoElem?.removeEventListener('ended', setStreamEndedCallback);\n };\n }, [hlsUrl]);\n\n const handleQuality = useCallback(\n quality => {\n if (hlsPlayer) {\n setIsUserSelectedAuto(quality.height?.toString().toLowerCase() === 'auto');\n hlsPlayer?.setLayer(quality);\n }\n },\n [availableLayers], //eslint-disable-line\n );\n /**\n * initialize HMSHLSPlayer and add event listeners.\n */\n useEffect(() => {\n let videoEl = videoRef.current;\n const manifestLoadedHandler = ({ layers }) => {\n setAvailableLayers(layers);\n setHasCaptions(hlsPlayer?.hasCaptions());\n };\n const layerUpdatedHandler = ({ layer }) => {\n setCurrentSelectedQuality(layer);\n };\n const metadataLoadedHandler = ({ payload, ...rest }) => {\n const parsePayload = str => {\n try {\n return JSON.parse(str);\n } catch (e) {\n return str;\n }\n };\n const duration = rest.duration;\n const parsedPayload = parsePayload(payload);\n // check if poll happened\n if (parsedPayload.startsWith('poll:')) {\n const pollId = parsedPayload.substr(parsedPayload.indexOf(':') + 1);\n const poll = vanillaStore.getState(selectPollByID(pollId));\n const pollStartedBy = vanillaStore.getState(selectPeerNameByID(poll.startedBy)) || 'Participant';\n // launch poll\n if (!toastMap[pollId]) {\n const toastID = ToastManager.addToast({\n title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,\n action: (\n <Button\n onClick={() => {\n hmsActions.setAppData(APP_DATA.pollState, {\n [POLL_STATE.pollInView]: pollId,\n [POLL_STATE.view]: POLL_VIEWS.VOTE,\n });\n hmsActions.setAppData(APP_DATA.sidePane, SIDE_PANE_OPTIONS.POLLS);\n }}\n variant=\"standard\"\n css={{\n backgroundColor: '$surface_bright',\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n p: '$xs $md',\n }}\n >\n {poll.type === 'quiz' ? 'Answer' : 'Vote'}\n </Button>\n ),\n duration: Infinity,\n });\n toastMap[pollId] = toastID;\n }\n return;\n }\n switch (parsedPayload.type) {\n case EMOJI_REACTION_TYPE:\n window.showFlyingEmoji?.({ emojiId: parsedPayload?.emojiId, senderId: parsedPayload?.senderId });\n break;\n default: {\n const toast = {\n title: `Payload from timed Metadata ${parsedPayload}`,\n duration: duration || 3000,\n };\n console.debug('Added toast ', JSON.stringify(toast));\n ToastManager.addToast(toast);\n break;\n }\n }\n };\n const handleError = data => {\n console.error('[HLSView] error in hls', `${data}`);\n };\n const handleNoLongerLive = ({ isLive }) => {\n setIsVideoLive(isLive);\n };\n\n const playbackEventHandler = data => {\n setIsPaused(data.state === HLSPlaybackState.paused);\n setHoverControlsVisible({\n ...hoverControlsVisible,\n pausePlay: true,\n });\n setTimeout(() => {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n pausePlay: false,\n });\n }, 2000);\n };\n const captionEnabledEventHandler = isCaptionEnabled => {\n setIsCaptionEnabled(isCaptionEnabled);\n };\n\n const handleAutoplayBlock = data => setIsHlsAutoplayBlocked(!!data);\n if (videoEl && hlsUrl) {\n hlsPlayer = new HMSHLSPlayer(hlsUrl, videoEl);\n hlsPlayer.on(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);\n hlsPlayer.on(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.ERROR, handleError);\n hlsPlayer.on(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);\n\n hlsPlayer.on(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);\n return () => {\n hlsPlayer.off(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);\n hlsPlayer.off(HMSHLSPlayerEvents.ERROR, handleError);\n hlsPlayer.off(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);\n\n hlsPlayer.off(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);\n hlsPlayer.off(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);\n hlsPlayer.reset();\n };\n }\n }, [hlsUrl, vanillaStore, hmsActions]);\n\n /**\n * initialize and subscribe to hlsState\n */\n useEffect(() => {\n const onHLSStats = state => setHlsStatsState(state);\n if (enablHlsStats) {\n hlsPlayer?.on(HMSHLSPlayerEvents.STATS, onHLSStats);\n } else {\n hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);\n }\n return () => {\n hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);\n };\n }, [enablHlsStats]);\n\n const unblockAutoPlay = async () => {\n try {\n await hlsPlayer.play();\n setIsHlsAutoplayBlocked(false);\n } catch (error) {\n console.error('Tried to unblock Autoplay failed with', error.message);\n }\n };\n\n const sfnOverlayClose = () => {\n hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);\n };\n\n useEffect(() => {\n if (controlsVisible && isFullScreen && !qualityDropDownOpen) {\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n }\n if (!isFullScreen && controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n controlsTimerRef.current = setTimeout(() => {\n if (!seekProgress) {\n setControlsVisible(false);\n }\n }, 5000);\n return () => {\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n };\n }, [controlsVisible, isFullScreen, seekProgress, qualityDropDownOpen]);\n\n const onSeekTo = useCallback(\n seek => {\n match({ isLandscape, isMobile, seek })\n .with({ seek: -10, isMobile: false, isLandscape: false }, () => {\n setHoverControlsVisible({ ...hoverControlsVisible, seekBackward: true });\n setTimeout(() => {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n seekBackward: false,\n });\n }, 1000);\n })\n .with({ seek: 10, isMobile: false, isLandscape: false }, () => {\n setHoverControlsVisible({ ...hoverControlsVisible, seekForward: true });\n setTimeout(() => {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n seekForward: false,\n });\n }, 1000);\n })\n .otherwise(() => null);\n hlsPlayer?.seekTo(videoRef.current?.currentTime + seek);\n },\n [hoverControlsVisible, isLandscape, isMobile],\n );\n const onDoubleClickHandler = useCallback(\n event => {\n if (!(isMobile || isLandscape) || hlsState?.variants[0]?.playlist_type !== HLSPlaylistType.DVR) {\n return;\n }\n const sidePercentage = (event.screenX * 100) / event.target.clientWidth;\n // there is space for pause/unpause button\n if (sidePercentage < 45) {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n seekBackward: true,\n });\n onSeekTo(-10);\n } else {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n seekForward: true,\n });\n onSeekTo(10);\n }\n setTimeout(() => {\n setHoverControlsVisible({\n ...hoverControlsVisible,\n seekForward: false,\n seekBackward: false,\n });\n }, 1000);\n },\n [hlsState?.variants, hoverControlsVisible, isLandscape, isMobile, onSeekTo],\n );\n\n const onClickHandler = useCallback(async () => {\n match({ isMobile, isLandscape, playlist_type: hlsState?.variants[0]?.playlist_type })\n .with({ playlist_type: HLSPlaylistType.DVR, isMobile: false, isLandscape: false }, async () => {\n if (isPaused) {\n await hlsPlayer?.play();\n } else {\n hlsPlayer?.pause();\n }\n })\n .when(\n ({ isMobile, isLandscape }) => isMobile || isLandscape,\n () => {\n setControlsVisible(value => !value);\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n },\n )\n .otherwise(() => null);\n }, [hlsState?.variants, isLandscape, isMobile, isPaused]);\n\n const onHoverHandler = useCallback(\n event => {\n event.preventDefault();\n if (isMobile || isLandscape) {\n return;\n }\n if (event.type === 'mouseenter' || qualityDropDownOpen) {\n setControlsVisible(true);\n return;\n }\n if (event.type === 'mouseleave' && !seekProgress) {\n setControlsVisible(false);\n } else if (!controlsVisible && event.type === 'mousemove') {\n setControlsVisible(true);\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n }\n },\n [controlsVisible, isLandscape, isMobile, qualityDropDownOpen, seekProgress],\n );\n\n const keyHandler = useKeyboardHandler(isPaused, hlsPlayer);\n\n if (!hlsUrl || streamEnded) {\n return (\n <>\n <ToggleChat />\n {hlsViewRef.current && (isMobile || isLandscape) && (\n <Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>\n <LeaveRoom screenType=\"hls_live_streaming\" container={hlsViewRef.current} />\n </Box>\n )}\n <Flex\n key=\"hls-viewer\"\n id={`hls-viewer-${themeType}`}\n ref={hlsViewRef}\n direction={isMobile || isLandscape ? 'column' : 'row'}\n justify=\"center\"\n css={{\n flex: isLandscape ? '2 1 0' : '1 1 0',\n }}\n >\n {streamEnded ? (\n <WaitingView\n icon={<ColoredHandIcon height={56} width={56} />}\n title=\"Stream has ended\"\n subtitle=\"Have a nice day!\"\n />\n ) : (\n <WaitingView\n icon={<GoLiveIcon height={56} width={56} style={{ color: 'white' }} />}\n title=\"Stream yet to start\"\n subtitle=\"Sit back and relax\"\n />\n )}\n </Flex>\n </>\n );\n }\n return (\n <Flex\n key=\"hls-viewer\"\n id={`hls-viewer-${themeType}`}\n ref={hlsViewRef}\n direction={isMobile || isLandscape ? 'column' : 'row'}\n justify=\"center\"\n css={{\n flex: isLandscape ? '2 1 0' : '1 1 0',\n transition: 'all 0.3s ease-in-out',\n }}\n >\n {hlsViewRef.current && (isMobile || isLandscape) && (\n <Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>\n <LeaveRoom screenType=\"hls_live_streaming\" container={hlsViewRef.current} />\n </Box>\n )}\n\n <HMSPlayerContext.Provider value={{ hlsPlayer }}>\n {hlsStatsState?.url && enablHlsStats && !(isMobile || isLandscape) ? (\n <HlsStatsOverlay hlsStatsState={hlsStatsState} onClose={sfnOverlayClose} />\n ) : null}\n <Flex\n id=\"hls-player-container\"\n align=\"center\"\n justify=\"center\"\n css={{\n size: '100%',\n margin: '0 auto',\n '@md': {\n height: 'auto',\n },\n outline: 'none',\n }}\n onKeyDown={async event => {\n if (hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR) {\n await keyHandler(event);\n }\n }}\n tabIndex=\"0\"\n >\n {!(isMobile || isLandscape) && (\n <HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />\n )}\n {showLoader && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n position: 'absolute',\n }}\n >\n <Loading width={72} height={72} />\n </Flex>\n )}\n <HMSVideoPlayer.Root\n ref={videoRef}\n onMouseEnter={onHoverHandler}\n onMouseMove={onHoverHandler}\n onMouseLeave={onHoverHandler}\n onClick={onClickHandler}\n isFullScreen={isFullScreen}\n onDoubleClick={e => {\n onDoubleClickHandler(e);\n }}\n >\n <>\n {!(isMobile || isLandscape) && (\n <Flex\n align=\"center\"\n justify=\"between\"\n css={{\n position: 'absolute',\n bg: `${\n hoverControlsVisible.pausePlay ||\n hoverControlsVisible.seekBackward ||\n hoverControlsVisible.seekForward\n ? '#00000066'\n : ''\n }`,\n display: 'inline-flex',\n gap: '$2',\n zIndex: 1,\n size: '100%',\n }}\n >\n {!showLoader && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR && (\n <HMSVideoPlayer.PlayPauseSeekControls.Overlay\n isPaused={isPaused}\n showControls={controlsVisible}\n hoverControlsVisible={hoverControlsVisible}\n />\n )}\n </Flex>\n )}\n {isMobile || isLandscape ? (\n <>\n {!showLoader && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR && (\n <HMSVideoPlayer.PlayPauseSeekControls.Overlay\n isPaused={isPaused}\n showControls={controlsVisible}\n hoverControlsVisible={hoverControlsVisible}\n />\n )}\n <Flex\n ref={controlsRef}\n direction=\"column\"\n justify=\"start\"\n align=\"start\"\n css={{\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n flexShrink: 0,\n zIndex: 1,\n visibility: controlsVisible ? `` : `hidden`,\n opacity: controlsVisible ? `1` : '0',\n }}\n >\n <HMSVideoPlayer.Controls.Root\n css={{\n p: '$4 $8',\n }}\n onClick={e => e.stopPropagation()}\n >\n <HMSVideoPlayer.Controls.Right>\n {(isLandscape || (isMobile && isFullScreen)) && showChat && (\n <ChatToggle\n onClick={() => {\n if (isFullScreen) {\n toggle();\n }\n // toggle and closing fullscreen takes few ms, to make it synced we are calling settimeout\n setTimeout(() => {\n toggleChat();\n }, 0);\n }}\n />\n )}\n {hasCaptions && !isHlsAutoplayBlocked && <HLSCaptionSelector isEnabled={isCaptionEnabled} />}\n {hlsViewRef.current && availableLayers.length > 0 && !isHlsAutoplayBlocked ? (\n <HLSQualitySelector\n layers={availableLayers}\n onOpenChange={setQualityDropDownOpen}\n open={qualityDropDownOpen}\n selection={currentSelectedQuality}\n onQualityChange={handleQuality}\n isAuto={isUserSelectedAuto}\n containerRef={hlsViewRef.current}\n />\n ) : null}\n <HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />\n </HMSVideoPlayer.Controls.Right>\n </HMSVideoPlayer.Controls.Root>\n </Flex>\n </>\n ) : null}\n {controlsVisible && (\n <Flex\n ref={controlsRef}\n direction={isMobile ? 'columnReverse' : 'column'}\n justify=\"end\"\n align=\"start\"\n css={{\n position: 'absolute',\n bottom: isFullScreen && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? '$8' : '0',\n left: '0',\n zIndex: 1,\n background:\n isMobile || isLandscape\n ? ''\n : `linear-gradient(180deg, ${theme.colors.background_dim.value}00 29.46%, ${theme.colors.background_dim.value}A3 100%);`,\n width: '100%',\n pt: '$8',\n flexShrink: 0,\n transition: 'visibility 0s 0.5s, opacity 0.5s linear',\n }}\n >\n {hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (\n <HMSVideoPlayer.Progress seekProgress={seekProgress} setSeekProgress={setSeekProgress} />\n ) : null}\n <HMSVideoPlayer.Controls.Root\n css={{\n p: '$4 $8',\n }}\n onClick={e => e.stopPropagation()}\n >\n <HMSVideoPlayer.Controls.Left>\n {!(isMobile || isLandscape) && (\n <>\n {hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (\n <>\n <HMSVideoPlayer.PlayPauseSeekControls.Button isPaused={isPaused} onSeekTo={onSeekTo} />\n {!isVideoLive ? <HMSVideoPlayer.Duration /> : null}\n </>\n ) : null}\n <HMSVideoPlayer.Volume />\n </>\n )}\n <IconButton\n css={{ px: '$2' }}\n onClick={async e => {\n e.stopPropagation();\n await hlsPlayer?.seekToLivePosition();\n setIsVideoLive(true);\n }}\n key=\"jump-to-live_btn\"\n data-testid=\"jump-to-live_btn\"\n >\n <Tooltip title={isVideoLive ? 'Live' : 'Go to Live'} side=\"top\">\n <Flex justify=\"center\" gap={2} align=\"center\">\n <Box\n css={{\n height: '$4',\n width: '$4',\n background: isVideoLive ? '$alert_error_default' : '$on_primary_medium',\n r: '$1',\n }}\n />\n <Text\n variant=\"$body1\"\n css={{\n c: isVideoLive ? '$on_surface_high' : '$on_surface_medium',\n fontWeight: '$semiBold',\n }}\n >\n {isVideoLive ? 'LIVE' : 'GO LIVE'}\n </Text>\n </Flex>\n </Tooltip>\n </IconButton>\n {(isMobile || isLandscape) &&\n !isVideoLive &&\n hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (\n <HMSVideoPlayer.Duration />\n ) : null}\n </HMSVideoPlayer.Controls.Left>\n\n <HMSVideoPlayer.Controls.Right>\n {hasCaptions && !(isMobile || isLandscape) && <HLSCaptionSelector isEnabled={isCaptionEnabled} />}\n {availableLayers.length > 0 && !(isMobile || isLandscape) ? (\n <HLSQualitySelector\n layers={availableLayers}\n onOpenChange={setQualityDropDownOpen}\n open={qualityDropDownOpen}\n selection={currentSelectedQuality}\n onQualityChange={handleQuality}\n isAuto={isUserSelectedAuto}\n containerRef={hlsViewRef.current}\n />\n ) : null}\n {isFullScreenSupported ? (\n <FullScreenButton isFullScreen={isFullScreen} onToggle={toggle} />\n ) : null}\n </HMSVideoPlayer.Controls.Right>\n </HMSVideoPlayer.Controls.Root>\n </Flex>\n )}\n </>\n </HMSVideoPlayer.Root>\n </Flex>\n </HMSPlayerContext.Provider>\n <ToggleChat isFullScreen={isFullScreen} />\n {isMobile && !isFullScreen && <HLSViewTitle />}\n </Flex>\n );\n};\n\nexport default HLSView;\n", "import React, { memo } from 'react';\nimport { CrossIcon } from '@100mslive/react-icons';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport IconButton from '../IconButton';\n\nexport function HlsStatsOverlay({ hlsStatsState, onClose }) {\n return (\n <Flex\n css={{\n position: 'absolute',\n width: '$80',\n marginLeft: '$8',\n padding: '$8 $8 $10',\n zIndex: 10,\n backgroundColor: '$surface_brighter',\n borderRadius: '$1',\n }}\n direction=\"column\"\n >\n <IconButton css={{ position: 'absolute', top: '$2', right: '$2' }} onClick={onClose}>\n <CrossIcon />\n </IconButton>\n <HlsStatsRow label=\"URL\">\n <Flex align=\"center\">\n <a\n style={{ cursor: 'pointer', textDecoration: 'underline' }}\n href={hlsStatsState?.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n Stream url\n </a>\n </Flex>\n </HlsStatsRow>\n <HlsStatsRow label=\"Video size\">\n {` ${hlsStatsState?.videoSize?.width}x${hlsStatsState?.videoSize?.height}`}\n </HlsStatsRow>\n <HlsStatsRow label=\"Buffer duration\">{hlsStatsState?.bufferedDuration?.toFixed(2)} </HlsStatsRow>\n <HlsStatsRow label=\"Connection speed\">\n {`${(hlsStatsState?.bandwidthEstimate / (1000 * 1000)).toFixed(2)} Mbps`}\n </HlsStatsRow>\n <HlsStatsRow label=\"Bitrate\">{`${(hlsStatsState?.bitrate / (1000 * 1000)).toFixed(2)} Mbps`}</HlsStatsRow>\n <HlsStatsRow label=\"distance from live\">\n {getDurationFromSeconds(hlsStatsState.distanceFromLive / 1000)}\n </HlsStatsRow>\n <HlsStatsRow label=\"Dropped frames\">{hlsStatsState?.droppedFrames}</HlsStatsRow>\n </Flex>\n );\n}\n\n/**\n * Extracted from HLS new Player PR.\n * TODO: remove this and use HMSVideoUtils.js\n * when that code is merged\n */\nexport function getDurationFromSeconds(timeInSeconds) {\n let time = Math.floor(timeInSeconds);\n const hours = Math.floor(time / 3600);\n time = time - hours * 3600;\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time - minutes * 60);\n\n const prefixedMinutes = `${minutes < 10 ? '0' + minutes : minutes}`;\n const prefixedSeconds = `${seconds < 10 ? '0' + seconds : seconds}`;\n\n let videoTimeStr = `${prefixedMinutes}:${prefixedSeconds}`;\n if (hours) {\n const prefixedHours = `${hours < 10 ? '0' + hours : hours}`;\n videoTimeStr = `${prefixedHours}:${prefixedMinutes}:${prefixedSeconds}`;\n }\n return videoTimeStr;\n}\n\nconst HlsStatsRow = memo(({ label, children }) => {\n return (\n <Flex gap={4} justify=\"center\" css={{ width: '100%' }}>\n <Text\n css={{\n width: '50%',\n '@md': { fontSize: '$md' },\n '@sm': { fontSize: '$sm' },\n // textAlign: \"right\",\n }}\n >\n {label}\n </Text>\n <Text\n css={{\n '@md': { fontSize: '$md' },\n '@sm': { fontSize: '$sm' },\n width: '50%',\n overflowWrap: 'break-word',\n // textAlign: \"left\",\n }}\n >\n {children}\n </Text>\n </Flex>\n );\n});\n", "// @ts-ignore\nimport { LeftControls, RightControls, VideoControls } from './Controls';\n// @ts-ignore\nimport { HMSVideo } from './HMSVideo';\nimport { PlayPauseSeekControls, PlayPauseSeekOverlayControls } from './PlayPauseSeekControls';\nimport { VideoProgress } from './VideoProgress';\nimport { VideoTime } from './VideoTime';\nimport { VolumeControl } from './VolumeControl';\n\nexport const HMSVideoPlayer = {\n Root: HMSVideo,\n Progress: VideoProgress,\n Duration: VideoTime,\n Volume: VolumeControl,\n Controls: {\n Root: VideoControls,\n Left: LeftControls,\n Right: RightControls,\n },\n PlayPauseSeekControls: {\n Overlay: PlayPauseSeekOverlayControls,\n Button: PlayPauseSeekControls,\n },\n};\n", "import { Flex, styled } from '../../..';\n\nexport const VideoControls = styled(Flex, {\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'stretch',\n width: '100%',\n gap: '$2',\n});\n\nexport const LeftControls = styled(Flex, {\n justifyContent: 'flex-start',\n alignItems: 'center',\n width: '100%',\n gap: '$4',\n});\nexport const RightControls = styled(Flex, {\n justifyContent: 'flex-end',\n alignItems: 'center',\n width: '100%',\n gap: '$4',\n});\n", "import React, { forwardRef, useEffect, useState } from 'react';\nimport { Flex } from '../../../Layout';\n\nexport const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {\n const [width, setWidth] = useState('auto');\n\n useEffect(() => {\n const updatingVideoWidth = () => {\n const videoEl = videoRef.current;\n if (!videoEl) {\n return;\n }\n if (videoEl.videoWidth > videoEl.videoHeight && width !== '100%') {\n setWidth('100%');\n }\n };\n const videoEl = videoRef.current;\n if (!videoEl) {\n return;\n }\n videoEl.addEventListener('loadedmetadata', updatingVideoWidth);\n return () => {\n videoEl.removeEventListener('loadedmetadata', updatingVideoWidth);\n };\n }, []);\n return (\n <Flex\n data-testid=\"hms-video\"\n css={{\n size: '100%',\n position: 'relative',\n justifyContent: 'center',\n transition: 'all 0.3s ease-in-out',\n '@md': {\n '& video': {\n height: props.isFullScreen ? '' : '$60 !important',\n },\n },\n '& video::cue': {\n // default for on-surface-high\n color: '#EFF0FA',\n whiteSpace: 'pre-line',\n fontSize: '$sm',\n fontStyle: 'normal',\n fontWeight: '$regular',\n lineHeight: '$sm',\n letterSpacing: '0.25px',\n },\n '& video::-webkit-media-text-track-display': {\n padding: '0 $4',\n boxShadow: '0px 1px 3px 0px #000000A3',\n },\n '& video::-webkit-media-text-track-container': {\n fontSize: '$space$10 !important',\n },\n }}\n direction=\"column\"\n {...props}\n >\n <video\n style={{\n margin: '0 auto',\n objectFit: 'contain',\n width: width,\n height: '100%',\n maxWidth: '100%',\n }}\n ref={videoRef}\n playsInline\n disablePictureInPicture\n />\n {children}\n </Flex>\n );\n});\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { BackwardArrowIcon, ForwardArrowIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config } from '../../../Theme';\nimport { PlayPauseButton } from './PlayPauseButton';\nimport { SeekControl } from './SeekControl';\nimport { useIsLandscape } from '../../common/hooks';\n\n// desktop buttons\nexport const PlayPauseSeekControls = ({\n isPaused,\n onSeekTo,\n}: {\n isPaused: boolean;\n onSeekTo: (value: number) => void;\n}) => {\n return (\n <>\n <SeekControl\n onClick={e => {\n e.stopPropagation();\n onSeekTo(-10);\n }}\n title=\"backward\"\n >\n <BackwardArrowIcon width={20} height={20} />\n </SeekControl>\n <PlayPauseButton isPaused={isPaused} />\n <SeekControl\n onClick={e => {\n e.stopPropagation();\n onSeekTo(10);\n }}\n title=\"forward\"\n >\n <ForwardArrowIcon width={20} height={20} />\n </SeekControl>\n </>\n );\n};\n\n// overlay handlers\nexport const PlayPauseSeekOverlayControls = ({\n isPaused,\n showControls,\n hoverControlsVisible,\n}: {\n isPaused: boolean;\n showControls: boolean;\n hoverControlsVisible: {\n seekBackward: boolean;\n seekForward: boolean;\n pausePlay: boolean;\n };\n}) => {\n const isMobile = useMedia(config.media.md);\n const isLandscape = useIsLandscape();\n\n if (!isMobile && !isLandscape) {\n // show desktopOverflow icons\n return (\n <>\n <Flex\n css={{\n bg: 'rgba(0, 0, 0, 0.6)',\n r: '$round',\n size: '$24',\n visibility: hoverControlsVisible.seekBackward ? `` : `hidden`,\n opacity: hoverControlsVisible.seekBackward ? `1` : '0',\n }}\n direction=\"column\"\n align=\"center\"\n >\n <SeekControl title=\"backward\">\n <BackwardArrowIcon width={52} height={52} />\n </SeekControl>\n <Text variant=\"body2\" css={{ fontWeight: '$regular' }}>\n 10 secs\n </Text>\n </Flex>\n <Box\n css={{\n bg: 'rgba(0, 0, 0, 0.6)',\n r: '$round',\n visibility: hoverControlsVisible.pausePlay ? `` : `hidden`,\n opacity: hoverControlsVisible.pausePlay ? `1` : '0',\n }}\n >\n <PlayPauseButton isPaused={isPaused} width={48} height={48} />\n </Box>\n <Flex\n css={{\n bg: 'rgba(0, 0, 0, 0.6)',\n r: '$round',\n size: '$24',\n visibility: hoverControlsVisible.seekForward ? `` : `hidden`,\n opacity: hoverControlsVisible.seekForward ? `1` : '0',\n }}\n direction=\"column\"\n align=\"center\"\n >\n <SeekControl title=\"forward\">\n <ForwardArrowIcon width={52} height={52} />\n </SeekControl>\n <Text variant=\"body2\" css={{ fontWeight: '$regular' }}>\n 10 secs\n </Text>\n </Flex>\n </>\n );\n }\n\n return (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n position: 'absolute',\n bg: '#00000066',\n display: 'inline-flex',\n gap: '$2',\n zIndex: 1,\n size: '100%',\n visibility: showControls ? `` : `hidden`,\n opacity: showControls ? `1` : '0',\n }}\n >\n <SeekControl\n title=\"backward\"\n css={{\n visibility: hoverControlsVisible.seekBackward ? `` : `hidden`,\n opacity: hoverControlsVisible.seekBackward ? `1` : '0',\n }}\n >\n <BackwardArrowIcon width={32} height={32} />\n </SeekControl>\n <Box\n css={{\n bg: 'rgba(0, 0, 0, 0.6)',\n r: '$round',\n }}\n >\n <PlayPauseButton isPaused={isPaused} width={48} height={48} />\n </Box>\n <SeekControl\n title=\"forward\"\n css={{\n visibility: hoverControlsVisible.seekForward ? `` : `hidden`,\n opacity: hoverControlsVisible.seekForward ? `1` : '0',\n }}\n >\n <ForwardArrowIcon width={32} height={32} />\n </SeekControl>\n </Flex>\n );\n};\n", "import React, { MouseEvent } from 'react';\nimport { PauseIcon, PlayIcon } from '@100mslive/react-icons';\nimport { IconButton, Tooltip } from '../../..';\nimport { useHMSPlayerContext } from './PlayerContext';\n\nexport const PlayPauseButton = ({\n isPaused,\n width = 20,\n height = 20,\n}: {\n isPaused: boolean;\n width?: number;\n height?: number;\n}) => {\n const { hlsPlayer } = useHMSPlayerContext();\n const onClick = async (event: MouseEvent) => {\n event?.stopPropagation();\n isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();\n };\n return (\n <Tooltip title={isPaused ? 'Play' : 'Pause'} side=\"top\">\n <IconButton onClick={onClick} data-testid=\"play_pause_btn\">\n {isPaused ? <PlayIcon width={width} height={height} /> : <PauseIcon width={width} height={height} />}\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { useContext } from 'react';\nimport { HMSHLSPlayer } from '@100mslive/hls-player';\n\ntype IHMSPlayerContext = {\n hlsPlayer?: HMSHLSPlayer;\n};\n\nexport const HMSPlayerContext = React.createContext<IHMSPlayerContext>({\n hlsPlayer: undefined,\n});\n\nexport const useHMSPlayerContext = () => {\n const context = useContext(HMSPlayerContext);\n return context;\n};\n", "import React, { MouseEventHandler } from 'react';\nimport { IconButton, Tooltip } from '../../..';\n\nexport const SeekControl = ({\n title,\n onClick,\n children,\n css,\n}: {\n title: string;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n css?: any;\n children: React.ReactNode;\n}) => {\n return (\n <Tooltip title={title} side=\"top\">\n <IconButton onClick={onClick} data-testid=\"backward_forward_arrow_btn\" css={css}>\n {children}\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { Box, Flex, Slider } from '../../..';\nimport { useHMSPlayerContext } from './PlayerContext';\nimport { getDuration, getPercentage } from './utils';\n\nexport const VideoProgress = ({\n seekProgress,\n setSeekProgress,\n}: {\n seekProgress: boolean;\n setSeekProgress: (value: boolean) => void;\n}) => {\n const { hlsPlayer } = useHMSPlayerContext();\n const [videoProgress, setVideoProgress] = useState<number>(0);\n const [bufferProgress, setBufferProgress] = useState(0);\n const videoEl = hlsPlayer?.getVideoElement();\n\n const setProgress = useCallback(() => {\n if (!videoEl) {\n return;\n }\n const duration = getDuration(videoEl);\n const videoProgress = Math.floor(getPercentage(videoEl.currentTime, duration));\n let bufferProgress = 0;\n if (videoEl.buffered.length > 0) {\n bufferProgress = Math.floor(getPercentage(videoEl.buffered?.end(0), duration));\n }\n if (!isNaN(videoProgress)) {\n setVideoProgress(videoProgress);\n }\n if (!isNaN(bufferProgress)) {\n setBufferProgress(bufferProgress);\n }\n }, [videoEl]);\n const timeupdateHandler = useCallback(() => {\n if (!videoEl || seekProgress) {\n return;\n }\n setProgress();\n }, [seekProgress, setProgress, videoEl]);\n useEffect(() => {\n if (!videoEl) {\n return;\n }\n setProgress();\n videoEl.addEventListener('timeupdate', timeupdateHandler);\n return function cleanup() {\n videoEl?.removeEventListener('timeupdate', timeupdateHandler);\n };\n }, [setProgress, timeupdateHandler, videoEl]);\n\n const onProgress = (progress: number[]) => {\n const progress1 = Math.floor(getPercentage(progress[0], 100));\n const videoEl = hlsPlayer?.getVideoElement();\n if (!videoEl) {\n return;\n }\n const duration = isFinite(videoEl.duration) ? videoEl.duration : videoEl.seekable?.end(0) || 0;\n const currentTime = (progress1 * duration) / 100;\n hlsPlayer?.seekTo(currentTime);\n setProgress();\n };\n\n if (!videoEl) {\n return null;\n }\n return (\n <Flex align=\"center\" css={{ cursor: 'pointer', h: '$2', alignSelf: 'stretch' }}>\n <Slider\n id=\"video-actual-rest\"\n css={{\n cursor: 'pointer',\n h: '$2',\n zIndex: 1,\n transition: `all .2s ease .5s`,\n }}\n min={0}\n max={100}\n step={1}\n value={[videoProgress]}\n showTooltip={false}\n onValueChange={onProgress}\n onPointerDown={() => setSeekProgress(true)}\n onPointerUp={() => setSeekProgress(false)}\n thumbStyles={{ w: '$6', h: '$6' }}\n />\n <Box\n id=\"video-buffer\"\n css={{\n h: '$2',\n width: `${bufferProgress - videoProgress}%`,\n background: '$on_surface_high',\n position: 'absolute',\n left: `${videoProgress}%`,\n opacity: '25%',\n }}\n />\n </Flex>\n );\n};\n", "export function getPercentage(a: number, b: number) {\n return (a / b) * 100;\n}\n\n/**\n * Take a time in seconds and return its equivalent time in hh:mm:ss format\n * @param {number} timeInSeconds if given as floating point value, it is floored.\n *\n * @returns a string representing timeInSeconds in HH:MM:SS format.\n */\nexport function getDurationFromSeconds(timeInSeconds: number) {\n let time = Math.floor(timeInSeconds);\n const hours = Math.floor(time / 3600);\n time = time - hours * 3600;\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time - minutes * 60);\n\n const prefixedMinutes = `${minutes < 10 ? `0${minutes}` : minutes}`;\n const prefixedSeconds = `${seconds < 10 ? `0${seconds}` : seconds}`;\n\n let videoTimeStr = `${prefixedMinutes}:${prefixedSeconds}`;\n if (hours) {\n const prefixedHours = `${hours < 10 ? `0${hours}` : hours}`;\n videoTimeStr = `${prefixedHours}:${prefixedMinutes}:${prefixedSeconds}`;\n }\n return videoTimeStr;\n}\n\nexport function getDuration(videoEl: HTMLVideoElement): number {\n if (isFinite(videoEl.duration)) {\n return videoEl.duration;\n }\n if (videoEl.seekable.length > 0) {\n return videoEl.seekable.end(0);\n }\n return 0;\n}\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { HMSHLSPlayerEvents } from '@100mslive/hls-player';\nimport { Text } from '../../../Text';\nimport { useHMSPlayerContext } from './PlayerContext';\nimport { getDuration, getDurationFromSeconds } from './utils';\n\nexport const VideoTime = () => {\n const { hlsPlayer } = useHMSPlayerContext();\n\n const [videoTime, setVideoTime] = useState(getDurationFromSeconds(0));\n\n const updateTime = useCallback(\n (currentTime: number) => {\n const videoEl = hlsPlayer?.getVideoElement();\n if (videoEl) {\n const duration = getDuration(videoEl);\n setVideoTime(getDurationFromSeconds(duration - currentTime));\n } else {\n setVideoTime(getDurationFromSeconds(currentTime));\n }\n },\n [hlsPlayer],\n );\n useEffect(() => {\n const timeupdateHandler = (currentTime: number) => {\n updateTime(currentTime);\n };\n if (hlsPlayer) {\n hlsPlayer.on(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);\n const videoEl = hlsPlayer?.getVideoElement();\n updateTime(videoEl.currentTime);\n }\n return function cleanup() {\n hlsPlayer?.off(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);\n };\n }, [hlsPlayer, updateTime]);\n\n return hlsPlayer ? (\n <Text\n variant=\"body1\"\n css={{\n minWidth: '$16',\n c: '$on_surface_medium',\n display: 'flex',\n justifyContent: 'center',\n fontWeight: '$regular',\n }}\n >\n -{videoTime}\n </Text>\n ) : null;\n};\n", "import React, { useState } from 'react';\nimport { VolumeOneIcon, VolumeTwoIcon, VolumeZeroIcon } from '@100mslive/react-icons';\nimport { Flex, Slider } from '../../..';\nimport { useHMSPlayerContext } from './PlayerContext';\n\nexport const VolumeControl = () => {\n const { hlsPlayer } = useHMSPlayerContext();\n const [volume, setVolume] = useState(hlsPlayer?.volume ?? 100);\n const [showSlider, setShowSlider] = useState(false);\n\n return (\n <Flex\n align=\"center\"\n css={{ color: '$on_surface_high' }}\n onMouseOver={event => {\n event.stopPropagation();\n setShowSlider(true);\n }}\n onMouseLeave={event => {\n event.stopPropagation();\n setShowSlider(false);\n }}\n >\n <VolumeIcon\n volume={volume}\n onClick={() => {\n if (volume > 0) {\n setVolume(0);\n hlsPlayer?.setVolume(0);\n } else {\n setVolume(100);\n hlsPlayer?.setVolume(100);\n }\n }}\n />\n <Slider\n css={{\n mx: '$4',\n w: '$20',\n cursor: 'pointer',\n '@sm': { w: '$14' },\n '@xs': { w: '$14' },\n opacity: showSlider ? '1' : '0',\n display: showSlider ? '' : 'none',\n transition: `all .2s ease .5s`,\n }}\n min={0}\n max={100}\n step={1}\n value={[volume]}\n onValueChange={volume => {\n hlsPlayer?.setVolume(volume[0]);\n setVolume(volume[0]);\n }}\n thumbStyles={{ w: '$6', h: '$6' }}\n />\n </Flex>\n );\n};\n\nconst VolumeIcon = ({ volume, onClick }: { volume: number; onClick: () => void }) => {\n if (volume === 0) {\n return <VolumeZeroIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />;\n }\n return volume < 50 ? (\n <VolumeOneIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />\n ) : (\n <VolumeTwoIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />\n );\n};\n", "import React from 'react';\nimport { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';\nimport { Flex, IconButton, Tooltip } from '../../..';\n\nexport const FullScreenButton = ({ isFullScreen, onToggle }: { isFullScreen: boolean; onToggle: () => void }) => {\n return (\n <Tooltip title={`${isFullScreen ? 'Exit' : 'Go'} fullscreen`} side=\"top\">\n <IconButton css={{ margin: '0px' }} onClick={onToggle} key=\"fullscreen_btn\" data-testid=\"fullscreen_btn\">\n <Flex>{isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}</Flex>\n </IconButton>\n </Tooltip>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { VolumeTwoIcon } from '@100mslive/react-icons';\nimport { Button, config, Dialog, IconButton, Text } from '../../..';\n// @ts-ignore\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\nimport { useIsLandscape } from '../../common/hooks';\n\nexport function HLSAutoplayBlockedPrompt({\n open,\n unblockAutoPlay,\n}: {\n open: boolean;\n unblockAutoPlay: () => Promise<void>;\n}) {\n const isLandscape = useIsLandscape();\n const isMobile = useMedia(config.media.md);\n if ((isMobile || isLandscape) && open) {\n return (\n <IconButton\n css={{\n border: '1px solid white',\n bg: 'white',\n color: '#000',\n r: '$2',\n }}\n onClick={async () => await unblockAutoPlay()}\n >\n <VolumeTwoIcon width=\"32\" height=\"32\" />\n <Text\n variant=\"body1\"\n css={{\n fontWeight: '$semiBold',\n px: '$2',\n color: '#000',\n }}\n >\n Tap To Unmute\n </Text>\n </IconButton>\n );\n }\n return (\n <Dialog.Root\n open={open}\n onOpenChange={async value => {\n if (!value) {\n await unblockAutoPlay();\n }\n }}\n >\n <DialogContent title=\"Attention\" closeable={false}>\n <DialogRow>\n <Text variant=\"md\">\n The browser wants us to get a confirmation for playing the HLS Stream. Please click \"play stream\" to\n proceed.\n </Text>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button\n variant=\"primary\"\n onClick={async () => {\n await unblockAutoPlay();\n }}\n >\n Play stream\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n}\n", "import React from 'react';\nimport { ClosedCaptionIcon, OpenCaptionIcon } from '@100mslive/react-icons';\nimport { IconButton, Tooltip } from '../../../';\nimport { useHMSPlayerContext } from './PlayerContext';\n\nexport function HLSCaptionSelector({ isEnabled }: { isEnabled: boolean }) {\n const { hlsPlayer } = useHMSPlayerContext();\n return (\n <Tooltip title=\"Subtitles/closed captions\" side=\"top\">\n <IconButton css={{ p: '$2' }} onClick={() => hlsPlayer?.toggleCaption()}>\n {isEnabled ? <ClosedCaptionIcon width=\"20\" height=\"20px\" /> : <OpenCaptionIcon width=\"20\" height=\"20px\" />}\n </IconButton>\n </Tooltip>\n );\n}\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSHLSLayer } from '@100mslive/hls-player';\nimport { CheckIcon, CrossIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Box, Dropdown, Flex, Text, Tooltip } from '../../..';\nimport { Sheet } from '../../../Sheet';\nimport { config } from '../../../Theme';\nimport { useIsLandscape } from '../../common/hooks';\n\nexport function HLSQualitySelector({\n open,\n onOpenChange,\n layers,\n onQualityChange,\n selection,\n isAuto,\n containerRef,\n}: {\n open: boolean;\n onOpenChange: (value: boolean) => void;\n layers: HMSHLSLayer[];\n onQualityChange: (quality: { [key: string]: string | number } | HMSHLSLayer) => void;\n selection: HMSHLSLayer;\n isAuto: boolean;\n containerRef?: HTMLDivElement;\n}) {\n const isMobile = useMedia(config.media.md);\n const isLandscape = useIsLandscape();\n\n if (layers.length === 0) {\n return null;\n }\n if (isMobile || isLandscape) {\n return (\n <Sheet.Root open={open} onOpenChange={onOpenChange}>\n <Sheet.Trigger asChild data-testid=\"quality_selector\">\n <Flex\n css={{\n color: '$on_primary_high',\n r: '$1',\n cursor: 'pointer',\n p: '$2',\n }}\n >\n <SettingsIcon />\n </Flex>\n </Sheet.Trigger>\n <Sheet.Content\n container={containerRef}\n css={{ bg: '$surface_default', pb: '$1' }}\n onClick={() => onOpenChange(false)}\n >\n <Sheet.Title\n css={{\n display: 'flex',\n color: '$on_surface_high',\n w: '100%',\n justifyContent: 'space-between',\n mt: '$8',\n fontSize: '$md',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_bright',\n alignItems: 'center',\n }}\n >\n Quality\n <Sheet.Close css={{ color: '$on_surface_high' }} onClick={() => onOpenChange(false)}>\n <CrossIcon />\n </Sheet.Close>\n </Sheet.Title>\n {layers.map(layer => {\n return (\n <Flex\n align=\"center\"\n css={{\n w: '100%',\n bg: '$surface_default',\n '&:hover': {\n bg: '$surface_brighter',\n },\n cursor: 'pointer',\n gap: '$4',\n py: '$8',\n px: '$10',\n }}\n key={layer.width}\n onClick={() => onQualityChange(layer)}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold' }}>\n {getQualityText(layer)}\n </Text>\n <Text variant=\"caption\" css={{ flex: '1 1 0', c: '$on_surface_low', pl: '$2' }}>\n {getBitrateText(layer)}\n </Text>\n {!isAuto && layer.width === selection?.width && layer.height === selection?.height && (\n <CheckIcon width=\"16px\" height=\"16px\" />\n )}\n </Flex>\n );\n })}\n <Flex\n align=\"center\"\n css={{\n w: '100%',\n bg: '$surface_default',\n '&:hover': {\n bg: '$surface_brighter',\n },\n cursor: 'pointer',\n gap: '$4',\n py: '$8',\n px: '$10',\n }}\n key=\"auto\"\n onClick={() => onQualityChange({ height: 'auto' })}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold', flex: '1 1 0' }}>\n Auto\n </Text>\n {isAuto && <CheckIcon width=\"16px\" height=\"16px\" />}\n </Flex>\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n return (\n <Dropdown.Root open={open} onOpenChange={value => onOpenChange(value)} modal={false}>\n <Dropdown.Trigger asChild data-testid=\"quality_selector\">\n <Flex\n css={{\n color: '$on_primary_high',\n r: '$1',\n cursor: 'pointer',\n p: '$2',\n }}\n >\n <Tooltip title=\"Select Quality\" side=\"top\">\n <Flex align=\"center\">\n <Box\n css={{\n w: '$9',\n h: '$9',\n display: 'inline-flex',\n alignItems: 'center',\n c: '$on_surface_high',\n }}\n >\n <SettingsIcon />\n </Box>\n <Text\n variant={{\n '@md': 'sm',\n '@sm': 'xs',\n '@xs': 'tiny',\n }}\n css={{ display: 'flex', alignItems: 'center', ml: '$2', c: '$on_surface_medium' }}\n >\n {isAuto && (\n <>\n Auto\n <Box\n css={{\n mx: '$2',\n w: '$2',\n h: '$2',\n background: '$on_surface_medium',\n r: '$1',\n }}\n />\n </>\n )}\n {selection && Math.min(selection.width || 0, selection.height || 0)}p\n </Text>\n </Flex>\n </Tooltip>\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Portal container={containerRef}>\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{\n height: 'auto',\n maxHeight: '$52',\n w: '$40',\n bg: '$surface_bright',\n py: '$4',\n gap: '$4',\n display: 'grid',\n }}\n >\n {layers.map(layer => {\n return (\n <Dropdown.Item\n onClick={() => onQualityChange(layer)}\n key={layer.width}\n css={{\n bg:\n !isAuto && layer.width === selection?.width && layer.height === selection?.height\n ? '$surface_default'\n : '$surface_bright',\n '&:hover': {\n bg: '$surface_brighter',\n },\n p: '$2 $4 $2 $8',\n h: '$12',\n gap: '$2',\n }}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold' }}>\n {getQualityText(layer)}\n </Text>\n <Text variant=\"caption\" css={{ flex: '1 1 0', c: '$on_surface_low', pl: '$2' }}>\n {getBitrateText(layer)}\n </Text>\n {!isAuto && layer.width === selection?.width && layer.height === selection?.height && (\n <CheckIcon width=\"16px\" height=\"16px\" />\n )}\n </Dropdown.Item>\n );\n })}\n <Dropdown.Item\n onClick={() => onQualityChange({ height: 'auto' })}\n key=\"auto\"\n css={{\n bg: !isAuto ? '$surface_bright' : '$surface_default',\n '&:hover': {\n bg: '$surface_brighter',\n },\n p: '$2 $4 $2 $8',\n h: '$12',\n gap: '$2',\n }}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold', flex: '1 1 0' }}>\n Auto\n </Text>\n {isAuto && <CheckIcon width=\"16px\" height=\"16px\" />}\n </Dropdown.Item>\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n}\n\nconst getQualityText = (layer: HMSHLSLayer) => `${Math.min(layer.height || 0, layer.width || 0)}p `;\nconst getBitrateText = (layer: HMSHLSLayer) => `(${(Number(layer.bitrate / 1000) / 1000).toFixed(2)} Mbps)`;\n", "import React from 'react';\nimport { ChevronDownIcon } from '@100mslive/react-icons';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit any\nimport { Logo } from '../Header/HeaderComponents';\nimport { RoomDetailsRow } from '../RoomDetails/RoomDetailsRow';\nimport { useRoomLayoutHeader } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\n/*\n\tplayer handler --> left -> go live with timer or live, right -> expand icon \n\tinbetween -> play pause icon, double tap to go back/forward\n\tseekbar\n\thalf page will have chat or participant view\n*/\nexport const HLSViewTitle = () => {\n const { title, details, description } = useRoomLayoutHeader();\n const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);\n const isDetailSidepaneOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.ROOM_DETAILS);\n\n if (isDetailSidepaneOpen) {\n return (\n <Flex\n gap=\"4\"\n align=\"center\"\n justify=\"between\"\n css={{\n position: 'relative',\n h: 'fit-content',\n w: '100%',\n borderBottom: '1px solid $border_bright',\n p: '$8',\n backgroundColor: '$surface_dim',\n }}\n >\n <Text variant=\"sub2\" css={{ fontWeight: '$semiBold' }}>\n About Session\n </Text>\n <Flex\n onClick={toggleDetailsPane}\n css={{\n color: '$on_surface_high',\n cursor: 'pointer',\n '&:hover': { opacity: '0.8' },\n }}\n >\n <ChevronDownIcon />\n </Flex>\n </Flex>\n );\n }\n return (\n <Flex\n gap=\"4\"\n align=\"center\"\n css={{\n position: 'relative',\n h: 'fit-content',\n w: '100%',\n borderBottom: '1px solid $border_bright',\n p: '$8',\n backgroundColor: '$surface_dim',\n }}\n >\n <Logo />\n <Flex direction=\"column\">\n {title ? (\n <Text variant=\"sub2\" css={{ fontWeight: '$semiBold' }}>\n {title}\n </Text>\n ) : null}\n <Flex>\n <RoomDetailsRow details={details} />\n {description ? (\n <Text variant=\"caption\" css={{ color: '$on_surface_medium' }} onClick={toggleDetailsPane}>\n &nbsp;...more\n </Text>\n ) : null}\n </Flex>\n </Flex>\n </Flex>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAOA,WAAS,eAAAC,cAAa,aAAAC,YAAW,QAAQ,YAAAC,iB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,QAAA,cAAC,oBAAiB,cAA4B,UAAU,QAAQ,IAC9D,IACN;AAAA,UACF;AAAA,QACF,CAEJ;AAAA,MACF;AAAA,IACF,CACF;AAAA,IACA,gBAAAA,QAAA,cAAC,cAAW,cAA4B;AAAA,IACvC,YAAY,CAAC,gBAAgB,gBAAAA,QAAA,cAAC,kBAAa;AAAA,EAC9C;AAEJ;AAEA,IAAO,kBAAQ;",
6
+ "names": ["React", "useCallback", "useEffect", "useState", "useMedia", "HMSHLSPlayerEvents", "React", "videoEl", "React", "React", "React", "React", "hlsPlayer", "React", "React", "React", "React", "React", "useEffect", "useState", "getDurationFromSeconds", "hlsPlayer", "useState", "videoProgress", "bufferProgress", "useEffect", "videoEl", "React", "React", "useCallback", "useEffect", "useState", "hlsPlayer", "useState", "getDurationFromSeconds", "useCallback", "useEffect", "React", "React", "useState", "hlsPlayer", "useState", "React", "volume", "React", "React", "React", "useMedia", "VolumeTwoIcon", "useMedia", "React", "VolumeTwoIcon", "React", "hlsPlayer", "React", "React", "useMedia", "CrossIcon", "useMedia", "React", "CrossIcon", "React", "React", "useMedia", "useEffect", "useState", "showLoader", "useCallback", "_a", "_b", "React", "isCaptionEnabled", "HMSHLSPlayerEvents", "isMobile", "isLandscape"]
7
+ }
@@ -4,7 +4,7 @@ declare type HMSPrebuiltContextType = {
4
4
  userName?: string;
5
5
  userId?: string;
6
6
  containerSelector: string;
7
- endpoints?: Record<string, string>;
7
+ endpoints?: Record<string, string | undefined>;
8
8
  onLeave?: () => void;
9
9
  onJoin?: () => void;
10
10
  };
@@ -10,7 +10,7 @@ import { PrebuiltStates } from '../AppStateContext';
10
10
  * ui_mode=activespeaker => lands in active speaker mode after joining the room
11
11
  */
12
12
  declare const AuthToken: React.NamedExoticComponent<{
13
- authTokenByRoomCodeEndpoint: string;
13
+ authTokenByRoomCodeEndpoint?: string | undefined;
14
14
  defaultAuthToken?: string | undefined;
15
15
  activeState?: PrebuiltStates | undefined;
16
16
  }>;
@@ -12,6 +12,7 @@ export declare class VBPlugin {
12
12
  getPreset: () => any;
13
13
  removeEffects: () => Promise<void>;
14
14
  reset: () => void;
15
+ isBlurSupported: () => boolean;
15
16
  isEffectsSupported: () => boolean;
16
17
  }
17
18
  export declare const VBHandler: VBPlugin;
@@ -0,0 +1,7 @@
1
+ import { HMSAudioTrack, HMSVideoTrack } from '@100mslive/react-sdk';
2
+ export declare const getVideoTileLabel: ({ peerName, isLocal, videoTrack, audioTrack, }: {
3
+ isLocal: boolean;
4
+ peerName?: string | undefined;
5
+ videoTrack?: HMSVideoTrack | null | undefined;
6
+ audioTrack?: HMSAudioTrack | null | undefined;
7
+ }) => string;