analytica-frontend-lib 1.1.76 → 1.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Alert/index.js.map +1 -1
- package/dist/Alert/index.mjs.map +1 -1
- package/dist/AlertDialog/index.js.map +1 -1
- package/dist/AlertDialog/index.mjs.map +1 -1
- package/dist/Alternative/index.js.map +1 -1
- package/dist/Alternative/index.mjs.map +1 -1
- package/dist/Badge/index.js.map +1 -1
- package/dist/Badge/index.mjs.map +1 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.mjs.map +1 -1
- package/dist/Calendar/index.js.map +1 -1
- package/dist/Calendar/index.mjs.map +1 -1
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs.map +1 -1
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/CheckBox/index.mjs.map +1 -1
- package/dist/Chips/index.js.map +1 -1
- package/dist/Chips/index.mjs.map +1 -1
- package/dist/Divider/index.js.map +1 -1
- package/dist/Divider/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.mjs.map +1 -1
- package/dist/IconRoundedButton/index.js.map +1 -1
- package/dist/IconRoundedButton/index.mjs.map +1 -1
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Modal/index.js.map +1 -1
- package/dist/Modal/index.mjs.map +1 -1
- package/dist/MultipleChoice/index.js.map +1 -1
- package/dist/MultipleChoice/index.mjs.map +1 -1
- package/dist/NavButton/index.js.map +1 -1
- package/dist/NavButton/index.mjs.map +1 -1
- package/dist/NotFound/index.js.map +1 -1
- package/dist/NotFound/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +23 -0
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +23 -0
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/ProgressBar/index.mjs.map +1 -1
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Radio/index.js.map +1 -1
- package/dist/Radio/index.mjs.map +1 -1
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs.map +1 -1
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs.map +1 -1
- package/dist/SelectionButton/index.js.map +1 -1
- package/dist/SelectionButton/index.mjs.map +1 -1
- package/dist/Skeleton/index.js.map +1 -1
- package/dist/Skeleton/index.mjs.map +1 -1
- package/dist/Stepper/index.js.map +1 -1
- package/dist/Stepper/index.mjs.map +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs.map +1 -1
- package/dist/Text/index.js.map +1 -1
- package/dist/Text/index.mjs.map +1 -1
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/ThemeToggle/index.js.map +1 -1
- package/dist/ThemeToggle/index.mjs.map +1 -1
- package/dist/Toast/Toaster/index.js.map +1 -1
- package/dist/Toast/Toaster/index.mjs.map +1 -1
- package/dist/Toast/index.js.map +1 -1
- package/dist/Toast/index.mjs.map +1 -1
- package/dist/VideoPlayer/index.js +262 -118
- package/dist/VideoPlayer/index.js.map +1 -1
- package/dist/VideoPlayer/index.mjs +233 -89
- package/dist/VideoPlayer/index.mjs.map +1 -1
- package/dist/Whiteboard/index.js.map +1 -1
- package/dist/Whiteboard/index.mjs.map +1 -1
- package/dist/hooks/useMobile/index.d.mts +5 -0
- package/dist/hooks/useMobile/index.d.ts +5 -0
- package/dist/hooks/useMobile/index.js +23 -0
- package/dist/hooks/useMobile/index.js.map +1 -1
- package/dist/hooks/useMobile/index.mjs +23 -0
- package/dist/hooks/useMobile/index.mjs.map +1 -1
- package/dist/index.css +38 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +154 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +154 -67
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +38 -0
- package/dist/styles.css.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -193,7 +193,7 @@ function getSubjectColorWithOpacity(hexColor, isDark) {
|
|
|
193
193
|
} else {
|
|
194
194
|
let resultColor;
|
|
195
195
|
if (color.length === 6) {
|
|
196
|
-
resultColor = `#${color}
|
|
196
|
+
resultColor = `#${color}4d`;
|
|
197
197
|
} else if (color.length === 8) {
|
|
198
198
|
resultColor = `#${color}`;
|
|
199
199
|
} else {
|
|
@@ -6780,6 +6780,10 @@ var getSubjectName = (subject) => {
|
|
|
6780
6780
|
var import_react22 = require("react");
|
|
6781
6781
|
var MOBILE_WIDTH = 500;
|
|
6782
6782
|
var TABLET_WIDTH = 931;
|
|
6783
|
+
var SMALL_MOBILE_WIDTH = 425;
|
|
6784
|
+
var EXTRA_SMALL_MOBILE_WIDTH = 375;
|
|
6785
|
+
var ULTRA_SMALL_MOBILE_WIDTH = 375;
|
|
6786
|
+
var TINY_MOBILE_WIDTH = 320;
|
|
6783
6787
|
var DEFAULT_WIDTH = 1200;
|
|
6784
6788
|
var getWindowWidth = () => {
|
|
6785
6789
|
if (typeof window === "undefined") {
|
|
@@ -6794,11 +6798,19 @@ var getDeviceType = () => {
|
|
|
6794
6798
|
var useMobile = () => {
|
|
6795
6799
|
const [isMobile, setIsMobile] = (0, import_react22.useState)(false);
|
|
6796
6800
|
const [isTablet, setIsTablet] = (0, import_react22.useState)(false);
|
|
6801
|
+
const [isSmallMobile, setIsSmallMobile] = (0, import_react22.useState)(false);
|
|
6802
|
+
const [isExtraSmallMobile, setIsExtraSmallMobile] = (0, import_react22.useState)(false);
|
|
6803
|
+
const [isUltraSmallMobile, setIsUltraSmallMobile] = (0, import_react22.useState)(false);
|
|
6804
|
+
const [isTinyMobile, setIsTinyMobile] = (0, import_react22.useState)(false);
|
|
6797
6805
|
(0, import_react22.useEffect)(() => {
|
|
6798
6806
|
const checkScreenSize = () => {
|
|
6799
6807
|
const width = getWindowWidth();
|
|
6800
6808
|
setIsMobile(width < MOBILE_WIDTH);
|
|
6801
6809
|
setIsTablet(width < TABLET_WIDTH);
|
|
6810
|
+
setIsSmallMobile(width < SMALL_MOBILE_WIDTH);
|
|
6811
|
+
setIsExtraSmallMobile(width < EXTRA_SMALL_MOBILE_WIDTH);
|
|
6812
|
+
setIsUltraSmallMobile(width < ULTRA_SMALL_MOBILE_WIDTH);
|
|
6813
|
+
setIsTinyMobile(width < TINY_MOBILE_WIDTH);
|
|
6802
6814
|
};
|
|
6803
6815
|
checkScreenSize();
|
|
6804
6816
|
window.addEventListener("resize", checkScreenSize);
|
|
@@ -6822,13 +6834,24 @@ var useMobile = () => {
|
|
|
6822
6834
|
const getHeaderClasses = () => {
|
|
6823
6835
|
return isMobile ? getMobileHeaderClasses() : getDesktopHeaderClasses();
|
|
6824
6836
|
};
|
|
6837
|
+
const getVideoContainerClasses = () => {
|
|
6838
|
+
if (isTinyMobile) return "aspect-square";
|
|
6839
|
+
if (isExtraSmallMobile) return "aspect-[4/3]";
|
|
6840
|
+
if (isSmallMobile) return "aspect-[16/12]";
|
|
6841
|
+
return "aspect-video";
|
|
6842
|
+
};
|
|
6825
6843
|
return {
|
|
6826
6844
|
isMobile,
|
|
6827
6845
|
isTablet,
|
|
6846
|
+
isSmallMobile,
|
|
6847
|
+
isExtraSmallMobile,
|
|
6848
|
+
isUltraSmallMobile,
|
|
6849
|
+
isTinyMobile,
|
|
6828
6850
|
getFormContainerClasses,
|
|
6829
6851
|
getHeaderClasses,
|
|
6830
6852
|
getMobileHeaderClasses,
|
|
6831
6853
|
getDesktopHeaderClasses,
|
|
6854
|
+
getVideoContainerClasses,
|
|
6832
6855
|
getDeviceType
|
|
6833
6856
|
};
|
|
6834
6857
|
};
|
|
@@ -7761,8 +7784,9 @@ var ProgressBar2 = ({
|
|
|
7761
7784
|
currentTime,
|
|
7762
7785
|
duration,
|
|
7763
7786
|
progressPercentage,
|
|
7764
|
-
onSeek
|
|
7765
|
-
|
|
7787
|
+
onSeek,
|
|
7788
|
+
className = "px-4 pb-2"
|
|
7789
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7766
7790
|
"input",
|
|
7767
7791
|
{
|
|
7768
7792
|
type: "range",
|
|
@@ -7781,18 +7805,20 @@ var VolumeControls = ({
|
|
|
7781
7805
|
volume,
|
|
7782
7806
|
isMuted,
|
|
7783
7807
|
onVolumeChange,
|
|
7784
|
-
onToggleMute
|
|
7808
|
+
onToggleMute,
|
|
7809
|
+
iconSize = 24,
|
|
7810
|
+
showSlider = true
|
|
7785
7811
|
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7786
7812
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7787
7813
|
IconButton_default,
|
|
7788
7814
|
{
|
|
7789
|
-
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.SpeakerSlash, { size:
|
|
7815
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.SpeakerHigh, { size: iconSize }),
|
|
7790
7816
|
onClick: onToggleMute,
|
|
7791
7817
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
7792
7818
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
7793
7819
|
}
|
|
7794
7820
|
),
|
|
7795
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7821
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7796
7822
|
"input",
|
|
7797
7823
|
{
|
|
7798
7824
|
type: "range",
|
|
@@ -7813,7 +7839,9 @@ var SpeedMenu = ({
|
|
|
7813
7839
|
playbackRate,
|
|
7814
7840
|
onToggleMenu,
|
|
7815
7841
|
onSpeedChange,
|
|
7816
|
-
isFullscreen
|
|
7842
|
+
isFullscreen,
|
|
7843
|
+
iconSize = 24,
|
|
7844
|
+
isTinyMobile = false
|
|
7817
7845
|
}) => {
|
|
7818
7846
|
const buttonRef = (0, import_react26.useRef)(null);
|
|
7819
7847
|
const speedMenuContainerRef = (0, import_react26.useRef)(null);
|
|
@@ -7821,10 +7849,13 @@ var SpeedMenu = ({
|
|
|
7821
7849
|
const getMenuPosition = () => {
|
|
7822
7850
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
7823
7851
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
7852
|
+
const menuHeight = isTinyMobile ? 150 : 180;
|
|
7853
|
+
const menuWidth = isTinyMobile ? 60 : 80;
|
|
7854
|
+
const padding = isTinyMobile ? 4 : 8;
|
|
7824
7855
|
return {
|
|
7825
7856
|
// Fixed coords are viewport-based — no scroll offsets.
|
|
7826
|
-
top: Math.max(
|
|
7827
|
-
left: Math.max(
|
|
7857
|
+
top: Math.max(padding, rect.top - menuHeight),
|
|
7858
|
+
left: Math.max(padding, rect.right - menuWidth)
|
|
7828
7859
|
};
|
|
7829
7860
|
};
|
|
7830
7861
|
const position = getMenuPosition();
|
|
@@ -7877,7 +7908,7 @@ var SpeedMenu = ({
|
|
|
7877
7908
|
IconButton_default,
|
|
7878
7909
|
{
|
|
7879
7910
|
ref: buttonRef,
|
|
7880
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.DotsThreeVertical, { size:
|
|
7911
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.DotsThreeVertical, { size: iconSize }),
|
|
7881
7912
|
onClick: onToggleMenu,
|
|
7882
7913
|
"aria-label": "Playback speed",
|
|
7883
7914
|
"aria-haspopup": "menu",
|
|
@@ -7903,6 +7934,7 @@ var VideoPlayer = ({
|
|
|
7903
7934
|
storageKey = "video-progress"
|
|
7904
7935
|
}) => {
|
|
7905
7936
|
const videoRef = (0, import_react26.useRef)(null);
|
|
7937
|
+
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
7906
7938
|
const [isPlaying, setIsPlaying] = (0, import_react26.useState)(false);
|
|
7907
7939
|
const [currentTime, setCurrentTime] = (0, import_react26.useState)(0);
|
|
7908
7940
|
const [duration, setDuration] = (0, import_react26.useState)(0);
|
|
@@ -8005,6 +8037,12 @@ var VideoPlayer = ({
|
|
|
8005
8037
|
video.removeEventListener("ended", onEnded);
|
|
8006
8038
|
};
|
|
8007
8039
|
}, []);
|
|
8040
|
+
(0, import_react26.useEffect)(() => {
|
|
8041
|
+
const video = videoRef.current;
|
|
8042
|
+
if (!video) return;
|
|
8043
|
+
video.setAttribute("playsinline", "");
|
|
8044
|
+
video.setAttribute("webkit-playsinline", "");
|
|
8045
|
+
}, []);
|
|
8008
8046
|
(0, import_react26.useEffect)(() => {
|
|
8009
8047
|
if (isPlaying) {
|
|
8010
8048
|
showControlsWithTimer();
|
|
@@ -8211,6 +8249,31 @@ var VideoPlayer = ({
|
|
|
8211
8249
|
};
|
|
8212
8250
|
}, [isPlaying, clearControlsTimeout]);
|
|
8213
8251
|
const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
|
|
8252
|
+
const getIconSize2 = (0, import_react26.useCallback)(() => {
|
|
8253
|
+
if (isTinyMobile) return 18;
|
|
8254
|
+
if (isUltraSmallMobile) return 20;
|
|
8255
|
+
return 24;
|
|
8256
|
+
}, [isTinyMobile, isUltraSmallMobile]);
|
|
8257
|
+
const getControlsPadding = (0, import_react26.useCallback)(() => {
|
|
8258
|
+
if (isTinyMobile) return "px-2 pb-2 pt-1";
|
|
8259
|
+
if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
|
|
8260
|
+
return "px-4 pb-4";
|
|
8261
|
+
}, [isTinyMobile, isUltraSmallMobile]);
|
|
8262
|
+
const getControlsGap = (0, import_react26.useCallback)(() => {
|
|
8263
|
+
if (isTinyMobile) return "gap-1";
|
|
8264
|
+
if (isUltraSmallMobile) return "gap-2";
|
|
8265
|
+
return "gap-4";
|
|
8266
|
+
}, [isTinyMobile, isUltraSmallMobile]);
|
|
8267
|
+
const getProgressBarPadding = (0, import_react26.useCallback)(() => {
|
|
8268
|
+
if (isTinyMobile) return "px-2 pb-1";
|
|
8269
|
+
if (isUltraSmallMobile) return "px-3 pb-1";
|
|
8270
|
+
return "px-4 pb-2";
|
|
8271
|
+
}, [isTinyMobile, isUltraSmallMobile]);
|
|
8272
|
+
const getCenterPlayButtonPosition = (0, import_react26.useCallback)(() => {
|
|
8273
|
+
if (isTinyMobile) return "items-center justify-center -translate-y-12";
|
|
8274
|
+
if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
|
|
8275
|
+
return "items-center justify-center";
|
|
8276
|
+
}, [isTinyMobile, isUltraSmallMobile]);
|
|
8214
8277
|
const getTopControlsOpacity = (0, import_react26.useCallback)(() => {
|
|
8215
8278
|
return showControls ? "opacity-100" : "opacity-0";
|
|
8216
8279
|
}, [showControls]);
|
|
@@ -8318,8 +8381,9 @@ var VideoPlayer = ({
|
|
|
8318
8381
|
ref: videoRef,
|
|
8319
8382
|
src,
|
|
8320
8383
|
poster,
|
|
8321
|
-
className: "w-full h-full object-contain",
|
|
8384
|
+
className: "w-full h-full object-contain analytica-video",
|
|
8322
8385
|
controlsList: "nodownload",
|
|
8386
|
+
playsInline: true,
|
|
8323
8387
|
onTimeUpdate: handleTimeUpdate,
|
|
8324
8388
|
onLoadedMetadata: handleLoadedMetadata,
|
|
8325
8389
|
onClick: togglePlayPause,
|
|
@@ -8339,15 +8403,24 @@ var VideoPlayer = ({
|
|
|
8339
8403
|
)
|
|
8340
8404
|
}
|
|
8341
8405
|
),
|
|
8342
|
-
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8343
|
-
|
|
8406
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8407
|
+
"div",
|
|
8344
8408
|
{
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8409
|
+
className: cn(
|
|
8410
|
+
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
8411
|
+
getCenterPlayButtonPosition()
|
|
8412
|
+
),
|
|
8413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8414
|
+
IconButton_default,
|
|
8415
|
+
{
|
|
8416
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
8417
|
+
onClick: togglePlayPause,
|
|
8418
|
+
"aria-label": "Play video",
|
|
8419
|
+
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
8420
|
+
}
|
|
8421
|
+
)
|
|
8349
8422
|
}
|
|
8350
|
-
)
|
|
8423
|
+
),
|
|
8351
8424
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8352
8425
|
"div",
|
|
8353
8426
|
{
|
|
@@ -8380,58 +8453,72 @@ var VideoPlayer = ({
|
|
|
8380
8453
|
currentTime,
|
|
8381
8454
|
duration,
|
|
8382
8455
|
progressPercentage,
|
|
8383
|
-
onSeek: handleSeek
|
|
8456
|
+
onSeek: handleSeek,
|
|
8457
|
+
className: getProgressBarPadding()
|
|
8384
8458
|
}
|
|
8385
8459
|
),
|
|
8386
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
onClick: togglePlayPause,
|
|
8393
|
-
"aria-label": isPlaying ? "Pause" : "Play",
|
|
8394
|
-
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8395
|
-
}
|
|
8396
|
-
),
|
|
8397
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8398
|
-
VolumeControls,
|
|
8399
|
-
{
|
|
8400
|
-
volume,
|
|
8401
|
-
isMuted,
|
|
8402
|
-
onVolumeChange: handleVolumeChange,
|
|
8403
|
-
onToggleMute: toggleMute
|
|
8404
|
-
}
|
|
8405
|
-
),
|
|
8406
|
-
subtitles && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8407
|
-
IconButton_default,
|
|
8408
|
-
{
|
|
8409
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.ClosedCaptioning, { size: 24 }),
|
|
8410
|
-
onClick: toggleCaptions,
|
|
8411
|
-
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
8412
|
-
className: cn(
|
|
8413
|
-
"!bg-transparent hover:!bg-white/20",
|
|
8414
|
-
showCaptions ? "!text-primary-400" : "!text-white"
|
|
8415
|
-
)
|
|
8416
|
-
}
|
|
8460
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
8461
|
+
"div",
|
|
8462
|
+
{
|
|
8463
|
+
className: cn(
|
|
8464
|
+
"flex items-center justify-between",
|
|
8465
|
+
getControlsPadding()
|
|
8417
8466
|
),
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8467
|
+
children: [
|
|
8468
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
8469
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8470
|
+
IconButton_default,
|
|
8471
|
+
{
|
|
8472
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Pause, { size: getIconSize2() }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Play, { size: getIconSize2() }),
|
|
8473
|
+
onClick: togglePlayPause,
|
|
8474
|
+
"aria-label": isPlaying ? "Pause" : "Play",
|
|
8475
|
+
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8476
|
+
}
|
|
8477
|
+
),
|
|
8478
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8479
|
+
VolumeControls,
|
|
8480
|
+
{
|
|
8481
|
+
volume,
|
|
8482
|
+
isMuted,
|
|
8483
|
+
onVolumeChange: handleVolumeChange,
|
|
8484
|
+
onToggleMute: toggleMute,
|
|
8485
|
+
iconSize: getIconSize2(),
|
|
8486
|
+
showSlider: !isUltraSmallMobile
|
|
8487
|
+
}
|
|
8488
|
+
),
|
|
8489
|
+
subtitles && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8490
|
+
IconButton_default,
|
|
8491
|
+
{
|
|
8492
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.ClosedCaptioning, { size: getIconSize2() }),
|
|
8493
|
+
onClick: toggleCaptions,
|
|
8494
|
+
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
8495
|
+
className: cn(
|
|
8496
|
+
"!bg-transparent hover:!bg-white/20",
|
|
8497
|
+
showCaptions ? "!text-primary-400" : "!text-white"
|
|
8498
|
+
)
|
|
8499
|
+
}
|
|
8500
|
+
),
|
|
8501
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
8502
|
+
formatTime(currentTime),
|
|
8503
|
+
" / ",
|
|
8504
|
+
formatTime(duration)
|
|
8505
|
+
] })
|
|
8506
|
+
] }),
|
|
8507
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8508
|
+
SpeedMenu,
|
|
8509
|
+
{
|
|
8510
|
+
showSpeedMenu,
|
|
8511
|
+
playbackRate,
|
|
8512
|
+
onToggleMenu: toggleSpeedMenu,
|
|
8513
|
+
onSpeedChange: handleSpeedChange,
|
|
8514
|
+
iconSize: getIconSize2(),
|
|
8515
|
+
isTinyMobile,
|
|
8516
|
+
isFullscreen
|
|
8517
|
+
}
|
|
8518
|
+
) })
|
|
8519
|
+
]
|
|
8520
|
+
}
|
|
8521
|
+
)
|
|
8435
8522
|
]
|
|
8436
8523
|
}
|
|
8437
8524
|
)
|