@lumiastream/ui 0.7.4 → 0.7.5

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/index.js CHANGED
@@ -4356,7 +4356,7 @@ function mapVideo(widget, ctx) {
4356
4356
  src: widget.video?.src ?? "",
4357
4357
  volume: widget.video?.volume ?? 0.5,
4358
4358
  loop: true,
4359
- muted: false
4359
+ playAudio: (widget.video?.volume ?? 0.5) > 0
4360
4360
  }
4361
4361
  },
4362
4362
  ctx
@@ -5877,12 +5877,8 @@ function mapSlideshow(widget, ctx) {
5877
5877
  {
5878
5878
  content: {
5879
5879
  src: items,
5880
- // `interval` of 0 = "rapid cycle" in SE (no delay between images); Lumia's
5881
- // `imageDuration` is the total ms per image. Distinguish three cases:
5882
- // - undefined → use 5000ms default
5883
- // - 0 → minimum sane cycle of 100ms (browsers can't render faster than ~60fps anyway)
5884
- // - >0 → SE seconds * 1000
5885
- imageDuration: typeof v.interval === "number" ? v.interval === 0 ? 100 : v.interval * 1e3 : 5e3,
5880
+ // SE image-rotator per-image dwell time is `duration` (seconds); `interval` is a legacy fallback (often 0), never the timing source.
5881
+ imageDuration: typeof v.duration === "number" && v.duration > 0 ? v.duration * 1e3 : typeof v.interval === "number" && v.interval > 0 ? v.interval * 1e3 : 5e3,
5886
5882
  loop: v.loop !== false,
5887
5883
  loopDelay: 0,
5888
5884
  delay: 0,
@@ -11980,7 +11976,7 @@ function mapCompositeField(name, field, groupId, zIndex, provider, canvas) {
11980
11976
  styleToBounds(field.style, "video", canvas),
11981
11977
  "video",
11982
11978
  name,
11983
- { src, volume, loop: true, autoplay: true, muted: volume === 0 }
11979
+ { src, volume, loop: true, playAudio: volume > 0 }
11984
11980
  );
11985
11981
  }
11986
11982
  case "image": {
package/dist/se-import.js CHANGED
@@ -1273,7 +1273,7 @@ function mapVideo(widget, ctx) {
1273
1273
  src: widget.video?.src ?? "",
1274
1274
  volume: widget.video?.volume ?? 0.5,
1275
1275
  loop: true,
1276
- muted: false
1276
+ playAudio: (widget.video?.volume ?? 0.5) > 0
1277
1277
  }
1278
1278
  },
1279
1279
  ctx
@@ -2794,12 +2794,8 @@ function mapSlideshow(widget, ctx) {
2794
2794
  {
2795
2795
  content: {
2796
2796
  src: items,
2797
- // `interval` of 0 = "rapid cycle" in SE (no delay between images); Lumia's
2798
- // `imageDuration` is the total ms per image. Distinguish three cases:
2799
- // - undefined → use 5000ms default
2800
- // - 0 → minimum sane cycle of 100ms (browsers can't render faster than ~60fps anyway)
2801
- // - >0 → SE seconds * 1000
2802
- imageDuration: typeof v.interval === "number" ? v.interval === 0 ? 100 : v.interval * 1e3 : 5e3,
2797
+ // SE image-rotator per-image dwell time is `duration` (seconds); `interval` is a legacy fallback (often 0), never the timing source.
2798
+ imageDuration: typeof v.duration === "number" && v.duration > 0 ? v.duration * 1e3 : typeof v.interval === "number" && v.interval > 0 ? v.interval * 1e3 : 5e3,
2803
2799
  loop: v.loop !== false,
2804
2800
  loopDelay: 0,
2805
2801
  delay: 0,
@@ -10853,7 +10849,7 @@ function mapCompositeField(name, field, groupId, zIndex, provider, canvas) {
10853
10849
  styleToBounds(field.style, "video", canvas),
10854
10850
  "video",
10855
10851
  name,
10856
- { src, volume, loop: true, autoplay: true, muted: volume === 0 }
10852
+ { src, volume, loop: true, playAudio: volume > 0 }
10857
10853
  );
10858
10854
  }
10859
10855
  case "image": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/ui",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "author": "Lumia Stream",
5
5
  "license": "ISC",
6
6
  "description": "Lumia UI Kit",