@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260504073103 → 0.8.1-dev.20260504100301
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.
|
@@ -8,6 +8,24 @@ var pickSource = (sources) => {
|
|
|
8
8
|
}
|
|
9
9
|
return sources.find((s) => !s.media)?.src ?? sources[0]?.src ?? "";
|
|
10
10
|
};
|
|
11
|
+
var requestFullscreen = (el) => {
|
|
12
|
+
if (el.requestFullscreen) return el.requestFullscreen();
|
|
13
|
+
const anyEl = el;
|
|
14
|
+
if (anyEl.webkitRequestFullscreen) return anyEl.webkitRequestFullscreen();
|
|
15
|
+
if (anyEl.mozRequestFullScreen) return anyEl.mozRequestFullScreen();
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
};
|
|
18
|
+
var exitFullscreen = () => {
|
|
19
|
+
if (document.exitFullscreen) return document.exitFullscreen();
|
|
20
|
+
const anyDoc = document;
|
|
21
|
+
if (anyDoc.webkitExitFullscreen) return anyDoc.webkitExitFullscreen();
|
|
22
|
+
if (anyDoc.mozCancelFullScreen) return anyDoc.mozCancelFullScreen();
|
|
23
|
+
return Promise.resolve();
|
|
24
|
+
};
|
|
25
|
+
var getFullscreenElement = () => (
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
document.fullscreenElement ?? document.webkitFullscreenElement ?? null
|
|
28
|
+
);
|
|
11
29
|
var HlsPlayer = React.memo(
|
|
12
30
|
({
|
|
13
31
|
sources,
|
|
@@ -20,6 +38,7 @@ var HlsPlayer = React.memo(
|
|
|
20
38
|
playOptions = "autoplay",
|
|
21
39
|
placementCode = ""
|
|
22
40
|
}) => {
|
|
41
|
+
const containerRef = useRef(null);
|
|
23
42
|
const videoRef = useRef(null);
|
|
24
43
|
const hlsRef = useRef(null);
|
|
25
44
|
const isPlayOnHover = playOptions === "playOnHover";
|
|
@@ -30,9 +49,12 @@ var HlsPlayer = React.memo(
|
|
|
30
49
|
const [isControlsVisible, setIsControlsVisible] = useState(true);
|
|
31
50
|
const [isPosterVisible, setIsPosterVisible] = useState(true);
|
|
32
51
|
const [isMuted, setIsMuted] = useState(startsMuted);
|
|
52
|
+
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
33
53
|
const wasManuallyPausedRef = useRef(false);
|
|
34
54
|
const inactivityTimerRef = useRef(null);
|
|
55
|
+
const clickTimerRef = useRef(null);
|
|
35
56
|
const INACTIVITY_DELAY = 2500;
|
|
57
|
+
const CLICK_DEBOUNCE = 220;
|
|
36
58
|
const resolvedSources = sources && sources.length > 0 ? sources : assetUrl ? [{ src: assetUrl, posterUrl }] : [];
|
|
37
59
|
useEffect(() => {
|
|
38
60
|
const checkMobile = () => {
|
|
@@ -47,6 +69,17 @@ var HlsPlayer = React.memo(
|
|
|
47
69
|
window.addEventListener("resize", checkMobile);
|
|
48
70
|
return () => window.removeEventListener("resize", checkMobile);
|
|
49
71
|
}, []);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
const onFullscreenChange = () => {
|
|
74
|
+
setIsFullscreen(getFullscreenElement() === containerRef.current);
|
|
75
|
+
};
|
|
76
|
+
document.addEventListener("fullscreenchange", onFullscreenChange);
|
|
77
|
+
document.addEventListener("webkitfullscreenchange", onFullscreenChange);
|
|
78
|
+
return () => {
|
|
79
|
+
document.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
80
|
+
document.removeEventListener("webkitfullscreenchange", onFullscreenChange);
|
|
81
|
+
};
|
|
82
|
+
}, []);
|
|
50
83
|
useEffect(() => {
|
|
51
84
|
if (isPlaying) {
|
|
52
85
|
setIsPosterVisible(false);
|
|
@@ -74,6 +107,7 @@ var HlsPlayer = React.memo(
|
|
|
74
107
|
useEffect(() => {
|
|
75
108
|
return () => {
|
|
76
109
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
110
|
+
if (clickTimerRef.current) clearTimeout(clickTimerRef.current);
|
|
77
111
|
};
|
|
78
112
|
}, []);
|
|
79
113
|
useEffect(() => {
|
|
@@ -122,6 +156,28 @@ var HlsPlayer = React.memo(
|
|
|
122
156
|
v.muted = !v.muted;
|
|
123
157
|
setIsMuted(v.muted);
|
|
124
158
|
}, []);
|
|
159
|
+
const handleFullscreenToggle = useCallback(() => {
|
|
160
|
+
const container = containerRef.current;
|
|
161
|
+
if (!container) return;
|
|
162
|
+
if (getFullscreenElement() === container) {
|
|
163
|
+
exitFullscreen().catch(console.error);
|
|
164
|
+
} else {
|
|
165
|
+
requestFullscreen(container).catch(console.error);
|
|
166
|
+
}
|
|
167
|
+
}, []);
|
|
168
|
+
const handleVideoClick = useCallback(() => {
|
|
169
|
+
if (clickTimerRef.current) clearTimeout(clickTimerRef.current);
|
|
170
|
+
clickTimerRef.current = setTimeout(() => {
|
|
171
|
+
handlePlayPause();
|
|
172
|
+
}, CLICK_DEBOUNCE);
|
|
173
|
+
}, [handlePlayPause]);
|
|
174
|
+
const handleVideoDoubleClick = useCallback(() => {
|
|
175
|
+
if (clickTimerRef.current) {
|
|
176
|
+
clearTimeout(clickTimerRef.current);
|
|
177
|
+
clickTimerRef.current = null;
|
|
178
|
+
}
|
|
179
|
+
handleFullscreenToggle();
|
|
180
|
+
}, [handleFullscreenToggle]);
|
|
125
181
|
const handleMouseEnter = useCallback(() => {
|
|
126
182
|
if (isMobile) return;
|
|
127
183
|
setIsHovered(true);
|
|
@@ -177,9 +233,11 @@ var HlsPlayer = React.memo(
|
|
|
177
233
|
}, []);
|
|
178
234
|
if (resolvedSources.length === 0) return null;
|
|
179
235
|
const showMuteButton = !showControls && !isPlayOnHover;
|
|
236
|
+
const showExpandButton = !showControls && !isPlayOnHover;
|
|
180
237
|
return /* @__PURE__ */ jsxs(
|
|
181
238
|
"div",
|
|
182
239
|
{
|
|
240
|
+
ref: containerRef,
|
|
183
241
|
className: "relative w-full aspect-video bg-black",
|
|
184
242
|
onMouseEnter: handleMouseEnter,
|
|
185
243
|
onMouseLeave: handleMouseLeave,
|
|
@@ -195,8 +253,9 @@ var HlsPlayer = React.memo(
|
|
|
195
253
|
muted: startsMuted,
|
|
196
254
|
autoPlay: playOptions === "autoplay",
|
|
197
255
|
loop,
|
|
198
|
-
onClick: handlePlayPause,
|
|
199
256
|
playsInline: true,
|
|
257
|
+
onClick: handleVideoClick,
|
|
258
|
+
onDoubleClick: handleVideoDoubleClick,
|
|
200
259
|
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ jsx(
|
|
201
260
|
"source",
|
|
202
261
|
{
|
|
@@ -260,37 +319,63 @@ var HlsPlayer = React.memo(
|
|
|
260
319
|
)
|
|
261
320
|
}
|
|
262
321
|
),
|
|
263
|
-
|
|
322
|
+
/* @__PURE__ */ jsxs(
|
|
264
323
|
"div",
|
|
265
324
|
{
|
|
266
325
|
className: "absolute bottom-4 right-4 pointer-events-none",
|
|
267
326
|
style: {
|
|
327
|
+
display: "flex",
|
|
328
|
+
alignItems: "center",
|
|
329
|
+
gap: 8,
|
|
268
330
|
opacity: isControlsVisible ? 1 : 0,
|
|
269
331
|
transition: "opacity 0.3s ease"
|
|
270
332
|
},
|
|
271
|
-
children:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
e
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
333
|
+
children: [
|
|
334
|
+
showMuteButton && /* @__PURE__ */ jsx(
|
|
335
|
+
"button",
|
|
336
|
+
{
|
|
337
|
+
type: "button",
|
|
338
|
+
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
339
|
+
onClick: (e) => {
|
|
340
|
+
e.stopPropagation();
|
|
341
|
+
handleMuteToggle();
|
|
342
|
+
},
|
|
343
|
+
style: overlayButtonStyle,
|
|
344
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
345
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
346
|
+
children: isMuted ? /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
347
|
+
/* @__PURE__ */ jsx("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
348
|
+
/* @__PURE__ */ jsx("line", { x1: "23", y1: "9", x2: "17", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
349
|
+
/* @__PURE__ */ jsx("line", { x1: "17", y1: "9", x2: "23", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
350
|
+
] }) : /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
351
|
+
/* @__PURE__ */ jsx("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
352
|
+
/* @__PURE__ */ jsx("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
353
|
+
/* @__PURE__ */ jsx("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
354
|
+
] })
|
|
355
|
+
}
|
|
356
|
+
),
|
|
357
|
+
showExpandButton && /* @__PURE__ */ jsx(
|
|
358
|
+
"button",
|
|
359
|
+
{
|
|
360
|
+
type: "button",
|
|
361
|
+
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
362
|
+
onClick: (e) => {
|
|
363
|
+
e.stopPropagation();
|
|
364
|
+
handleFullscreenToggle();
|
|
365
|
+
},
|
|
366
|
+
style: overlayButtonStyle,
|
|
367
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
368
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
369
|
+
children: isFullscreen ? (
|
|
370
|
+
/* Compress / exit icon — two inward-pointing arrows */
|
|
371
|
+
/* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M8 3v5H3M21 8h-5V3M3 16h5v5M16 21v-5h5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
372
|
+
) : (
|
|
373
|
+
/* Expand icon — four outward-pointing arrows */
|
|
374
|
+
/* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M3 8V3h5M16 3h5v5M21 16v5h-5M8 21H3v-5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
375
|
+
)
|
|
376
|
+
}
|
|
377
|
+
)
|
|
378
|
+
]
|
|
294
379
|
}
|
|
295
380
|
)
|
|
296
381
|
]
|
package/dist/index.js
CHANGED
|
@@ -520,7 +520,7 @@ var HlsPlayer_exports = {};
|
|
|
520
520
|
__export(HlsPlayer_exports, {
|
|
521
521
|
default: () => HlsPlayer_default
|
|
522
522
|
});
|
|
523
|
-
var import_react32, import_hls, import_jsx_runtime41, pickSource, HlsPlayer, HlsPlayer_default;
|
|
523
|
+
var import_react32, import_hls, import_jsx_runtime41, pickSource, requestFullscreen, exitFullscreen, getFullscreenElement, HlsPlayer, HlsPlayer_default;
|
|
524
524
|
var init_HlsPlayer = __esm({
|
|
525
525
|
"src/components/HlsPlayer.tsx"() {
|
|
526
526
|
"use strict";
|
|
@@ -534,6 +534,24 @@ var init_HlsPlayer = __esm({
|
|
|
534
534
|
}
|
|
535
535
|
return sources.find((s) => !s.media)?.src ?? sources[0]?.src ?? "";
|
|
536
536
|
};
|
|
537
|
+
requestFullscreen = (el) => {
|
|
538
|
+
if (el.requestFullscreen) return el.requestFullscreen();
|
|
539
|
+
const anyEl = el;
|
|
540
|
+
if (anyEl.webkitRequestFullscreen) return anyEl.webkitRequestFullscreen();
|
|
541
|
+
if (anyEl.mozRequestFullScreen) return anyEl.mozRequestFullScreen();
|
|
542
|
+
return Promise.resolve();
|
|
543
|
+
};
|
|
544
|
+
exitFullscreen = () => {
|
|
545
|
+
if (document.exitFullscreen) return document.exitFullscreen();
|
|
546
|
+
const anyDoc = document;
|
|
547
|
+
if (anyDoc.webkitExitFullscreen) return anyDoc.webkitExitFullscreen();
|
|
548
|
+
if (anyDoc.mozCancelFullScreen) return anyDoc.mozCancelFullScreen();
|
|
549
|
+
return Promise.resolve();
|
|
550
|
+
};
|
|
551
|
+
getFullscreenElement = () => (
|
|
552
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
553
|
+
document.fullscreenElement ?? document.webkitFullscreenElement ?? null
|
|
554
|
+
);
|
|
537
555
|
HlsPlayer = import_react32.default.memo(
|
|
538
556
|
({
|
|
539
557
|
sources,
|
|
@@ -546,6 +564,7 @@ var init_HlsPlayer = __esm({
|
|
|
546
564
|
playOptions = "autoplay",
|
|
547
565
|
placementCode = ""
|
|
548
566
|
}) => {
|
|
567
|
+
const containerRef = (0, import_react32.useRef)(null);
|
|
549
568
|
const videoRef = (0, import_react32.useRef)(null);
|
|
550
569
|
const hlsRef = (0, import_react32.useRef)(null);
|
|
551
570
|
const isPlayOnHover = playOptions === "playOnHover";
|
|
@@ -556,9 +575,12 @@ var init_HlsPlayer = __esm({
|
|
|
556
575
|
const [isControlsVisible, setIsControlsVisible] = (0, import_react32.useState)(true);
|
|
557
576
|
const [isPosterVisible, setIsPosterVisible] = (0, import_react32.useState)(true);
|
|
558
577
|
const [isMuted, setIsMuted] = (0, import_react32.useState)(startsMuted);
|
|
578
|
+
const [isFullscreen, setIsFullscreen] = (0, import_react32.useState)(false);
|
|
559
579
|
const wasManuallyPausedRef = (0, import_react32.useRef)(false);
|
|
560
580
|
const inactivityTimerRef = (0, import_react32.useRef)(null);
|
|
581
|
+
const clickTimerRef = (0, import_react32.useRef)(null);
|
|
561
582
|
const INACTIVITY_DELAY = 2500;
|
|
583
|
+
const CLICK_DEBOUNCE = 220;
|
|
562
584
|
const resolvedSources = sources && sources.length > 0 ? sources : assetUrl ? [{ src: assetUrl, posterUrl }] : [];
|
|
563
585
|
(0, import_react32.useEffect)(() => {
|
|
564
586
|
const checkMobile = () => {
|
|
@@ -573,6 +595,17 @@ var init_HlsPlayer = __esm({
|
|
|
573
595
|
window.addEventListener("resize", checkMobile);
|
|
574
596
|
return () => window.removeEventListener("resize", checkMobile);
|
|
575
597
|
}, []);
|
|
598
|
+
(0, import_react32.useEffect)(() => {
|
|
599
|
+
const onFullscreenChange = () => {
|
|
600
|
+
setIsFullscreen(getFullscreenElement() === containerRef.current);
|
|
601
|
+
};
|
|
602
|
+
document.addEventListener("fullscreenchange", onFullscreenChange);
|
|
603
|
+
document.addEventListener("webkitfullscreenchange", onFullscreenChange);
|
|
604
|
+
return () => {
|
|
605
|
+
document.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
606
|
+
document.removeEventListener("webkitfullscreenchange", onFullscreenChange);
|
|
607
|
+
};
|
|
608
|
+
}, []);
|
|
576
609
|
(0, import_react32.useEffect)(() => {
|
|
577
610
|
if (isPlaying) {
|
|
578
611
|
setIsPosterVisible(false);
|
|
@@ -600,6 +633,7 @@ var init_HlsPlayer = __esm({
|
|
|
600
633
|
(0, import_react32.useEffect)(() => {
|
|
601
634
|
return () => {
|
|
602
635
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
636
|
+
if (clickTimerRef.current) clearTimeout(clickTimerRef.current);
|
|
603
637
|
};
|
|
604
638
|
}, []);
|
|
605
639
|
(0, import_react32.useEffect)(() => {
|
|
@@ -648,6 +682,28 @@ var init_HlsPlayer = __esm({
|
|
|
648
682
|
v.muted = !v.muted;
|
|
649
683
|
setIsMuted(v.muted);
|
|
650
684
|
}, []);
|
|
685
|
+
const handleFullscreenToggle = (0, import_react32.useCallback)(() => {
|
|
686
|
+
const container = containerRef.current;
|
|
687
|
+
if (!container) return;
|
|
688
|
+
if (getFullscreenElement() === container) {
|
|
689
|
+
exitFullscreen().catch(console.error);
|
|
690
|
+
} else {
|
|
691
|
+
requestFullscreen(container).catch(console.error);
|
|
692
|
+
}
|
|
693
|
+
}, []);
|
|
694
|
+
const handleVideoClick = (0, import_react32.useCallback)(() => {
|
|
695
|
+
if (clickTimerRef.current) clearTimeout(clickTimerRef.current);
|
|
696
|
+
clickTimerRef.current = setTimeout(() => {
|
|
697
|
+
handlePlayPause();
|
|
698
|
+
}, CLICK_DEBOUNCE);
|
|
699
|
+
}, [handlePlayPause]);
|
|
700
|
+
const handleVideoDoubleClick = (0, import_react32.useCallback)(() => {
|
|
701
|
+
if (clickTimerRef.current) {
|
|
702
|
+
clearTimeout(clickTimerRef.current);
|
|
703
|
+
clickTimerRef.current = null;
|
|
704
|
+
}
|
|
705
|
+
handleFullscreenToggle();
|
|
706
|
+
}, [handleFullscreenToggle]);
|
|
651
707
|
const handleMouseEnter = (0, import_react32.useCallback)(() => {
|
|
652
708
|
if (isMobile) return;
|
|
653
709
|
setIsHovered(true);
|
|
@@ -703,9 +759,11 @@ var init_HlsPlayer = __esm({
|
|
|
703
759
|
}, []);
|
|
704
760
|
if (resolvedSources.length === 0) return null;
|
|
705
761
|
const showMuteButton = !showControls && !isPlayOnHover;
|
|
762
|
+
const showExpandButton = !showControls && !isPlayOnHover;
|
|
706
763
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
707
764
|
"div",
|
|
708
765
|
{
|
|
766
|
+
ref: containerRef,
|
|
709
767
|
className: "relative w-full aspect-video bg-black",
|
|
710
768
|
onMouseEnter: handleMouseEnter,
|
|
711
769
|
onMouseLeave: handleMouseLeave,
|
|
@@ -721,8 +779,9 @@ var init_HlsPlayer = __esm({
|
|
|
721
779
|
muted: startsMuted,
|
|
722
780
|
autoPlay: playOptions === "autoplay",
|
|
723
781
|
loop,
|
|
724
|
-
onClick: handlePlayPause,
|
|
725
782
|
playsInline: true,
|
|
783
|
+
onClick: handleVideoClick,
|
|
784
|
+
onDoubleClick: handleVideoDoubleClick,
|
|
726
785
|
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
727
786
|
"source",
|
|
728
787
|
{
|
|
@@ -786,37 +845,63 @@ var init_HlsPlayer = __esm({
|
|
|
786
845
|
)
|
|
787
846
|
}
|
|
788
847
|
),
|
|
789
|
-
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
790
849
|
"div",
|
|
791
850
|
{
|
|
792
851
|
className: "absolute bottom-4 right-4 pointer-events-none",
|
|
793
852
|
style: {
|
|
853
|
+
display: "flex",
|
|
854
|
+
alignItems: "center",
|
|
855
|
+
gap: 8,
|
|
794
856
|
opacity: isControlsVisible ? 1 : 0,
|
|
795
857
|
transition: "opacity 0.3s ease"
|
|
796
858
|
},
|
|
797
|
-
children:
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
e
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
859
|
+
children: [
|
|
860
|
+
showMuteButton && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
861
|
+
"button",
|
|
862
|
+
{
|
|
863
|
+
type: "button",
|
|
864
|
+
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
865
|
+
onClick: (e) => {
|
|
866
|
+
e.stopPropagation();
|
|
867
|
+
handleMuteToggle();
|
|
868
|
+
},
|
|
869
|
+
style: overlayButtonStyle,
|
|
870
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
871
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
872
|
+
children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("line", { x1: "23", y1: "9", x2: "17", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("line", { x1: "17", y1: "9", x2: "23", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
876
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
880
|
+
] })
|
|
881
|
+
}
|
|
882
|
+
),
|
|
883
|
+
showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
884
|
+
"button",
|
|
885
|
+
{
|
|
886
|
+
type: "button",
|
|
887
|
+
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
888
|
+
onClick: (e) => {
|
|
889
|
+
e.stopPropagation();
|
|
890
|
+
handleFullscreenToggle();
|
|
891
|
+
},
|
|
892
|
+
style: overlayButtonStyle,
|
|
893
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
894
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
895
|
+
children: isFullscreen ? (
|
|
896
|
+
/* Compress / exit icon — two inward-pointing arrows */
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M8 3v5H3M21 8h-5V3M3 16h5v5M16 21v-5h5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
898
|
+
) : (
|
|
899
|
+
/* Expand icon — four outward-pointing arrows */
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M3 8V3h5M16 3h5v5M21 16v5h-5M8 21H3v-5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
901
|
+
)
|
|
902
|
+
}
|
|
903
|
+
)
|
|
904
|
+
]
|
|
820
905
|
}
|
|
821
906
|
)
|
|
822
907
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HlsPlayer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KCYY42RI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Button_default,
|
|
6
6
|
ClientButton_default,
|
|
@@ -1963,7 +1963,7 @@ var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
|
1963
1963
|
|
|
1964
1964
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1965
1965
|
import { Fragment as Fragment2, jsx as jsx37 } from "react/jsx-runtime";
|
|
1966
|
-
var HlsPlayer = dynamic2(() => import("./HlsPlayer-
|
|
1966
|
+
var HlsPlayer = dynamic2(() => import("./HlsPlayer-QZ2VOPBD.mjs"), {
|
|
1967
1967
|
ssr: false
|
|
1968
1968
|
});
|
|
1969
1969
|
var getNestedValue = (obj, path) => {
|
|
@@ -3645,7 +3645,7 @@ var Pagination_default = Pagination;
|
|
|
3645
3645
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3646
3646
|
import dynamic6 from "next/dynamic";
|
|
3647
3647
|
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3648
|
-
var HlsPlayer2 = dynamic6(() => import("./HlsPlayer-
|
|
3648
|
+
var HlsPlayer2 = dynamic6(() => import("./HlsPlayer-QZ2VOPBD.mjs"), { ssr: false });
|
|
3649
3649
|
var deviceToMediaQuery = (device) => {
|
|
3650
3650
|
switch (device) {
|
|
3651
3651
|
case "sm":
|
package/package.json
CHANGED