cursedbelt 4.1.1 → 4.3.0
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/react/media/CanvasVideoPlayer.d.ts +3 -2
- package/dist/react/media/CanvasVideoPlayer.d.ts.map +1 -1
- package/dist/react/media/CanvasVideoPlayer.js +4 -3
- package/dist/react/media/CanvasVideoPlayer.js.map +1 -1
- package/dist/react/media/FrameGrabber.d.ts +16 -2
- package/dist/react/media/FrameGrabber.d.ts.map +1 -1
- package/dist/react/media/FrameGrabber.js +68 -43
- package/dist/react/media/FrameGrabber.js.map +1 -1
- package/dist/react/media/PictureEditor.d.ts +17 -2
- package/dist/react/media/PictureEditor.d.ts.map +1 -1
- package/dist/react/media/PictureEditor.js +33 -7
- package/dist/react/media/PictureEditor.js.map +1 -1
- package/dist/react/media/VideoChapterEditor.d.ts +17 -2
- package/dist/react/media/VideoChapterEditor.d.ts.map +1 -1
- package/dist/react/media/VideoChapterEditor.js +21 -3
- package/dist/react/media/VideoChapterEditor.js.map +1 -1
- package/dist/react/media/VideoCutEditor.d.ts +16 -2
- package/dist/react/media/VideoCutEditor.d.ts.map +1 -1
- package/dist/react/media/VideoCutEditor.js +21 -3
- package/dist/react/media/VideoCutEditor.js.map +1 -1
- package/dist/react/media/VideoPlayer.d.ts +37 -9
- package/dist/react/media/VideoPlayer.d.ts.map +1 -1
- package/dist/react/media/VideoPlayer.js +130 -39
- package/dist/react/media/VideoPlayer.js.map +1 -1
- package/dist/react/media/hlsSource.d.ts +24 -3
- package/dist/react/media/hlsSource.d.ts.map +1 -1
- package/dist/react/media/hlsSource.js +109 -8
- package/dist/react/media/hlsSource.js.map +1 -1
- package/dist/react/media/pictureEditor.css +2 -0
- package/dist/react/media/sourceFault.d.ts +146 -0
- package/dist/react/media/sourceFault.d.ts.map +1 -0
- package/dist/react/media/sourceFault.js +139 -0
- package/dist/react/media/sourceFault.js.map +1 -0
- package/dist/react/media/videoChapterEditor.css +19 -0
- package/dist/react/media/videoCutEditor.css +22 -0
- package/dist/react/media-gallery/MediaGallery.d.ts +12 -1
- package/dist/react/media-gallery/MediaGallery.d.ts.map +1 -1
- package/dist/react/media-gallery/MediaGallery.js +166 -13
- package/dist/react/media-gallery/MediaGallery.js.map +1 -1
- package/dist/react/media-gallery/galleryItemMedia.d.ts +4 -0
- package/dist/react/media-gallery/galleryItemMedia.d.ts.map +1 -1
- package/dist/react/media-gallery/galleryItemMedia.js +27 -3
- package/dist/react/media-gallery/galleryItemMedia.js.map +1 -1
- package/dist/react/media-gallery/mediaGalleryModel.d.ts.map +1 -1
- package/dist/react/media-gallery/mediaGalleryModel.js +5 -0
- package/dist/react/media-gallery/mediaGalleryModel.js.map +1 -1
- package/dist/react/media-gallery/types.d.ts +23 -0
- package/dist/react/media-gallery/types.d.ts.map +1 -1
- package/dist/scripts/guardrailsEnforce.d.ts +1 -0
- package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
- package/dist/styles-areas/media-gallery.css +1 -1
- package/dist/styles-areas/media.css +1 -1
- package/package.json +3 -2
- package/scripts/guardrailsEnforce.spec.ts +244 -1
- package/scripts/guardrailsEnforce.ts +224 -7
- package/src/react/media/CanvasVideoPlayer.tsx +11 -6
- package/src/react/media/FrameGrabber.spec.tsx +57 -1
- package/src/react/media/FrameGrabber.tsx +138 -84
- package/src/react/media/PictureEditor.spec.tsx +90 -0
- package/src/react/media/PictureEditor.tsx +78 -23
- package/src/react/media/VideoChapterEditor.spec.tsx +86 -0
- package/src/react/media/VideoChapterEditor.tsx +64 -18
- package/src/react/media/VideoCutEditor.spec.tsx +44 -0
- package/src/react/media/VideoCutEditor.tsx +63 -18
- package/src/react/media/VideoPlayer.spec.tsx +101 -0
- package/src/react/media/VideoPlayer.tsx +221 -73
- package/src/react/media/hlsSource.answer.spec.ts +255 -0
- package/src/react/media/hlsSource.ts +136 -8
- package/src/react/media/pictureEditor.css +2 -0
- package/src/react/media/sourceFault.spec.tsx +224 -0
- package/src/react/media/sourceFault.tsx +220 -0
- package/src/react/media/videoChapterEditor.css +19 -0
- package/src/react/media/videoCutEditor.css +22 -0
- package/src/react/media-gallery/MediaGallery.spec.tsx +288 -0
- package/src/react/media-gallery/MediaGallery.tsx +356 -45
- package/src/react/media-gallery/galleryItemMedia.tsx +27 -4
- package/src/react/media-gallery/mediaGalleryModel.spec.ts +36 -0
- package/src/react/media-gallery/mediaGalleryModel.ts +4 -0
- package/src/react/media-gallery/types.ts +23 -0
- package/src/styles-areas/media-gallery.css +1 -1
- package/src/styles-areas/media.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.js","sourceRoot":"","sources":["../../../src/react/media/VideoPlayer.tsx"],"names":[],"mappings":";AAAA,OAAO,iDAAiD,CAAC;AACzD,OAAO,yDAAyD,CAAC;AACjE,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EAEX,aAAa,EAEb,MAAM,EACN,KAAK,EACL,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAElB,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAsD,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EAEjB,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAA0C,MAAM,iBAAiB,CAAC;AAuGvF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,oCAAoC,CAClD,MAAwF,EACxF,MAA0B;IAE1B,IAAI,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC;QAAE,OAAO;IAChD,2FAA2F;IAC3F,yFAAyF;IACzF,4EAA4E;IAC5E,IAAI,MAAM,CAA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,CAAC,GAAG,OAAO,GAAG;4BAC5C,MAAM,EAAE,MAAM;4BACd,UAAU,EAAE,kCAAkC;4BAC9C,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;4BACrD,SAAS,EAAE,aAAa;gCACtB,CAAC,CAAC,6DAA6D;gCAC/D,CAAC,CAAC,SAAS;yBACd,GACD,IACE,IACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { type SourceFault } from './sourceFault';
|
|
2
|
+
/** Which of a surface's two URLs the fault is about. */
|
|
3
|
+
export type HlsSourceKind = 'ladder' | 'stream';
|
|
4
|
+
export interface HlsSourceHooks {
|
|
5
|
+
/**
|
|
6
|
+
* Called when a source ANSWERED with something other than the bytes and there is nothing
|
|
7
|
+
* left to fall back to — i.e. the progressive copy, which is the one that always exists.
|
|
8
|
+
*
|
|
9
|
+
* 🔴 A fault on the LADDER alone never reaches here, and must not: a missing ladder is the
|
|
10
|
+
* ordinary state of most of a library, the remux plays, and a viewer told "gone" about a
|
|
11
|
+
* film that is about to start watching is worse off than one told nothing.
|
|
12
|
+
*/
|
|
13
|
+
onFault?: (fault: SourceFault, source: HlsSourceKind) => void;
|
|
14
|
+
}
|
|
1
15
|
/** Which URLs a surface has for one video. `streamUrl` is the one that always exists. */
|
|
2
16
|
export interface HlsSourceUrls {
|
|
3
17
|
/** The adaptive ladder's MASTER playlist, when one has been built. */
|
|
@@ -76,9 +90,16 @@ export declare const HLS_CONFIG: {
|
|
|
76
90
|
readonly manifestLoadingTimeOut: 30000;
|
|
77
91
|
readonly levelLoadingTimeOut: 30000;
|
|
78
92
|
};
|
|
79
|
-
export declare function attachHlsSource(el: HTMLVideoElement, urls: HlsSourceUrls): () => void;
|
|
80
|
-
/**
|
|
93
|
+
export declare function attachHlsSource(el: HTMLVideoElement, urls: HlsSourceUrls, hooks?: HlsSourceHooks): () => void;
|
|
94
|
+
/**
|
|
95
|
+
* {@link attachHlsSource} as an effect, re-attaching whenever either URL changes.
|
|
96
|
+
*
|
|
97
|
+
* 🔴 `onFault` is held in a REF, not listed as a dependency. A consumer passing the inline
|
|
98
|
+
* arrow this hook invites would otherwise tear the engine down and re-attach it on every
|
|
99
|
+
* render — which on a playing video is a re-buffer caused by something happening elsewhere on
|
|
100
|
+
* the page, and it is the same shape of bug the `slots` memo in `VideoPlayer` exists for.
|
|
101
|
+
*/
|
|
81
102
|
export declare function useHlsSource(ref: {
|
|
82
103
|
current: HTMLVideoElement | null;
|
|
83
|
-
}, urls: HlsSourceUrls): void;
|
|
104
|
+
}, urls: HlsSourceUrls, hooks?: HlsSourceHooks): void;
|
|
84
105
|
//# sourceMappingURL=hlsSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hlsSource.d.ts","sourceRoot":"","sources":["../../../src/react/media/hlsSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hlsSource.d.ts","sourceRoot":"","sources":["../../../src/react/media/hlsSource.ts"],"names":[],"mappings":"AAsFA,OAAO,EAAoB,KAAK,WAAW,EAAyB,MAAM,eAAe,CAAC;AAqB1F,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC/D;AAED,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAEhE;AAED;;;;;GAKG;AACH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC;AAKjC;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;IAErB;;;;;;;;;OASG;;IAEH,2EAA2E;;IAE3E,uFAAuF;;IAEvF;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;IAEH;oFACgF;;;;CAIxE,CAAC;AAEX,wBAAgB,eAAe,CAC7B,EAAE,EAAE,gBAAgB,EACpB,IAAI,EAAE,aAAa,EACnB,KAAK,GAAE,cAAmB,GACzB,MAAM,IAAI,CAiLZ;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE;IAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAE,EACzC,IAAI,EAAE,aAAa,EACnB,KAAK,GAAE,cAAmB,GACzB,IAAI,CAoBN"}
|
|
@@ -54,6 +54,27 @@
|
|
|
54
54
|
* not have had. That is the property `RECOVERY_BUDGET` bounds; without a budget a genuinely
|
|
55
55
|
* dead ladder becomes an infinite reload loop, which is the same spinner with more requests.
|
|
56
56
|
*
|
|
57
|
+
* ── 🔴 An ANSWER is not a hang, and a 404 was being waited out ──────────────────────────
|
|
58
|
+
* Owner, 2026-09-17: *"make a 404 stop the media player spinner so I don't think it's going
|
|
59
|
+
* to eventually load."* The recovery machinery above is right for a blip and exactly wrong
|
|
60
|
+
* for an answer: a ladder whose master replies `404` in 0.2 s went through four `startLoad()`
|
|
61
|
+
* calls and twelve seconds of backoff before the fallback it could have taken immediately,
|
|
62
|
+
* and a progressive copy that replies `404` produced a bare `error` event with no status on
|
|
63
|
+
* it, which every surface drew as "still loading" for ever.
|
|
64
|
+
*
|
|
65
|
+
* So two things happen here that did not before, and neither weakens the recoveries above:
|
|
66
|
+
*
|
|
67
|
+
* · a fatal hls.js error that carries an HTTP status (`data.response.code`) skips the
|
|
68
|
+
* budget entirely — `404`/`410` is final and `403` is a stale token, and asking either
|
|
69
|
+
* again cannot change the reply. Errors with NO status are the timeouts and stalls the
|
|
70
|
+
* budget was always for, and they still spend it.
|
|
71
|
+
* · the element's own `error` event is listened to. On the LADDER it means this browser's
|
|
72
|
+
* native HLS could not have it, so the progressive copy gets its turn — before this, a
|
|
73
|
+
* 404 ladder on an iPhone was simply a dead player, because that branch had no fallback
|
|
74
|
+
* at all. On the PROGRESSIVE copy there is nothing left to fall back to, so the URL is
|
|
75
|
+
* probed for its status and `onFault` says what it was; `sourceFault.ts` explains why a
|
|
76
|
+
* probe is the only way to read a status off a `<video>`.
|
|
77
|
+
*
|
|
57
78
|
* ── 🔴 The config is tuned for a HIGH-LATENCY origin, which is what this fleet has ───────
|
|
58
79
|
* hls.js's defaults assume a CDN. These segments come off a home Mac through a tunnel when
|
|
59
80
|
* the edge does not hold them: measured 2026-09-17, a cold segment is 1,215–2,613 ms against
|
|
@@ -62,7 +83,8 @@
|
|
|
62
83
|
* starting bandwidth estimate makes it open on the bottom rung and climb. Both are widened
|
|
63
84
|
* below, each with its number's reason on the line.
|
|
64
85
|
*/
|
|
65
|
-
import { useEffect } from 'react';
|
|
86
|
+
import { useEffect, useRef } from 'react';
|
|
87
|
+
import { probeSourceFault, sourceFaultFromStatus } from './sourceFault';
|
|
66
88
|
/**
|
|
67
89
|
* Does this element's browser play HLS by itself? Safari, iOS and iPadOS do; Chrome and
|
|
68
90
|
* Firefox do not.
|
|
@@ -138,10 +160,18 @@ export const HLS_CONFIG = {
|
|
|
138
160
|
manifestLoadingTimeOut: 30_000,
|
|
139
161
|
levelLoadingTimeOut: 30_000,
|
|
140
162
|
};
|
|
141
|
-
export function attachHlsSource(el, urls) {
|
|
163
|
+
export function attachHlsSource(el, urls, hooks = {}) {
|
|
142
164
|
let destroyed = false;
|
|
143
165
|
let engine = null;
|
|
144
166
|
let pendingRetry = null;
|
|
167
|
+
/**
|
|
168
|
+
* Which URL the element is pointed at right now, because the `error` event does not say and
|
|
169
|
+
* the two mean opposite things: on the ladder it means "try the copy that always exists",
|
|
170
|
+
* on the stream it means "there is nothing else, say so".
|
|
171
|
+
*/
|
|
172
|
+
let attached = 'stream';
|
|
173
|
+
/** The fallback is a one-way door — a second one would re-point a source already playing. */
|
|
174
|
+
let fellBack = false;
|
|
145
175
|
/**
|
|
146
176
|
* Abandon the ladder for the progressive copy, AT THE POSITION PLAYBACK HAD REACHED.
|
|
147
177
|
*
|
|
@@ -151,8 +181,10 @@ export function attachHlsSource(el, urls) {
|
|
|
151
181
|
* the engine is destroyed, because destroying it detaches the MediaSource and resets it.
|
|
152
182
|
*/
|
|
153
183
|
const fallBackToProgressive = () => {
|
|
154
|
-
if (destroyed)
|
|
184
|
+
if (destroyed || fellBack)
|
|
155
185
|
return;
|
|
186
|
+
fellBack = true;
|
|
187
|
+
attached = 'stream';
|
|
156
188
|
const at = Number.isFinite(el.currentTime) ? el.currentTime : 0;
|
|
157
189
|
const wasPlaying = !el.paused;
|
|
158
190
|
engine?.destroy();
|
|
@@ -173,7 +205,45 @@ export function attachHlsSource(el, urls) {
|
|
|
173
205
|
}, { once: true });
|
|
174
206
|
}
|
|
175
207
|
};
|
|
208
|
+
/**
|
|
209
|
+
* The element gave up. 🔴 That is an EVENT, so by definition it is not a hang — whatever
|
|
210
|
+
* happens next, the spinner has to stop being the answer.
|
|
211
|
+
*/
|
|
212
|
+
const onElementError = () => {
|
|
213
|
+
if (destroyed)
|
|
214
|
+
return;
|
|
215
|
+
/*
|
|
216
|
+
* 🔴 While an hls.js engine is attached, the element's errors are ITS errors. The library
|
|
217
|
+
* listens to this same event, turns it into a fatal `MEDIA_ERROR` and expects the
|
|
218
|
+
* application to answer with `recoverMediaError()` — which the ERROR handler below does.
|
|
219
|
+
* Acting here as well would abandon the ladder for the progressive copy on the first
|
|
220
|
+
* buffer stall, undoing `100206d` and putting a 467 MB uncacheable stream in front of a
|
|
221
|
+
* recovery that costs nothing. After a fallback the engine is gone and this is live again.
|
|
222
|
+
*/
|
|
223
|
+
if (engine)
|
|
224
|
+
return;
|
|
225
|
+
if (attached === 'ladder') {
|
|
226
|
+
// A ladder this browser's native HLS could not load — a 404 master, a half-written
|
|
227
|
+
// tree, a rung that is not there. The remux is the copy that always exists.
|
|
228
|
+
fallBackToProgressive();
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
// Nothing left to try, so the only useful act is to name the reason. `currentSrc` is what
|
|
232
|
+
// the element actually resolved, which is the URL that failed even after a fallback.
|
|
233
|
+
//
|
|
234
|
+
// 🔴 Only when somebody is listening. A surface with no `onFault` has nowhere to put the
|
|
235
|
+
// answer, and a probe nobody reads is a request bought for nothing — `CanvasVideoPlayer`
|
|
236
|
+
// and any other caller that takes the default would otherwise pay it on every failure.
|
|
237
|
+
if (!hooks.onFault)
|
|
238
|
+
return;
|
|
239
|
+
void probeSourceFault(el.currentSrc || urls.streamUrl).then((fault) => {
|
|
240
|
+
if (!destroyed)
|
|
241
|
+
hooks.onFault?.(fault, 'stream');
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
el.addEventListener('error', onElementError);
|
|
176
245
|
if (urls.hlsUrl && canPlayHlsNatively(el)) {
|
|
246
|
+
attached = 'ladder';
|
|
177
247
|
el.src = urls.hlsUrl;
|
|
178
248
|
}
|
|
179
249
|
else if (urls.hlsUrl) {
|
|
@@ -195,6 +265,21 @@ export function attachHlsSource(el, urls) {
|
|
|
195
265
|
// restart a load that is already in progress.
|
|
196
266
|
if (destroyed || !data?.fatal)
|
|
197
267
|
return;
|
|
268
|
+
/*
|
|
269
|
+
* 🔴 An ANSWER short-circuits the whole budget, and this branch is the owner's
|
|
270
|
+
* report: the master answered `404` in 0.2 s, and retrying an answer four times
|
|
271
|
+
* with a widening backoff is twelve seconds of spinner in front of a fallback that
|
|
272
|
+
* was available immediately. `response.code` is present only when the ladder
|
|
273
|
+
* REPLIED — a timeout or an abort carries none, so a genuinely slow origin still
|
|
274
|
+
* gets every recovery it had.
|
|
275
|
+
*/
|
|
276
|
+
const answered = typeof data.response?.code === 'number'
|
|
277
|
+
? sourceFaultFromStatus(data.response.code)
|
|
278
|
+
: null;
|
|
279
|
+
if (answered) {
|
|
280
|
+
fallBackToProgressive();
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
198
283
|
if (spent >= RECOVERY_BUDGET) {
|
|
199
284
|
fallBackToProgressive();
|
|
200
285
|
return;
|
|
@@ -254,6 +339,7 @@ export function attachHlsSource(el, urls) {
|
|
|
254
339
|
}
|
|
255
340
|
return () => {
|
|
256
341
|
destroyed = true;
|
|
342
|
+
el.removeEventListener('error', onElementError);
|
|
257
343
|
if (pendingRetry)
|
|
258
344
|
clearTimeout(pendingRetry);
|
|
259
345
|
pendingRetry = null;
|
|
@@ -261,15 +347,30 @@ export function attachHlsSource(el, urls) {
|
|
|
261
347
|
engine = null;
|
|
262
348
|
};
|
|
263
349
|
}
|
|
264
|
-
/**
|
|
265
|
-
|
|
350
|
+
/**
|
|
351
|
+
* {@link attachHlsSource} as an effect, re-attaching whenever either URL changes.
|
|
352
|
+
*
|
|
353
|
+
* 🔴 `onFault` is held in a REF, not listed as a dependency. A consumer passing the inline
|
|
354
|
+
* arrow this hook invites would otherwise tear the engine down and re-attach it on every
|
|
355
|
+
* render — which on a playing video is a re-buffer caused by something happening elsewhere on
|
|
356
|
+
* the page, and it is the same shape of bug the `slots` memo in `VideoPlayer` exists for.
|
|
357
|
+
*/
|
|
358
|
+
export function useHlsSource(ref, urls, hooks = {}) {
|
|
266
359
|
const { hlsUrl, streamUrl } = urls;
|
|
360
|
+
const { onFault } = hooks;
|
|
361
|
+
const faultRef = useRef(onFault);
|
|
362
|
+
useEffect(() => {
|
|
363
|
+
faultRef.current = onFault;
|
|
364
|
+
}, [onFault]);
|
|
365
|
+
// Whether there is a listener at all, which IS a re-attach: `attachHlsSource` buys the
|
|
366
|
+
// status probe only for a surface that can use the answer.
|
|
367
|
+
const listening = Boolean(onFault);
|
|
267
368
|
useEffect(() => {
|
|
268
369
|
const el = ref.current;
|
|
269
370
|
if (!el)
|
|
270
371
|
return;
|
|
271
|
-
return attachHlsSource(el, { hlsUrl, streamUrl });
|
|
272
|
-
// `ref`
|
|
273
|
-
}, [ref, hlsUrl, streamUrl]);
|
|
372
|
+
return attachHlsSource(el, { hlsUrl, streamUrl }, listening ? { onFault: (fault, source) => faultRef.current?.(fault, source) } : {});
|
|
373
|
+
// `ref` and `faultRef` are stable objects; the URLs are what a re-attach depends on.
|
|
374
|
+
}, [ref, hlsUrl, streamUrl, listening]);
|
|
274
375
|
}
|
|
275
376
|
//# sourceMappingURL=hlsSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hlsSource.js","sourceRoot":"","sources":["../../../src/react/media/hlsSource.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hlsSource.js","sourceRoot":"","sources":["../../../src/react/media/hlsSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAoB,qBAAqB,EAAE,MAAM,eAAe,CAAC;AA4C1F;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAoB;IACrD,OAAO,OAAO,EAAE,CAAC,WAAW,KAAK,UAAU,IAAI,EAAE,CAAC,WAAW,CAAC,+BAA+B,CAAC,KAAK,EAAE,CAAC;AACxG,CAAC;AAED;;;;;GAKG;AACH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC,kFAAkF;AAClF,MAAM,mBAAmB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,YAAY,EAAE,IAAI;IAClB;;;;;;;;;OASG;IACH,eAAe,EAAE,EAAE;IACnB,2EAA2E;IAC3E,kBAAkB,EAAE,GAA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|
@@ -315,6 +315,8 @@
|
|
|
315
315
|
/* guardrails-ignore no-hardcoded-colors: sits ON the picture ground, which is true black in
|
|
316
316
|
both themes — the same argument as `.cbpe-hint` above. */
|
|
317
317
|
color: rgb(255 255 255 / 0.82);
|
|
318
|
+
/* guardrails-ignore no-hardcoded-colors: the shadow that keeps this sentence readable over a
|
|
319
|
+
PALE frame of film — same argument as the colour it sits on, two lines up. */
|
|
318
320
|
text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
|
|
319
321
|
pointer-events: none;
|
|
320
322
|
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a media URL ANSWERED, when what it answered was not the bytes.
|
|
3
|
+
*
|
|
4
|
+
* ── 🔴 The report this exists for ───────────────────────────────────────────────────────
|
|
5
|
+
* Owner, 2026-09-17: *"make a 404 stop the media player spinner so I don't think it's going
|
|
6
|
+
* to eventually load."* One item in his catalogue has no ladder, so the very first request a
|
|
7
|
+
* player makes is answered honestly and immediately:
|
|
8
|
+
*
|
|
9
|
+
* GET …/u_fd668e6a….hls/master.m3u8 → 404 {"error":"not_found"} in 0.2 s
|
|
10
|
+
*
|
|
11
|
+
* and the spinner then ran until he gave up. **A 404 is a COMPLETE ANSWER** — there is
|
|
12
|
+
* nothing still in flight, nothing to wait for, and no amount of waiting changes it — and it
|
|
13
|
+
* was the one status every surface here treated as "still loading".
|
|
14
|
+
*
|
|
15
|
+
* ── 🔴 The distinction this module is entirely about ────────────────────────────────────
|
|
16
|
+
* A hang and an answer must not look the same to somebody watching a spinner:
|
|
17
|
+
*
|
|
18
|
+
* | what happened | is it an answer? | what the viewer should see |
|
|
19
|
+
* |---|---|---|
|
|
20
|
+
* | slow segment, tunnel blinked, origin waking | no — still in flight | keep spinning |
|
|
21
|
+
* | `404` / `410` | yes, and it is final | the reason, now |
|
|
22
|
+
* | `401` / `403` | yes, and it is RECOVERABLE | re-ask the app, then the reason |
|
|
23
|
+
* | any other `4xx`/`5xx` | yes, and we cannot name it | the reason, now |
|
|
24
|
+
*
|
|
25
|
+
* `403` is split out because it is the one that comes back on its own: every signed URL in
|
|
26
|
+
* this fleet carries `exp = iat + 2 × window`, so a page left open across a window boundary
|
|
27
|
+
* meets a stale token legitimately and the fix is to ASK THE APP AGAIN, not to tell the
|
|
28
|
+
* viewer his film is gone. Collapsing it into "gone" would put a false and permanent-sounding
|
|
29
|
+
* sentence on screen for the one fault that clears itself.
|
|
30
|
+
*
|
|
31
|
+
* ── 🔴 Why a probe, and why only on the failure path ────────────────────────────────────
|
|
32
|
+
* `hls.js` hands us the status directly (`ErrorData.response.code`), so the ladder and its
|
|
33
|
+
* rungs cost nothing. An `<img>` and a `<video>` do NOT: both fire a bare `error` event that
|
|
34
|
+
* carries no status at all, so "the file is gone" and "the token went stale" and "the codec
|
|
35
|
+
* is unplayable" arrive as the same undifferentiated failure. {@link probeSourceFault} is the
|
|
36
|
+
* one way to tell them apart, and it runs ONLY after the element has already given up — so a
|
|
37
|
+
* gallery that is working costs exactly nothing, and a one-byte `Range` request is the whole
|
|
38
|
+
* price of a sentence that is true.
|
|
39
|
+
*
|
|
40
|
+
* (`bytes=0-0` is a CORS-safelisted range, so the probe is a simple request and never costs a
|
|
41
|
+
* preflight; the 404 in the report above answers `access-control-allow-origin: *`, which is
|
|
42
|
+
* what makes the status readable cross-origin at all. When it is not readable the fetch
|
|
43
|
+
* throws, and that is `unknown` — honest, still not a spinner.)
|
|
44
|
+
*
|
|
45
|
+
* ── 🔴 Why one module holds the reading, the wording AND the overlay ────────────────────
|
|
46
|
+
* Three surfaces have to agree about the same fault — the gallery's picture stage, its native
|
|
47
|
+
* video stage and the shared player — and the thing they must agree on is not the mechanism,
|
|
48
|
+
* it is the SENTENCE. Split across three files this becomes three wordings, and the owner
|
|
49
|
+
* meets whichever one his file happens to be behind.
|
|
50
|
+
*
|
|
51
|
+
* It is deliberately NOT a published subpath and nothing here is re-exported from
|
|
52
|
+
* `react/media/index.ts`. `publicSurface.baseline` charges for a permanent promise, and none
|
|
53
|
+
* of this is one: the wording is copy, the overlay is chrome, and a consumer that wanted to
|
|
54
|
+
* draw its own would be re-implementing the corner rather than importing it. (Same call the
|
|
55
|
+
* badge stack in `VideoPlayer.tsx` made — see that baseline entry's "what did NOT go on the
|
|
56
|
+
* surface".) A `.tsx` holding a component beside its helpers is `galleryItemMedia.tsx`'s
|
|
57
|
+
* shape, for the same reason.
|
|
58
|
+
*/
|
|
59
|
+
/** Which of the three answers came back. `expired` is the only one worth re-asking. */
|
|
60
|
+
export type SourceFaultKind =
|
|
61
|
+
/** The source said there is nothing here — `404`/`410`. Final. */
|
|
62
|
+
'gone'
|
|
63
|
+
/** The token went stale — `401`/`403`. A fresh URL from the app fixes it. */
|
|
64
|
+
| 'expired'
|
|
65
|
+
/** It answered something else, or did not answer readably. Not a hang either way. */
|
|
66
|
+
| 'unknown';
|
|
67
|
+
export interface SourceFault {
|
|
68
|
+
kind: SourceFaultKind;
|
|
69
|
+
/** The HTTP status that said so, when one was readable. Absent for an unreadable failure. */
|
|
70
|
+
status?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Classify one HTTP status. `null` for anything below 400 — a source that answered `200` and
|
|
74
|
+
* still would not play is not a fault of the URL, and saying otherwise would blame the store
|
|
75
|
+
* for an unplayable codec.
|
|
76
|
+
*/
|
|
77
|
+
export declare function sourceFaultFromStatus(status: number): SourceFault | null;
|
|
78
|
+
/**
|
|
79
|
+
* Is this worth asking the app for a fresh URL? Exactly one kind is.
|
|
80
|
+
*
|
|
81
|
+
* 🔴 A caller that re-asks must BOUND it — see `useItemMedia`'s one-re-ask-per-item rule. An
|
|
82
|
+
* unbounded retry against a URL that is never going to be fresh is the same spinner with more
|
|
83
|
+
* requests in it, which is the thing this whole module exists to stop.
|
|
84
|
+
*/
|
|
85
|
+
export declare function isRecoverableFault(fault: SourceFault): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Ask the URL what it is, once, with a one-byte range.
|
|
88
|
+
*
|
|
89
|
+
* Only ever called after an element has already failed, so this is never on the happy path.
|
|
90
|
+
* Never throws: an unreadable failure (offline, CORS, DNS) resolves `unknown` rather than
|
|
91
|
+
* rejecting, because the caller's job at that point is to say SOMETHING instead of spinning.
|
|
92
|
+
*
|
|
93
|
+
* Reads `globalThis.fetch` at call time rather than closing over it, so a spec can install its
|
|
94
|
+
* own and the unit suite never puts a request on a real socket
|
|
95
|
+
* (`src/iframesMakeNoRealRequest.spec.ts` is the standing rule).
|
|
96
|
+
*/
|
|
97
|
+
export declare function probeSourceFault(url: string | undefined): Promise<SourceFault>;
|
|
98
|
+
/**
|
|
99
|
+
* The sentence a viewer reads.
|
|
100
|
+
*
|
|
101
|
+
* 🔴 One place, because the gallery's picture stage, its native video stage and the shared
|
|
102
|
+
* player all have to say the SAME thing about the same fault — three copies of this is three
|
|
103
|
+
* wordings, and the owner would meet whichever one his file happened to be behind. The specs
|
|
104
|
+
* spell the sentences out as literals rather than importing them, for the reason the badge
|
|
105
|
+
* copy in `VideoPlayer.tsx` gives: which words are on the picture IS the deliverable, so an
|
|
106
|
+
* assertion that reads the function asserts nothing.
|
|
107
|
+
*
|
|
108
|
+
* `subject` is the noun for the thing that failed — "This video", "This picture", the file's
|
|
109
|
+
* own name. It leads the sentence, so it is capitalised by the caller.
|
|
110
|
+
*/
|
|
111
|
+
export declare function sourceFaultMessage(fault: SourceFault, subject: string): string;
|
|
112
|
+
/**
|
|
113
|
+
* Did an `hls.js` error carry an ANSWER, or is the ladder still coming?
|
|
114
|
+
*
|
|
115
|
+
* 🔴 The whole of the owner's report is in this predicate. hls.js sets `response.code` only
|
|
116
|
+
* when the server actually replied — a timeout, an abort and a stalled fetch carry none — so a
|
|
117
|
+
* status here means the ladder is not on its way and never was, and the copy that always
|
|
118
|
+
* exists should take over NOW rather than after four retries and twelve seconds of backoff. A
|
|
119
|
+
* fatal error with no status is the case those retries exist for and must keep them.
|
|
120
|
+
*
|
|
121
|
+
* `unknown` rather than hls.js's `ErrorData`: the library is an OPTIONAL peer and a ~525 KB
|
|
122
|
+
* dynamic import in exactly one branch, so its types must not become a static dependency of
|
|
123
|
+
* every file that reads one of its payloads.
|
|
124
|
+
*/
|
|
125
|
+
export declare function hlsErrorIsAnswer(detail: unknown): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* What a video surface says once every source has ANSWERED.
|
|
128
|
+
*
|
|
129
|
+
* ── 🔴 Why it covers the picture instead of sitting beside it ───────────────────────────
|
|
130
|
+
* The thing being replaced is a buffering spinner drawn by Vidstack's own layout, which
|
|
131
|
+
* cannot be turned off from outside it — so a sentence in the corner would be a sentence NEXT
|
|
132
|
+
* TO a spinner, which is the owner's report ("I don't think it's going to eventually load")
|
|
133
|
+
* with extra words rather than without it. Opaque, `inset: 0`, over the whole surface: the
|
|
134
|
+
* spinner is gone because it is not visible, and that is the only lever there is.
|
|
135
|
+
*
|
|
136
|
+
* 🔴 The player is NOT unmounted by it. A `403` is recoverable and the app's fix is a fresh
|
|
137
|
+
* URL, which arrives as new props on the same mount; tearing the player down would throw away
|
|
138
|
+
* the position, the volume and the decoder to say one sentence that may be obsolete a second
|
|
139
|
+
* later. The gallery's stages do the opposite and REPLACE their element — there the `<video>`
|
|
140
|
+
* is the spinner, so nothing short of removing it would do.
|
|
141
|
+
*/
|
|
142
|
+
export declare function SourceFaultOverlay({ fault, name }: {
|
|
143
|
+
fault: SourceFault;
|
|
144
|
+
name: string;
|
|
145
|
+
}): import("react").JSX.Element;
|
|
146
|
+
//# sourceMappingURL=sourceFault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceFault.d.ts","sourceRoot":"","sources":["../../../src/react/media/sourceFault.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,uFAAuF;AACvF,MAAM,MAAM,eAAe;AACzB,kEAAkE;AAChE,MAAM;AACR,6EAA6E;GAC3E,SAAS;AACX,qFAAqF;GACnF,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAKxE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAqBpF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAS9E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAKzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,+BA4BvF"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Classify one HTTP status. `null` for anything below 400 — a source that answered `200` and
|
|
4
|
+
* still would not play is not a fault of the URL, and saying otherwise would blame the store
|
|
5
|
+
* for an unplayable codec.
|
|
6
|
+
*/
|
|
7
|
+
export function sourceFaultFromStatus(status) {
|
|
8
|
+
if (status === 404 || status === 410)
|
|
9
|
+
return { kind: 'gone', status };
|
|
10
|
+
if (status === 401 || status === 403)
|
|
11
|
+
return { kind: 'expired', status };
|
|
12
|
+
if (status >= 400)
|
|
13
|
+
return { kind: 'unknown', status };
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Is this worth asking the app for a fresh URL? Exactly one kind is.
|
|
18
|
+
*
|
|
19
|
+
* 🔴 A caller that re-asks must BOUND it — see `useItemMedia`'s one-re-ask-per-item rule. An
|
|
20
|
+
* unbounded retry against a URL that is never going to be fresh is the same spinner with more
|
|
21
|
+
* requests in it, which is the thing this whole module exists to stop.
|
|
22
|
+
*/
|
|
23
|
+
export function isRecoverableFault(fault) {
|
|
24
|
+
return fault.kind === 'expired';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Ask the URL what it is, once, with a one-byte range.
|
|
28
|
+
*
|
|
29
|
+
* Only ever called after an element has already failed, so this is never on the happy path.
|
|
30
|
+
* Never throws: an unreadable failure (offline, CORS, DNS) resolves `unknown` rather than
|
|
31
|
+
* rejecting, because the caller's job at that point is to say SOMETHING instead of spinning.
|
|
32
|
+
*
|
|
33
|
+
* Reads `globalThis.fetch` at call time rather than closing over it, so a spec can install its
|
|
34
|
+
* own and the unit suite never puts a request on a real socket
|
|
35
|
+
* (`src/iframesMakeNoRealRequest.spec.ts` is the standing rule).
|
|
36
|
+
*/
|
|
37
|
+
export async function probeSourceFault(url) {
|
|
38
|
+
const fetchImpl = globalThis.fetch;
|
|
39
|
+
if (!url || typeof fetchImpl !== 'function')
|
|
40
|
+
return { kind: 'unknown' };
|
|
41
|
+
try {
|
|
42
|
+
const res = await fetchImpl(url, {
|
|
43
|
+
method: 'GET',
|
|
44
|
+
// One byte. The status is the whole point; the body is not wanted and a media file is
|
|
45
|
+
// the last thing to download twice.
|
|
46
|
+
headers: { Range: 'bytes=0-0' },
|
|
47
|
+
cache: 'no-store',
|
|
48
|
+
});
|
|
49
|
+
// 🔴 A status BELOW 400 is deliberately dropped rather than reported: the URL is fine and
|
|
50
|
+
// the bytes are there, so the element failed for a reason that is not the store's — an
|
|
51
|
+
// unplayable codec, a decode stall. Printing "could not be loaded (HTTP 200)" would blame
|
|
52
|
+
// the wrong thing in the one case where the file is not actually missing.
|
|
53
|
+
return sourceFaultFromStatus(res.status) ?? { kind: 'unknown' };
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// No readable answer at all. Still not a hang — the element already stopped — so the
|
|
57
|
+
// caller states what it can rather than leaving the spinner up.
|
|
58
|
+
return { kind: 'unknown' };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The sentence a viewer reads.
|
|
63
|
+
*
|
|
64
|
+
* 🔴 One place, because the gallery's picture stage, its native video stage and the shared
|
|
65
|
+
* player all have to say the SAME thing about the same fault — three copies of this is three
|
|
66
|
+
* wordings, and the owner would meet whichever one his file happened to be behind. The specs
|
|
67
|
+
* spell the sentences out as literals rather than importing them, for the reason the badge
|
|
68
|
+
* copy in `VideoPlayer.tsx` gives: which words are on the picture IS the deliverable, so an
|
|
69
|
+
* assertion that reads the function asserts nothing.
|
|
70
|
+
*
|
|
71
|
+
* `subject` is the noun for the thing that failed — "This video", "This picture", the file's
|
|
72
|
+
* own name. It leads the sentence, so it is capitalised by the caller.
|
|
73
|
+
*/
|
|
74
|
+
export function sourceFaultMessage(fault, subject) {
|
|
75
|
+
const status = fault.status != null ? ` (HTTP ${fault.status})` : '';
|
|
76
|
+
if (fault.kind === 'gone') {
|
|
77
|
+
return `${subject} is no longer on the media store${status} — nothing is still loading.`;
|
|
78
|
+
}
|
|
79
|
+
if (fault.kind === 'expired') {
|
|
80
|
+
return `${subject}'s link has expired${status} — reopen it for a fresh one.`;
|
|
81
|
+
}
|
|
82
|
+
return `${subject} could not be loaded${status} — nothing is still loading.`;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Did an `hls.js` error carry an ANSWER, or is the ladder still coming?
|
|
86
|
+
*
|
|
87
|
+
* 🔴 The whole of the owner's report is in this predicate. hls.js sets `response.code` only
|
|
88
|
+
* when the server actually replied — a timeout, an abort and a stalled fetch carry none — so a
|
|
89
|
+
* status here means the ladder is not on its way and never was, and the copy that always
|
|
90
|
+
* exists should take over NOW rather than after four retries and twelve seconds of backoff. A
|
|
91
|
+
* fatal error with no status is the case those retries exist for and must keep them.
|
|
92
|
+
*
|
|
93
|
+
* `unknown` rather than hls.js's `ErrorData`: the library is an OPTIONAL peer and a ~525 KB
|
|
94
|
+
* dynamic import in exactly one branch, so its types must not become a static dependency of
|
|
95
|
+
* every file that reads one of its payloads.
|
|
96
|
+
*/
|
|
97
|
+
export function hlsErrorIsAnswer(detail) {
|
|
98
|
+
const data = detail;
|
|
99
|
+
const code = data?.response?.code;
|
|
100
|
+
if (!data?.fatal || typeof code !== 'number')
|
|
101
|
+
return false;
|
|
102
|
+
return sourceFaultFromStatus(code) !== null;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* What a video surface says once every source has ANSWERED.
|
|
106
|
+
*
|
|
107
|
+
* ── 🔴 Why it covers the picture instead of sitting beside it ───────────────────────────
|
|
108
|
+
* The thing being replaced is a buffering spinner drawn by Vidstack's own layout, which
|
|
109
|
+
* cannot be turned off from outside it — so a sentence in the corner would be a sentence NEXT
|
|
110
|
+
* TO a spinner, which is the owner's report ("I don't think it's going to eventually load")
|
|
111
|
+
* with extra words rather than without it. Opaque, `inset: 0`, over the whole surface: the
|
|
112
|
+
* spinner is gone because it is not visible, and that is the only lever there is.
|
|
113
|
+
*
|
|
114
|
+
* 🔴 The player is NOT unmounted by it. A `403` is recoverable and the app's fix is a fresh
|
|
115
|
+
* URL, which arrives as new props on the same mount; tearing the player down would throw away
|
|
116
|
+
* the position, the volume and the decoder to say one sentence that may be obsolete a second
|
|
117
|
+
* later. The gallery's stages do the opposite and REPLACE their element — there the `<video>`
|
|
118
|
+
* is the spinner, so nothing short of removing it would do.
|
|
119
|
+
*/
|
|
120
|
+
export function SourceFaultOverlay({ fault, name }) {
|
|
121
|
+
return (_jsxs("div", { role: 'status', style: {
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
inset: 0,
|
|
124
|
+
display: 'flex',
|
|
125
|
+
flexDirection: 'column',
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
justifyContent: 'center',
|
|
128
|
+
gap: 6,
|
|
129
|
+
padding: 16,
|
|
130
|
+
textAlign: 'center',
|
|
131
|
+
// Over VIDEO content, not app chrome — dark-on-video regardless of app theme, the same
|
|
132
|
+
// convention the player's corner badges use and for the same reason.
|
|
133
|
+
// guardrails-ignore no-hardcoded-colors: see comment above.
|
|
134
|
+
background: 'rgba(0, 0, 0, 0.82)',
|
|
135
|
+
// guardrails-ignore no-hardcoded-colors: see comment above.
|
|
136
|
+
color: 'rgba(255, 255, 255, 0.92)',
|
|
137
|
+
}, children: [_jsx("span", { style: { fontSize: 13, fontWeight: 600 }, children: name }), _jsx("span", { style: { fontSize: 13, lineHeight: 1.5, maxWidth: '42ch' }, children: sourceFaultMessage(fault, 'This video') })] }));
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=sourceFault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceFault.js","sourceRoot":"","sources":["../../../src/react/media/sourceFault.tsx"],"names":[],"mappings":";AA0EA;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtE,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACzE,IAAI,MAAM,IAAI,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAkB;IACnD,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC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sibling of `.cbvc-nofilm` in
|
|
21
|
+
`videoCutEditor.css`, which documents both halves of the reasoning (why the panel wears the
|
|
22
|
+
video's own class, and why the turner's white-on-black note cannot be reused on a theme
|
|
23
|
+
surface). Restated here for the same reason every `.cbch-*` rule is a sibling of a `.cbvc-*`
|
|
24
|
+
one: these two sheets ride their own lazily-imported chunks and share nothing. */
|
|
25
|
+
.cbch-nofilm {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
min-block-size: 8rem;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 1.5rem;
|
|
32
|
+
text-align: center;
|
|
33
|
+
text-wrap: balance;
|
|
34
|
+
font-size: 13px;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
color: var(--muted-foreground, var(--foreground));
|
|
37
|
+
}
|
|
38
|
+
|
|
20
39
|
/* The one authoring row: name the section, then mark it. In that order, because the button
|
|
21
40
|
is disabled until there is a name — see the component. */
|
|
22
41
|
.cbch-add {
|