@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260525045412 → 0.8.1-dev.20260525053215

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  HlsPlayer_default
4
- } from "./chunk-BYK57CMC.mjs";
4
+ } from "./chunk-F6CXFHUE.mjs";
5
5
  export {
6
6
  HlsPlayer_default as default
7
7
  };
@@ -174,17 +174,11 @@ var HlsPlayer = React.memo(
174
174
  useEffect(() => {
175
175
  if (!isInView) return;
176
176
  if (isPlayOnHover) return;
177
- if (playOptions === "autoplay") {
178
- initHls(
179
- /* autoPlayAfterLoad */
180
- true
181
- );
182
- } else {
183
- initHls(
184
- /* autoPlayAfterLoad */
185
- false
186
- );
187
- }
177
+ if (playOptions !== "autoplay") return;
178
+ initHls(
179
+ /* autoPlayAfterLoad */
180
+ true
181
+ );
188
182
  return () => {
189
183
  if (hlsRef.current) {
190
184
  hlsRef.current.destroy();
@@ -192,7 +186,7 @@ var HlsPlayer = React.memo(
192
186
  }
193
187
  hlsInitializedRef.current = false;
194
188
  };
195
- }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView]);
189
+ }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView, playOptions]);
196
190
  const handlePlayPause = useCallback(() => {
197
191
  const v = videoRef.current;
198
192
  if (!v) return;
@@ -321,10 +315,10 @@ var HlsPlayer = React.memo(
321
315
  autoPlay: playOptions === "autoplay",
322
316
  loop,
323
317
  playsInline: true,
324
- preload: isPlayOnHover ? "none" : "auto",
318
+ preload: playOptions === "autoplay" ? "auto" : "none",
325
319
  onClick: handleVideoClick,
326
320
  onDoubleClick: handleVideoDoubleClick,
327
- children: !isPlayOnHover && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ jsx(
321
+ children: playOptions === "autoplay" && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ jsx(
328
322
  "source",
329
323
  {
330
324
  src,
package/dist/index.js CHANGED
@@ -338,17 +338,11 @@ var init_HlsPlayer = __esm({
338
338
  (0, import_react4.useEffect)(() => {
339
339
  if (!isInView) return;
340
340
  if (isPlayOnHover) return;
341
- if (playOptions === "autoplay") {
342
- initHls(
343
- /* autoPlayAfterLoad */
344
- true
345
- );
346
- } else {
347
- initHls(
348
- /* autoPlayAfterLoad */
349
- false
350
- );
351
- }
341
+ if (playOptions !== "autoplay") return;
342
+ initHls(
343
+ /* autoPlayAfterLoad */
344
+ true
345
+ );
352
346
  return () => {
353
347
  if (hlsRef.current) {
354
348
  hlsRef.current.destroy();
@@ -356,7 +350,7 @@ var init_HlsPlayer = __esm({
356
350
  }
357
351
  hlsInitializedRef.current = false;
358
352
  };
359
- }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView]);
353
+ }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView, playOptions]);
360
354
  const handlePlayPause = (0, import_react4.useCallback)(() => {
361
355
  const v = videoRef.current;
362
356
  if (!v) return;
@@ -485,10 +479,10 @@ var init_HlsPlayer = __esm({
485
479
  autoPlay: playOptions === "autoplay",
486
480
  loop,
487
481
  playsInline: true,
488
- preload: isPlayOnHover ? "none" : "auto",
482
+ preload: playOptions === "autoplay" ? "auto" : "none",
489
483
  onClick: handleVideoClick,
490
484
  onDoubleClick: handleVideoDoubleClick,
491
- children: !isPlayOnHover && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
485
+ children: playOptions === "autoplay" && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
492
486
  "source",
493
487
  {
494
488
  src,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HlsPlayer_default
3
- } from "./chunk-BYK57CMC.mjs";
3
+ } from "./chunk-F6CXFHUE.mjs";
4
4
  import {
5
5
  Button_default,
6
6
  ClientButton_default,
@@ -1975,7 +1975,7 @@ import React28 from "react";
1975
1975
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
1976
1976
  import dynamic3 from "next/dynamic";
1977
1977
  import { jsx as jsx38 } from "react/jsx-runtime";
1978
- var HlsPlayer = dynamic3(() => import("./HlsPlayer-OPTPF5PZ.mjs"), { ssr: false });
1978
+ var HlsPlayer = dynamic3(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
1979
1979
  var getNestedValue = (obj, path) => {
1980
1980
  if (!obj || !path) return void 0;
1981
1981
  return path.split(".").reduce((current, key) => {
@@ -3632,7 +3632,7 @@ var Pagination_default = Pagination;
3632
3632
  // src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
3633
3633
  import dynamic7 from "next/dynamic";
3634
3634
  import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
3635
- var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-OPTPF5PZ.mjs"), { ssr: false });
3635
+ var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
3636
3636
  var deviceToMediaQuery = (device) => {
3637
3637
  switch (device) {
3638
3638
  case "sm":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260525045412",
3
+ "version": "0.8.1-dev.20260525053215",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",