@uniweb/core 1.6.12 → 1.6.13

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/block.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/core",
3
- "version": "1.6.12",
3
+ "version": "1.6.13",
4
4
  "description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
5
5
  "type": "module",
6
6
  "exports": {
@@ -53,7 +53,7 @@
53
53
  "vitest": "^4.1.7"
54
54
  },
55
55
  "dependencies": {
56
- "@uniweb/semantic-parser": "~1.13.2",
56
+ "@uniweb/semantic-parser": "~1.13.5",
57
57
  "@uniweb/theming": "~1.3.2"
58
58
  },
59
59
  "scripts": {
package/src/block.js CHANGED
@@ -911,6 +911,14 @@ export default class Block {
911
911
  const url = resolveAssetUrl(media.assetId, media.assetExt, pattern)
912
912
  if (url) out = { ...out, [key]: { ...media, src: url } }
913
913
  }
914
+ // ⭐ An uploaded video named no poster: the one its host makes of it, where the host states
915
+ // their address (`config.assets.poster`), as the parser does for a video in content. Derived
916
+ // here, never stored; the background's own poster always wins.
917
+ const video = out.video
918
+ if (video && typeof video === 'object' && !video.poster) {
919
+ const poster = resolveAssetUrl(video.assetId, video.assetExt, options?.assets?.poster)
920
+ if (poster) out = { ...out, video: { ...video, poster } }
921
+ }
914
922
  return out
915
923
  }
916
924