@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260603061415 → 0.8.1-dev.20260603093340
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.
|
@@ -36,8 +36,7 @@ var HlsPlayer = React.memo(
|
|
|
36
36
|
showControls = true,
|
|
37
37
|
loop = false,
|
|
38
38
|
playOptions = "autoplay",
|
|
39
|
-
placementCode = ""
|
|
40
|
-
styles
|
|
39
|
+
placementCode = ""
|
|
41
40
|
}) => {
|
|
42
41
|
const containerRef = useRef(null);
|
|
43
42
|
const videoRef = useRef(null);
|
|
@@ -51,6 +50,7 @@ var HlsPlayer = React.memo(
|
|
|
51
50
|
const [isPosterVisible, setIsPosterVisible] = useState(true);
|
|
52
51
|
const [isMuted, setIsMuted] = useState(startsMuted);
|
|
53
52
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
53
|
+
const [isBuffering, setIsBuffering] = useState(false);
|
|
54
54
|
const wasManuallyPausedRef = useRef(false);
|
|
55
55
|
const inactivityTimerRef = useRef(null);
|
|
56
56
|
const clickTimerRef = useRef(null);
|
|
@@ -163,10 +163,14 @@ var HlsPlayer = React.memo(
|
|
|
163
163
|
v.play().catch(console.error).then(() => setIsPlaying(true));
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
|
+
v.addEventListener("playing", () => setIsBuffering(false), { once: true });
|
|
167
|
+
v.addEventListener("error", () => setIsBuffering(false), { once: true });
|
|
166
168
|
hlsRef.current = hls;
|
|
167
169
|
} else if (v.canPlayType("application/vnd.apple.mpegurl")) {
|
|
168
170
|
v.src = chosenSrc;
|
|
169
171
|
v.load();
|
|
172
|
+
v.addEventListener("playing", () => setIsBuffering(false), { once: true });
|
|
173
|
+
v.addEventListener("error", () => setIsBuffering(false), { once: true });
|
|
170
174
|
if (autoPlayAfterLoad) {
|
|
171
175
|
v.play().catch(console.error).then(() => setIsPlaying(true));
|
|
172
176
|
}
|
|
@@ -192,6 +196,7 @@ var HlsPlayer = React.memo(
|
|
|
192
196
|
const v = videoRef.current;
|
|
193
197
|
if (!v) return;
|
|
194
198
|
if (!hlsInitializedRef.current) {
|
|
199
|
+
setIsBuffering(true);
|
|
195
200
|
initHls(
|
|
196
201
|
/* autoPlayAfterLoad */
|
|
197
202
|
true
|
|
@@ -300,8 +305,7 @@ var HlsPlayer = React.memo(
|
|
|
300
305
|
"div",
|
|
301
306
|
{
|
|
302
307
|
ref: containerRef,
|
|
303
|
-
className: "relative w-full
|
|
304
|
-
style: styles,
|
|
308
|
+
className: "relative w-full aspect-video bg-black",
|
|
305
309
|
onMouseEnter: handleMouseEnter,
|
|
306
310
|
onMouseLeave: handleMouseLeave,
|
|
307
311
|
onMouseMove: handleMouseMove,
|
|
@@ -310,7 +314,7 @@ var HlsPlayer = React.memo(
|
|
|
310
314
|
"video",
|
|
311
315
|
{
|
|
312
316
|
ref: videoRef,
|
|
313
|
-
className: "w-full h-full object-
|
|
317
|
+
className: "w-full h-full object-contain",
|
|
314
318
|
poster: fallbackPoster,
|
|
315
319
|
controls: showControls && (isMobile || isPlaying),
|
|
316
320
|
muted: startsMuted,
|
|
@@ -364,7 +368,35 @@ var HlsPlayer = React.memo(
|
|
|
364
368
|
transform: scale(1.08);
|
|
365
369
|
}
|
|
366
370
|
` }),
|
|
367
|
-
|
|
371
|
+
isBuffering && /* @__PURE__ */ jsx(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
375
|
+
style: { zIndex: 10 },
|
|
376
|
+
children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
377
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
378
|
+
@keyframes hls-bounce {
|
|
379
|
+
0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
|
|
380
|
+
40% { transform: translateY(-10px); opacity: 1; }
|
|
381
|
+
}
|
|
382
|
+
.hls-dot {
|
|
383
|
+
width: clamp(8px, 1.5vmin, 12px);
|
|
384
|
+
height: clamp(8px, 1.5vmin, 12px);
|
|
385
|
+
border-radius: 50%;
|
|
386
|
+
background: white;
|
|
387
|
+
animation: hls-bounce 1.1s ease-in-out infinite;
|
|
388
|
+
}
|
|
389
|
+
.hls-dot:nth-child(1) { animation-delay: 0s; }
|
|
390
|
+
.hls-dot:nth-child(2) { animation-delay: 0.18s; }
|
|
391
|
+
.hls-dot:nth-child(3) { animation-delay: 0.36s; }
|
|
392
|
+
` }),
|
|
393
|
+
/* @__PURE__ */ jsx("div", { className: "hls-dot" }),
|
|
394
|
+
/* @__PURE__ */ jsx("div", { className: "hls-dot" }),
|
|
395
|
+
/* @__PURE__ */ jsx("div", { className: "hls-dot" })
|
|
396
|
+
] })
|
|
397
|
+
}
|
|
398
|
+
),
|
|
399
|
+
!isPlayOnHover && !isBuffering && /* @__PURE__ */ jsx(
|
|
368
400
|
"div",
|
|
369
401
|
{
|
|
370
402
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
package/dist/index.js
CHANGED
|
@@ -200,8 +200,7 @@ var init_HlsPlayer = __esm({
|
|
|
200
200
|
showControls = true,
|
|
201
201
|
loop = false,
|
|
202
202
|
playOptions = "autoplay",
|
|
203
|
-
placementCode = ""
|
|
204
|
-
styles
|
|
203
|
+
placementCode = ""
|
|
205
204
|
}) => {
|
|
206
205
|
const containerRef = (0, import_react4.useRef)(null);
|
|
207
206
|
const videoRef = (0, import_react4.useRef)(null);
|
|
@@ -215,6 +214,7 @@ var init_HlsPlayer = __esm({
|
|
|
215
214
|
const [isPosterVisible, setIsPosterVisible] = (0, import_react4.useState)(true);
|
|
216
215
|
const [isMuted, setIsMuted] = (0, import_react4.useState)(startsMuted);
|
|
217
216
|
const [isFullscreen, setIsFullscreen] = (0, import_react4.useState)(false);
|
|
217
|
+
const [isBuffering, setIsBuffering] = (0, import_react4.useState)(false);
|
|
218
218
|
const wasManuallyPausedRef = (0, import_react4.useRef)(false);
|
|
219
219
|
const inactivityTimerRef = (0, import_react4.useRef)(null);
|
|
220
220
|
const clickTimerRef = (0, import_react4.useRef)(null);
|
|
@@ -327,10 +327,14 @@ var init_HlsPlayer = __esm({
|
|
|
327
327
|
v.play().catch(console.error).then(() => setIsPlaying(true));
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
|
+
v.addEventListener("playing", () => setIsBuffering(false), { once: true });
|
|
331
|
+
v.addEventListener("error", () => setIsBuffering(false), { once: true });
|
|
330
332
|
hlsRef.current = hls;
|
|
331
333
|
} else if (v.canPlayType("application/vnd.apple.mpegurl")) {
|
|
332
334
|
v.src = chosenSrc;
|
|
333
335
|
v.load();
|
|
336
|
+
v.addEventListener("playing", () => setIsBuffering(false), { once: true });
|
|
337
|
+
v.addEventListener("error", () => setIsBuffering(false), { once: true });
|
|
334
338
|
if (autoPlayAfterLoad) {
|
|
335
339
|
v.play().catch(console.error).then(() => setIsPlaying(true));
|
|
336
340
|
}
|
|
@@ -356,6 +360,7 @@ var init_HlsPlayer = __esm({
|
|
|
356
360
|
const v = videoRef.current;
|
|
357
361
|
if (!v) return;
|
|
358
362
|
if (!hlsInitializedRef.current) {
|
|
363
|
+
setIsBuffering(true);
|
|
359
364
|
initHls(
|
|
360
365
|
/* autoPlayAfterLoad */
|
|
361
366
|
true
|
|
@@ -464,8 +469,7 @@ var init_HlsPlayer = __esm({
|
|
|
464
469
|
"div",
|
|
465
470
|
{
|
|
466
471
|
ref: containerRef,
|
|
467
|
-
className: "relative w-full
|
|
468
|
-
style: styles,
|
|
472
|
+
className: "relative w-full aspect-video bg-black",
|
|
469
473
|
onMouseEnter: handleMouseEnter,
|
|
470
474
|
onMouseLeave: handleMouseLeave,
|
|
471
475
|
onMouseMove: handleMouseMove,
|
|
@@ -474,7 +478,7 @@ var init_HlsPlayer = __esm({
|
|
|
474
478
|
"video",
|
|
475
479
|
{
|
|
476
480
|
ref: videoRef,
|
|
477
|
-
className: "w-full h-full object-
|
|
481
|
+
className: "w-full h-full object-contain",
|
|
478
482
|
poster: fallbackPoster,
|
|
479
483
|
controls: showControls && (isMobile || isPlaying),
|
|
480
484
|
muted: startsMuted,
|
|
@@ -528,7 +532,35 @@ var init_HlsPlayer = __esm({
|
|
|
528
532
|
transform: scale(1.08);
|
|
529
533
|
}
|
|
530
534
|
` }),
|
|
531
|
-
|
|
535
|
+
isBuffering && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
536
|
+
"div",
|
|
537
|
+
{
|
|
538
|
+
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
539
|
+
style: { zIndex: 10 },
|
|
540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
541
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("style", { children: `
|
|
542
|
+
@keyframes hls-bounce {
|
|
543
|
+
0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
|
|
544
|
+
40% { transform: translateY(-10px); opacity: 1; }
|
|
545
|
+
}
|
|
546
|
+
.hls-dot {
|
|
547
|
+
width: clamp(8px, 1.5vmin, 12px);
|
|
548
|
+
height: clamp(8px, 1.5vmin, 12px);
|
|
549
|
+
border-radius: 50%;
|
|
550
|
+
background: white;
|
|
551
|
+
animation: hls-bounce 1.1s ease-in-out infinite;
|
|
552
|
+
}
|
|
553
|
+
.hls-dot:nth-child(1) { animation-delay: 0s; }
|
|
554
|
+
.hls-dot:nth-child(2) { animation-delay: 0.18s; }
|
|
555
|
+
.hls-dot:nth-child(3) { animation-delay: 0.36s; }
|
|
556
|
+
` }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "hls-dot" }),
|
|
558
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "hls-dot" }),
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "hls-dot" })
|
|
560
|
+
] })
|
|
561
|
+
}
|
|
562
|
+
),
|
|
563
|
+
!isPlayOnHover && !isBuffering && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
532
564
|
"div",
|
|
533
565
|
{
|
|
534
566
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HlsPlayer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4XZGG725.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Button_default,
|
|
6
6
|
ClientButton_default,
|
|
@@ -2055,7 +2055,7 @@ import React30 from "react";
|
|
|
2055
2055
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2056
2056
|
import dynamic3 from "next/dynamic";
|
|
2057
2057
|
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2058
|
-
var HlsPlayer = dynamic3(() => import("./HlsPlayer-
|
|
2058
|
+
var HlsPlayer = dynamic3(() => import("./HlsPlayer-SM3WGJSW.mjs"), { ssr: false });
|
|
2059
2059
|
var getNestedValue = (obj, path) => {
|
|
2060
2060
|
if (!obj || !path) return void 0;
|
|
2061
2061
|
return path.split(".").reduce((current, key) => {
|
|
@@ -3715,7 +3715,7 @@ var Pagination_default = Pagination;
|
|
|
3715
3715
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3716
3716
|
import dynamic7 from "next/dynamic";
|
|
3717
3717
|
import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3718
|
-
var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-
|
|
3718
|
+
var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-SM3WGJSW.mjs"), { ssr: false });
|
|
3719
3719
|
var deviceToMediaQuery = (device) => {
|
|
3720
3720
|
switch (device) {
|
|
3721
3721
|
case "sm":
|
package/package.json
CHANGED