@ticketboothapp/booking 1.2.27 → 1.2.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketboothapp/booking",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -47,8 +47,13 @@ const FILTER_PRODUCT_IDS: Record<string, string[]> = {
47
47
  export const FILTER_IDS = ['all', 'sunrise', 'moraine-lake', 'lake-louise', 'emerald-lake', 'private'] as const;
48
48
  export type FilterId = (typeof FILTER_IDS)[number];
49
49
 
50
- function getVideoForProduct(product: Product) {
51
- return product.videoUrl ?? DEFAULT_VIDEO;
50
+ /** Only `src` / `webm` — never spread catalog `VideoSources` onto BackgroundPlayer (`longSrc`/`longWebm` are not valid DOM props). */
51
+ function backgroundPlayerSources(product: Product): { src: string; webm: string } {
52
+ const v = product.videoUrl ?? DEFAULT_VIDEO;
53
+ if (v.longSrc && v.longWebm) {
54
+ return { src: v.longSrc, webm: v.longWebm };
55
+ }
56
+ return { src: v.src, webm: v.webm };
52
57
  }
53
58
 
54
59
  function BookingProductTileCollapsed({
@@ -206,7 +211,7 @@ function BookingProductTileExpanded({
206
211
  </motion.svg>
207
212
  </button>
208
213
  <BackgroundPlayer
209
- {...getVideoForProduct(product)}
214
+ {...backgroundPlayerSources(product)}
210
215
  autoPlay
211
216
  muted
212
217
  loop