@drawbridge/components 0.0.57 → 0.0.59

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/video.js CHANGED
@@ -128,6 +128,18 @@ var Video = ({
128
128
  attributes: {
129
129
  "aria-label": "Decorative Video",
130
130
  poster
131
+ },
132
+ // Cap hls.js buffer-ahead. The default (~30s) makes a short
133
+ // looping hero eagerly pull most of the clip the instant
134
+ // playback starts — a big CDN-egress + mobile-data burst that
135
+ // multiplies under a viral spike. 10s buffers ~1-2 segments
136
+ // ahead and spreads the load across playback instead.
137
+ // IMPORTANT: do NOT set autoStartLoad:false here — a non-active
138
+ // gallery video must still load metadata so onDuration fires
139
+ // and its progress-bar duration is known before the carousel
140
+ // reaches it (see drawbridge-share template-subdomain-gallery).
141
+ hlsOptions: {
142
+ maxBufferLength: 10
131
143
  }
132
144
  }
133
145
  },
@@ -166,7 +178,11 @@ var Video = ({
166
178
  "div",
167
179
  {
168
180
  ...{
169
- className: "w-full h-full flex justify-center items-center"
181
+ // absolute overlay, NOT in-flow: an in-flow w-full/h-full loader
182
+ // borrows the reserved gallery box's height and collapses to 0
183
+ // when the video is ready = a ~0.65 CLS. Overlaying it (the box
184
+ // already reserves its height) means removing it shifts nothing.
185
+ className: "absolute inset-0 flex justify-center items-center"
170
186
  },
171
187
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
172
188
  loader_default,
package/dist/video.mjs CHANGED
@@ -55,6 +55,18 @@ var Video = ({
55
55
  attributes: {
56
56
  "aria-label": "Decorative Video",
57
57
  poster
58
+ },
59
+ // Cap hls.js buffer-ahead. The default (~30s) makes a short
60
+ // looping hero eagerly pull most of the clip the instant
61
+ // playback starts — a big CDN-egress + mobile-data burst that
62
+ // multiplies under a viral spike. 10s buffers ~1-2 segments
63
+ // ahead and spreads the load across playback instead.
64
+ // IMPORTANT: do NOT set autoStartLoad:false here — a non-active
65
+ // gallery video must still load metadata so onDuration fires
66
+ // and its progress-bar duration is known before the carousel
67
+ // reaches it (see drawbridge-share template-subdomain-gallery).
68
+ hlsOptions: {
69
+ maxBufferLength: 10
58
70
  }
59
71
  }
60
72
  },
@@ -93,7 +105,11 @@ var Video = ({
93
105
  "div",
94
106
  {
95
107
  ...{
96
- className: "w-full h-full flex justify-center items-center"
108
+ // absolute overlay, NOT in-flow: an in-flow w-full/h-full loader
109
+ // borrows the reserved gallery box's height and collapses to 0
110
+ // when the video is ready = a ~0.65 CLS. Overlaying it (the box
111
+ // already reserves its height) means removing it shifts nothing.
112
+ className: "absolute inset-0 flex justify-center items-center"
97
113
  },
98
114
  children: /* @__PURE__ */ jsx(
99
115
  loader_default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/components",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "exports": {
5
5
  "./advertisement": {
6
6
  "types": "./types/advertisement.d.ts",