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
|
@@ -9,7 +9,7 @@ import { InfoHint } from '../components/InfoHint';
|
|
|
9
9
|
import { Input } from '../components/Input';
|
|
10
10
|
import { Modal } from '../components/Modal';
|
|
11
11
|
import { chapterProblem, chapterSpans, normalizeChapters, } from './videoChapters';
|
|
12
|
-
export function VideoChapterEditor({ src, posterUrl, name, durationSeconds, chapters: initialChapters, open = true, onClose, onSubmit, submitLabel = 'Save sections', note, }) {
|
|
12
|
+
export function VideoChapterEditor({ src, posterUrl, resolving = false, name, durationSeconds, chapters: initialChapters, open = true, onClose, onSubmit, submitLabel = 'Save sections', note, }) {
|
|
13
13
|
const videoRef = React.useRef(null);
|
|
14
14
|
const [duration, setDuration] = React.useState(durationSeconds && Number.isFinite(durationSeconds) ? durationSeconds : 0);
|
|
15
15
|
const [playhead, setPlayhead] = React.useState(0);
|
|
@@ -25,6 +25,24 @@ export function VideoChapterEditor({ src, posterUrl, name, durationSeconds, chap
|
|
|
25
25
|
const [draftTitle, setDraftTitle] = React.useState('');
|
|
26
26
|
const [submitting, setSubmitting] = React.useState(false);
|
|
27
27
|
const [error, setError] = React.useState(null);
|
|
28
|
+
// A source that changes is a fresh attempt: it must not inherit the previous one's failure,
|
|
29
|
+
// the same rule `VideoTurner` and the gallery's own `ThumbImg` keep.
|
|
30
|
+
const [failedSrc, setFailedSrc] = React.useState(null);
|
|
31
|
+
/**
|
|
32
|
+
* Why there is no film to scrub — `null` when there is one.
|
|
33
|
+
*
|
|
34
|
+
* 🔴 Said out loud rather than drawn as the black rectangle a source-less `<video>` paints,
|
|
35
|
+
* which is the owner's *"I see a black screen"* in the sibling dialog. Each reason also says
|
|
36
|
+
* what is still true: a section is a name and a timestamp stored BESIDE the film, so the
|
|
37
|
+
* ones this video already has can still be renamed, removed and saved with no player at all.
|
|
38
|
+
*/
|
|
39
|
+
const cannotShow = resolving
|
|
40
|
+
? 'Finding this film…'
|
|
41
|
+
: !src
|
|
42
|
+
? 'This file has no video source to play here, so there is nothing to scrub. The sections are stored beside the film, so the ones it already has can still be edited and saved.'
|
|
43
|
+
: failedSrc === src
|
|
44
|
+
? 'The film could not be loaded, so there is nothing to scrub. The sections are stored beside the film, so the ones it already has can still be edited and saved.'
|
|
45
|
+
: null;
|
|
28
46
|
const spans = React.useMemo(() => chapterSpans(chapters, duration), [chapters, duration]);
|
|
29
47
|
/** What Save would send. Also what `isDirty` compares, so the two can never disagree. */
|
|
30
48
|
const saved = React.useMemo(() => normalizeChapters(chapters, duration), [chapters, duration]);
|
|
@@ -122,12 +140,12 @@ export function VideoChapterEditor({ src, posterUrl, name, durationSeconds, chap
|
|
|
122
140
|
// throws away every name typed since the dialog opened, with no prompt.
|
|
123
141
|
isDirty: isDirty, ...(error ? { problem: error } : {}), footer: _jsx(ActionBar, { primary: _jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: onClose, tooltip: 'Close without saving anything', children: "Cancel" }), _jsx(Button, { onClick: () => void submit(), disabled: submitting || unnamed > 0, tooltip: unnamed > 0
|
|
124
142
|
? 'Every section needs a name before this can be saved'
|
|
125
|
-
: 'Save these sections — nothing about the video itself is changed', children: submitting ? 'Saving…' : submitLabel })] }) }), children: _jsxs("fieldset", { className: 'cbch', onKeyDown: onKeyDown, "aria-label": 'Name the sections of this video. Type a name, then mark the point it starts at. Space plays and pauses.', children: [_jsx("video", { ref: videoRef, className: 'cbch-video', src: src, poster: posterUrl, controls: true, playsInline: true, preload: 'metadata', onLoadedMetadata: (event) => {
|
|
143
|
+
: 'Save these sections — nothing about the video itself is changed', children: submitting ? 'Saving…' : submitLabel })] }) }), children: _jsxs("fieldset", { className: 'cbch', onKeyDown: onKeyDown, "aria-label": 'Name the sections of this video. Type a name, then mark the point it starts at. Space plays and pauses.', children: [cannotShow === null ? (_jsx("video", { ref: videoRef, className: 'cbch-video', src: src, poster: posterUrl, controls: true, playsInline: true, preload: 'metadata', onLoadedMetadata: (event) => {
|
|
126
144
|
const seen = event.currentTarget.duration;
|
|
127
145
|
// The element's own metadata wins over anything the catalog rounded.
|
|
128
146
|
if (Number.isFinite(seen) && seen > 0)
|
|
129
147
|
setDuration(seen);
|
|
130
|
-
}, onTimeUpdate: (event) => setPlayhead(event.currentTarget.currentTime), onSeeked: (event) => setPlayhead(event.currentTarget.currentTime) }), _jsxs("div", { className: 'cbch-add', children: [_jsx("div", { className: 'cbch-add-field', children: _jsx(Input, { value: draftTitle, onChange: (event) => {
|
|
148
|
+
}, onTimeUpdate: (event) => setPlayhead(event.currentTarget.currentTime), onSeeked: (event) => setPlayhead(event.currentTarget.currentTime), onError: () => setFailedSrc(src) }, src)) : (_jsx("p", { className: 'cbch-video cbch-nofilm', role: 'status', children: cannotShow })), _jsxs("div", { className: 'cbch-add', children: [_jsx("div", { className: 'cbch-add-field', children: _jsx(Input, { value: draftTitle, onChange: (event) => {
|
|
131
149
|
setDraftTitle(event.currentTarget.value);
|
|
132
150
|
setError(null);
|
|
133
151
|
}, onEnter: markHere, "aria-label": 'What this part of the video is about', placeholder: 'What is this part about?' }) }), _jsx(Button, { size: 'sm', variant: 'secondary', onClick: markHere, disabled: markProblem !== null, leftIcon: _jsx(Bookmark, { "aria-hidden": 'true', size: 14 }), tooltip: markProblem ?? `Start a section called "${draftTitle.trim()}" here`, children: "Mark here" }), _jsx("span", { className: 'cbch-playhead', children: cutTimecode(playhead) }), _jsxs(InfoHint, { title: 'Naming the parts of a video', align: 'right', children: [_jsxs("p", { children: ["Play or scrub to where a part begins, type what it is about, and press", ' ', _jsx("strong", { children: "Mark here" }), " (or ", _jsx("kbd", { children: "Enter" }), " in the box)."] }), _jsxs("p", { children: ["Each section runs until the next one starts. Click a section's time to jump there, edit a name in place, and ", _jsx("kbd", { children: "Space" }), " plays and pauses."] }), _jsx("p", { children: "Nothing here changes your video \u2014 these are names the player shows on the scrub bar and in its chapters menu." })] })] }), _jsxs("ul", { className: 'cbch-strip', "aria-label": spans.length === 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoChapterEditor.js","sourceRoot":"","sources":["../../../src/react/media/VideoChapterEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,GAElB,MAAM,iBAAiB,CAAC;AAiEzB,MAAM,UAAU,kBAAkB,CAAC,EACjC,GAAG,EACH,SAAS,EACT,IAAI,EACJ,eAAe,EACf,QAAQ,EAAE,eAAe,EACzB,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,WAAW,GAAG,eAAe,EAC7B,IAAI,GACoB;IACxB,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC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C,EAC/C,WAAW,EAAC,mBAAmB,GAC/B,GACE,EACN,KAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,OAAO,EAAC,qEAAgE,gBAC5D,yBAAyB,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EACxE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,YAE3C,KAAC,MAAM,mBAAa,MAAM,EAAC,IAAI,EAAE,EAAE,GAAI,GAChC,KA7BF,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CA8BnC,CACN,CAAC,GACC,CACN,EAEA,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,WAAW,YAAE,IAAI,GAAO,CAAC,CAAC,CAAC,IAAI,IAC7C,GACL,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -54,10 +54,24 @@ import { type VideoCut } from 'cursedbelt-core/media/video-cuts';
|
|
|
54
54
|
* exists, in one predictable place, and pays no permanent rent in the dialog.
|
|
55
55
|
*/
|
|
56
56
|
export interface VideoCutEditorProps {
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* The clip, as a URL a `<video>` can play.
|
|
59
|
+
*
|
|
60
|
+
* 🔴 The RESOLVED source, not whatever URL field a record happens to carry — see
|
|
61
|
+
* `MediaGallery`'s `TrimVideoDialog`. A gallery item is allowed to carry no URL at all
|
|
62
|
+
* (`resolveMedia` is the documented path for a signed URL), and a `<video>` with an empty
|
|
63
|
+
* source never loads, never fires `error` and paints black forever: the owner's *"I see a
|
|
64
|
+
* black screen"* report, in a different dialog. An empty string here is now a stated reason.
|
|
65
|
+
*/
|
|
58
66
|
src: string;
|
|
59
67
|
/** Shown until the first frame decodes — a black box reads as a broken player. */
|
|
60
68
|
posterUrl?: string;
|
|
69
|
+
/**
|
|
70
|
+
* True while the app is still finding the source (a signed URL being minted, bytes being
|
|
71
|
+
* fetched). It is the difference between "on its way" and "cannot be shown", and only the
|
|
72
|
+
* caller knows which.
|
|
73
|
+
*/
|
|
74
|
+
resolving?: boolean;
|
|
61
75
|
name?: string;
|
|
62
76
|
/**
|
|
63
77
|
* The clip's length, when the app already knows it. The element's own metadata still wins
|
|
@@ -78,5 +92,5 @@ export interface VideoCutEditorProps {
|
|
|
78
92
|
/** Shown under the strip: what happens after Send, in the app's own words. */
|
|
79
93
|
note?: React.ReactNode;
|
|
80
94
|
}
|
|
81
|
-
export declare function VideoCutEditor({ src, posterUrl, name, durationSeconds, open, onClose, onSubmit, submitLabel, note, }: VideoCutEditorProps): React.JSX.Element;
|
|
95
|
+
export declare function VideoCutEditor({ src, posterUrl, resolving, name, durationSeconds, open, onClose, onSubmit, submitLabel, note, }: VideoCutEditorProps): React.JSX.Element;
|
|
82
96
|
//# sourceMappingURL=VideoCutEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoCutEditor.d.ts","sourceRoot":"","sources":["../../../src/react/media/VideoCutEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAYL,KAAK,QAAQ,EACd,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,WAAW,mBAAmB;IAClC
|
|
1
|
+
{"version":3,"file":"VideoCutEditor.d.ts","sourceRoot":"","sources":["../../../src/react/media/VideoCutEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAYL,KAAK,QAAQ,EACd,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;OAQG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,SAAS,EACT,SAAiB,EACjB,IAAI,EACJ,eAAe,EACf,IAAW,EACX,OAAO,EACP,QAAQ,EACR,WAAmC,EACnC,IAAI,GACL,EAAE,mBAAmB,qBA4UrB"}
|
|
@@ -8,13 +8,31 @@ import { InfoHint } from '../components/InfoHint';
|
|
|
8
8
|
import { Tooltip } from '../components/Tooltip';
|
|
9
9
|
import { Modal } from '../components/Modal';
|
|
10
10
|
import { addSplit, cutSeconds, cutTimecode, EMPTY_PLAN, keptSeconds, planCuts, planProblem, planSegments, removeSplit, toggleSegment, } from 'cursedbelt-core/media/video-cuts';
|
|
11
|
-
export function VideoCutEditor({ src, posterUrl, name, durationSeconds, open = true, onClose, onSubmit, submitLabel = 'Send for processing', note, }) {
|
|
11
|
+
export function VideoCutEditor({ src, posterUrl, resolving = false, name, durationSeconds, open = true, onClose, onSubmit, submitLabel = 'Send for processing', note, }) {
|
|
12
12
|
const videoRef = React.useRef(null);
|
|
13
13
|
const [duration, setDuration] = React.useState(durationSeconds && Number.isFinite(durationSeconds) ? durationSeconds : 0);
|
|
14
14
|
const [playhead, setPlayhead] = React.useState(0);
|
|
15
15
|
const [plan, setPlan] = React.useState(EMPTY_PLAN);
|
|
16
16
|
const [submitting, setSubmitting] = React.useState(false);
|
|
17
17
|
const [error, setError] = React.useState(null);
|
|
18
|
+
// A source that changes is a fresh attempt: it must not inherit the previous one's failure,
|
|
19
|
+
// the same rule `VideoTurner` and the gallery's own `ThumbImg` keep.
|
|
20
|
+
const [failedSrc, setFailedSrc] = React.useState(null);
|
|
21
|
+
/**
|
|
22
|
+
* Why there is no film to mark up — `null` when there is one.
|
|
23
|
+
*
|
|
24
|
+
* 🔴 The dialog SAYS it rather than rendering the black rectangle a source-less `<video>`
|
|
25
|
+
* paints. Marking a cut means scrubbing to a moment, so with nothing to play there is
|
|
26
|
+
* genuinely nothing to mark — and the one thing worse than that is a player that looks
|
|
27
|
+
* broken and a Send button whose refusal ("Nothing is marked") reads as the dialog's fault.
|
|
28
|
+
*/
|
|
29
|
+
const cannotShow = resolving
|
|
30
|
+
? 'Finding this film…'
|
|
31
|
+
: !src
|
|
32
|
+
? 'This file has no video source to play here, so there is nothing to mark up. Nothing has been sent.'
|
|
33
|
+
: failedSrc === src
|
|
34
|
+
? 'The film could not be loaded, so there is nothing to mark up. Nothing has been sent.'
|
|
35
|
+
: null;
|
|
18
36
|
const segments = React.useMemo(() => planSegments(plan, duration), [plan, duration]);
|
|
19
37
|
const cuts = React.useMemo(() => planCuts(plan, duration), [plan, duration]);
|
|
20
38
|
const problem = planProblem(plan, duration);
|
|
@@ -99,12 +117,12 @@ export function VideoCutEditor({ src, posterUrl, name, durationSeconds, open = t
|
|
|
99
117
|
setSubmitting(false);
|
|
100
118
|
}
|
|
101
119
|
};
|
|
102
|
-
return (_jsx(Modal, { open: open, onClose: onClose, title: name ? `Trim ${name}` : 'Trim video', size: 'lg', footer: _jsx(ActionBar, { primary: _jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: onClose, tooltip: 'Close without sending anything', children: "Cancel" }), _jsx(Button, { onClick: () => void submit(), disabled: submitting || problem !== null, tooltip: problem ?? 'Queue the cuts — the edited copy arrives beside the original', children: submitting ? 'Sending…' : submitLabel })] }) }), children: _jsxs("fieldset", { className: 'cbvc', onKeyDown: onKeyDown, "aria-label": 'Mark sections to cut. Press [ to start a cut, ] to end it, space to play or pause.', children: [_jsx("video", { ref: videoRef, className: 'cbvc-video', src: src, poster: posterUrl, controls: true, playsInline: true, preload: 'metadata', onLoadedMetadata: (event) => {
|
|
120
|
+
return (_jsx(Modal, { open: open, onClose: onClose, title: name ? `Trim ${name}` : 'Trim video', size: 'lg', footer: _jsx(ActionBar, { primary: _jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: onClose, tooltip: 'Close without sending anything', children: "Cancel" }), _jsx(Button, { onClick: () => void submit(), disabled: submitting || problem !== null, tooltip: problem ?? 'Queue the cuts — the edited copy arrives beside the original', children: submitting ? 'Sending…' : submitLabel })] }) }), children: _jsxs("fieldset", { className: 'cbvc', onKeyDown: onKeyDown, "aria-label": 'Mark sections to cut. Press [ to start a cut, ] to end it, space to play or pause.', children: [cannotShow === null ? (_jsx("video", { ref: videoRef, className: 'cbvc-video', src: src, poster: posterUrl, controls: true, playsInline: true, preload: 'metadata', onLoadedMetadata: (event) => {
|
|
103
121
|
const seen = event.currentTarget.duration;
|
|
104
122
|
// The element's own metadata wins over anything the catalog rounded.
|
|
105
123
|
if (Number.isFinite(seen) && seen > 0)
|
|
106
124
|
setDuration(seen);
|
|
107
|
-
}, onTimeUpdate: (event) => setPlayhead(event.currentTarget.currentTime), onSeeked: (event) => setPlayhead(event.currentTarget.currentTime) }), _jsxs("div", { className: 'cbvc-marks', children: [_jsxs(Button, { size: 'sm', variant: 'secondary', onClick: cutHere, tooltip: 'Cut the clip here (C)', children: [_jsx(Scissors, { "aria-hidden": 'true', size: 14 }), " Cut here"] }), _jsx("span", { className: 'cbvc-playhead', children: cutTimecode(playhead) }), _jsxs(InfoHint, { title: 'Marking a video to trim', align: 'right', children: [_jsxs("p", { children: ["Press ", _jsx("strong", { children: "Cut here" }), " (or ", _jsx("kbd", { children: "C" }), ") to divide the clip at the playhead. Every piece between two cuts is a section."] }), _jsxs("p", { children: ["Click ", _jsx("strong", { children: "\u2717" }), " on a section to remove it \u2014 click again to keep it after all. Click a section's timecode to jump there, and ", _jsx("kbd", { children: "Space" }), " plays and pauses."] }), _jsx("p", { children: "Nothing here changes your video. Sending makes a trimmed COPY beside the original, and you choose which to keep." })] })] }), _jsxs("ul", { className: 'cbvc-strip', "aria-label": segments.length <= 1
|
|
125
|
+
}, onTimeUpdate: (event) => setPlayhead(event.currentTarget.currentTime), onSeeked: (event) => setPlayhead(event.currentTarget.currentTime), onError: () => setFailedSrc(src) }, src)) : (_jsx("p", { className: 'cbvc-video cbvc-nofilm', role: 'status', children: cannotShow })), _jsxs("div", { className: 'cbvc-marks', children: [_jsxs(Button, { size: 'sm', variant: 'secondary', onClick: cutHere, tooltip: 'Cut the clip here (C)', children: [_jsx(Scissors, { "aria-hidden": 'true', size: 14 }), " Cut here"] }), _jsx("span", { className: 'cbvc-playhead', children: cutTimecode(playhead) }), _jsxs(InfoHint, { title: 'Marking a video to trim', align: 'right', children: [_jsxs("p", { children: ["Press ", _jsx("strong", { children: "Cut here" }), " (or ", _jsx("kbd", { children: "C" }), ") to divide the clip at the playhead. Every piece between two cuts is a section."] }), _jsxs("p", { children: ["Click ", _jsx("strong", { children: "\u2717" }), " on a section to remove it \u2014 click again to keep it after all. Click a section's timecode to jump there, and ", _jsx("kbd", { children: "Space" }), " plays and pauses."] }), _jsx("p", { children: "Nothing here changes your video. Sending makes a trimmed COPY beside the original, and you choose which to keep." })] })] }), _jsxs("ul", { className: 'cbvc-strip', "aria-label": segments.length <= 1
|
|
108
126
|
? 'The whole clip, uncut'
|
|
109
127
|
: `${segments.length} sections; ${segments.filter((segment) => segment.removed).length} marked for removal`, children: [segments.map((segment) => (_jsx("li", { className: 'cbvc-seg-item', style: { width: `${pct(segment.end) - pct(segment.start)}%` }, children: _jsx(Tooltip, { content: segment.removed
|
|
110
128
|
? `Keep ${cutTimecode(segment.start)}–${cutTimecode(segment.end)} after all`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoCutEditor.js","sourceRoot":"","sources":["../../../src/react/media/VideoCutEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EACL,QAAQ,EAER,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,GAEd,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoCutEditor.js","sourceRoot":"","sources":["../../../src/react/media/VideoCutEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,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AC,IAAI,EACrD,KAAK,CAAC,CAAC,CAAC,CACP,YAAG,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,YACnC,KAAK,GACJ,CACL,CAAC,CAAC,CAAC,IAAI,IACC,GACL,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -26,13 +26,35 @@ import { type ChapteredVideo } from './videoChapters';
|
|
|
26
26
|
* Vidstack's default layout from a bare bar into a YouTube-shaped one — dividers on the time
|
|
27
27
|
* slider, the current section's name above it, and a chapters menu. See {@link ChaptersTrack}.
|
|
28
28
|
*/
|
|
29
|
+
/**
|
|
30
|
+
* The clip as the players in THIS package consume it — core's {@link PlayableVideo} plus the
|
|
31
|
+
* two facts cursedbelt carries that `cursedbelt-core` does not yet: the named sections
|
|
32
|
+
* ({@link ChapteredVideo}) and whether this play is a KNOWN fallback off the adaptive ladder.
|
|
33
|
+
*
|
|
34
|
+
* 🔴 An intersection for the same reason `ChapteredVideo` is one — see `videoChapters.ts`'s
|
|
35
|
+
* header. `PlayableVideo` lives in the published `cursedbelt-core`, which this package cannot
|
|
36
|
+
* edit and read in the same commit. It only widens, so every existing source, stage and prop
|
|
37
|
+
* still typechecks untouched.
|
|
38
|
+
*/
|
|
39
|
+
export type PlayerVideo = ChapteredVideo & {
|
|
40
|
+
/**
|
|
41
|
+
* The app could not ASK its media store about this video's ladder, so it is serving the
|
|
42
|
+
* progressive copy on that ignorance — see `MediaGalleryItemMedia.playbackDegraded` for the
|
|
43
|
+
* full note and the measurements.
|
|
44
|
+
*
|
|
45
|
+
* 🔴 Absent is the ordinary state, including for every video that simply has no ladder. Only
|
|
46
|
+
* a probe that did not ANSWER sets this; "there is no ladder" is not a fault and draws
|
|
47
|
+
* nothing.
|
|
48
|
+
*/
|
|
49
|
+
playbackDegraded?: boolean;
|
|
50
|
+
};
|
|
29
51
|
export interface VideoPlayerProps {
|
|
30
52
|
/**
|
|
31
|
-
* The clip, with every URL already resolved —
|
|
32
|
-
*
|
|
33
|
-
* still satisfies this unchanged.
|
|
53
|
+
* The clip, with every URL already resolved — its named sections when the app carries any,
|
|
54
|
+
* and whether the ladder was unreachable. {@link PlayerVideo} is `PlayableVideo` plus those
|
|
55
|
+
* two optional fields, so every existing source still satisfies this unchanged.
|
|
34
56
|
*/
|
|
35
|
-
video:
|
|
57
|
+
video: PlayerVideo;
|
|
36
58
|
/**
|
|
37
59
|
* Start playing on mount. **Defaults to `true`** — see {@link usePrefersReducedMotion} and
|
|
38
60
|
* the block on {@link AUTOPLAY_DEFAULT}.
|
|
@@ -369,13 +391,19 @@ export declare function preferBundledHls(provider: MediaProviderAdapter | null):
|
|
|
369
391
|
export declare function usePrefersReducedMotion(): boolean;
|
|
370
392
|
export declare function VideoPlayer({ video, autoPlay, muted, volumeKey, className, aspectRatio, onEnded, loop, liveScrub, smallLayoutWhen, onStep, canStep, fullscreenOnDoubleClick, }: VideoPlayerProps): import("react").JSX.Element;
|
|
371
393
|
/**
|
|
372
|
-
* The
|
|
373
|
-
* while derivatives build (indeterminate shimmer until real progress arrives),
|
|
374
|
-
*
|
|
394
|
+
* The transport state for a video surface: a thin progress bar pinned across the bottom edge
|
|
395
|
+
* while derivatives build (indeterminate shimmer until real progress arrives), plus whatever
|
|
396
|
+
* {@link VideoStatusBadges} has to say in the corner — optimization failed, and/or this play
|
|
397
|
+
* being a known fallback off the ladder. Never covers the video — the original bytes stay
|
|
375
398
|
* fully visible and playable behind it. Shared by {@link VideoPlayer} and the canvas fallback.
|
|
399
|
+
*
|
|
400
|
+
* 🔴 `status` is OPTIONAL, because a degraded play is not a processing state: a video that
|
|
401
|
+
* finished optimizing perfectly well can still be served off the progressive copy because the
|
|
402
|
+
* ladder probe did not answer. That combination has no `ProcessingStatus` to pass.
|
|
376
403
|
*/
|
|
377
|
-
export declare function ProcessingIndicator({ status, progress, }: {
|
|
378
|
-
status
|
|
404
|
+
export declare function ProcessingIndicator({ status, progress, playbackDegraded, }: {
|
|
405
|
+
status?: PlayableVideo['processingStatus'];
|
|
379
406
|
progress?: number;
|
|
407
|
+
playbackDegraded?: boolean;
|
|
380
408
|
}): import("react").JSX.Element;
|
|
381
409
|
//# sourceMappingURL=VideoPlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../src/react/media/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,iDAAiD,CAAC;AACzD,OAAO,yDAAyD,CAAC;AACjE,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,mBAAmB,EAExB,KAAK,oBAAoB,EAI1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAsC,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAC;AACjH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../src/react/media/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,iDAAiD,CAAC;AACzD,OAAO,yDAAyD,CAAC;AACjE,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,mBAAmB,EAExB,KAAK,oBAAoB,EAI1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAsC,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAC;AACjH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,EAAgB,KAAK,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAEvF;;;;;;;;;;;;;;;;;;GAkBG;AACH;;;;;;;;;GASG;AAC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gBN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAG5E;AAED,wBAAgB,uBAAuB,IAAI,OAAO,CAUjD;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAA6B,EAC7B,SAAS,EACT,WAAwC,EACxC,OAAO,EACP,IAAI,EACJ,SAAgB,EAChB,eAAoC,EACpC,MAAM,EACN,OAAc,EACd,uBAA8B,GAC/B,EAAE,gBAAgB,+BAoNlB;AAoHD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,MAAM,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,+BAyDA"}
|
|
@@ -6,6 +6,7 @@ import { Gesture, isHLSProvider, MediaPlayer, MediaProvider, Poster, Track, useM
|
|
|
6
6
|
import { DefaultVideoLayout, defaultLayoutIcons, } from '@vidstack/react/player/layouts/default';
|
|
7
7
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import { PLAYER_VOLUME_KEY, readSessionVolume, writeSessionVolume, } from '../media-gallery/playbackPreferences';
|
|
9
|
+
import { hlsErrorIsAnswer, probeSourceFault, SourceFaultOverlay, } from './sourceFault';
|
|
9
10
|
import { isSurfaceControl } from './surfaceGesture';
|
|
10
11
|
import { chapterSpans } from './videoChapters';
|
|
11
12
|
/**
|
|
@@ -340,8 +341,27 @@ export function usePrefersReducedMotion() {
|
|
|
340
341
|
return reduced;
|
|
341
342
|
}
|
|
342
343
|
export function VideoPlayer({ video, autoPlay, muted, volumeKey = PLAYER_VOLUME_KEY, className, aspectRatio = DEFAULT_VIDEO_ASPECT_RATIO, onEnded, loop, liveScrub = true, smallLayoutWhen = isSmallVideoLayout, onStep, canStep = true, fullscreenOnDoubleClick = true, }) {
|
|
344
|
+
/*
|
|
345
|
+
* 🔴 What the SOURCES have answered, and why a player needs to hold that at all.
|
|
346
|
+
*
|
|
347
|
+
* Owner, 2026-09-17: *"make a 404 stop the media player spinner so I don't think it's going
|
|
348
|
+
* to eventually load."* Vidstack's layout draws a buffering spinner whenever the player is
|
|
349
|
+
* not ready, and nothing in it distinguishes "waiting" from "asked and told no" — so an item
|
|
350
|
+
* whose ladder answers `404` in 0.2 s spun until he gave up. Two pieces of state end that:
|
|
351
|
+
*
|
|
352
|
+
* · `ladderAnswered` — the master or a rung REPLIED with a status. Nothing to wait for, so
|
|
353
|
+
* the progressive copy (the one that always exists) takes over at once instead of after
|
|
354
|
+
* hls.js has retried an answer. Vidstack has no fallback of its own; this is it.
|
|
355
|
+
* · `fault` — the progressive copy answered too, so there is nothing left to play and the
|
|
356
|
+
* only useful act is to say what happened. See `sourceFault.ts`.
|
|
357
|
+
*
|
|
358
|
+
* Both are set ONLY from an answer. A timeout, a stall and a slow origin set neither and
|
|
359
|
+
* still spin, which is correct: something might still arrive.
|
|
360
|
+
*/
|
|
361
|
+
const [ladderAnswered, setLadderAnswered] = useState(false);
|
|
362
|
+
const [fault, setFault] = useState(null);
|
|
343
363
|
// Prefer the adaptive HLS master; fall back to the progressive Range source.
|
|
344
|
-
const src = video.hlsUrl
|
|
364
|
+
const src = video.hlsUrl && !ladderAnswered
|
|
345
365
|
? { src: video.hlsUrl, type: 'application/x-mpegurl' }
|
|
346
366
|
: video.streamUrl;
|
|
347
367
|
// See AUTOPLAY_DEFAULT. `muted` follows `autoPlay` because an unmuted autoplay is refused
|
|
@@ -370,7 +390,10 @@ export function VideoPlayer({ video, autoPlay, muted, volumeKey = PLAYER_VOLUME_
|
|
|
370
390
|
/** A mute the BROWSER forced on us — see `onAutoPlayFail` below. Never his choice, so never stored. */
|
|
371
391
|
const forcedMute = useRef(false);
|
|
372
392
|
const status = video.processingStatus;
|
|
373
|
-
|
|
393
|
+
// 🔴 `playbackDegraded` is its own reason to draw, not a processing state — a video that
|
|
394
|
+
// optimized perfectly can still be served off the progressive copy because the ladder probe
|
|
395
|
+
// did not answer, and that play has no `ProcessingStatus` at all.
|
|
396
|
+
const showProcessing = (status != null && status !== 'ready') || video.playbackDegraded === true;
|
|
374
397
|
// Memoized because `slots` holds React elements: a fresh object every render remounts
|
|
375
398
|
// Vidstack's whole layout, which drops the control bar mid-hover and restarts its
|
|
376
399
|
// auto-hide timer on every state change the player makes (i.e. constantly, while playing).
|
|
@@ -383,7 +406,29 @@ export function VideoPlayer({ video, autoPlay, muted, volumeKey = PLAYER_VOLUME_
|
|
|
383
406
|
// 🔴 The hls.js engine is served from this origin, not from jsdelivr. See
|
|
384
407
|
// `preferBundledHls` — without it an adaptive ladder depends on a third-party CDN
|
|
385
408
|
// and fails as a permanent spinner when that CDN is unreachable.
|
|
386
|
-
onProviderChange: preferBundledHls,
|
|
409
|
+
onProviderChange: preferBundledHls,
|
|
410
|
+
/* See {@link hlsErrorIsAnswer}. Typed `unknown` on purpose: `hls.js` is an OPTIONAL
|
|
411
|
+
peer, so its `ErrorData` must not become a static type dependency of this file. */
|
|
412
|
+
onHlsError: (detail) => {
|
|
413
|
+
if (hlsErrorIsAnswer(detail))
|
|
414
|
+
setLadderAnswered(true);
|
|
415
|
+
},
|
|
416
|
+
/* The element itself gave up, and what that means depends on what was playing.
|
|
417
|
+
With a LADDER in play it is the case Vidstack has no answer for at all — a browser
|
|
418
|
+
playing HLS natively (Safari, every iPhone) meeting a master that is not there, or
|
|
419
|
+
an hls.js that has spent its own six retries — and the progressive copy has not had
|
|
420
|
+
its turn yet. 🔴 Handing over is a DOWNGRADE to a stream the edge will not cache, so
|
|
421
|
+
it happens only once the ladder has actually failed, never on a stall; it is the
|
|
422
|
+
same call `hlsSource.ts` makes when its recovery budget is spent, and a playing film
|
|
423
|
+
beats a dead one. On the progressive copy there is no turn left, so the URL is
|
|
424
|
+
probed for what it actually said and the picture says it. */
|
|
425
|
+
onError: () => {
|
|
426
|
+
if (video.hlsUrl && !ladderAnswered) {
|
|
427
|
+
setLadderAnswered(true);
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
void probeSourceFault(video.streamUrl).then(setFault);
|
|
431
|
+
}, title: video.name, poster: video.posterUrl, crossOrigin: true, playsInline: true, autoPlay: shouldAutoPlay, muted: shouldMute,
|
|
387
432
|
// 🔴 The level he set this session, restored on the element — see `resolveAutoplay`
|
|
388
433
|
// and `SessionVolume`. Both values are constant for the life of this mount, so
|
|
389
434
|
// Vidstack's own volume state is never overwritten while he is using the control bar;
|
|
@@ -431,7 +476,7 @@ export function VideoPlayer({ video, autoPlay, muted, volumeKey = PLAYER_VOLUME_
|
|
|
431
476
|
// "many options from very slow to very fast": 0.1 is frame-crawling, which is the
|
|
432
477
|
// speed you actually want for studying a moment, and 4 is for skimming a long
|
|
433
478
|
// clip. The default five steps cover neither end.
|
|
434
|
-
playbackRates: PLAYBACK_RATES, ...(slots ? { slots } : {}) })] }), showProcessing ? (_jsx(ProcessingIndicator, { status: status, progress: video.processingProgress })) : null] }));
|
|
479
|
+
playbackRates: PLAYBACK_RATES, ...(slots ? { slots } : {}) })] }), showProcessing ? (_jsx(ProcessingIndicator, { status: status, progress: video.processingProgress, playbackDegraded: video.playbackDegraded })) : null, fault ? _jsx(SourceFaultOverlay, { fault: fault, name: video.name }) : null] }));
|
|
435
480
|
}
|
|
436
481
|
/**
|
|
437
482
|
* The named sections, as the `kind='chapters'` text track Vidstack's default layout is already
|
|
@@ -473,18 +518,47 @@ function ChaptersTrack({ chapters }) {
|
|
|
473
518
|
return null;
|
|
474
519
|
return _jsx(Track, { content: content, type: 'json', kind: 'chapters', label: 'Chapters', default: true });
|
|
475
520
|
}
|
|
521
|
+
/*
|
|
522
|
+
* 🔴 Module-private, and the specs spell both sentences out rather than importing them. This
|
|
523
|
+
* is COPY: which words are on the picture is the deliverable, so an assertion that reads the
|
|
524
|
+
* constant asserts nothing — it would stay green through a rewrite of the very thing it is
|
|
525
|
+
* meant to be pinning. (They are also not worth a line of published surface, which
|
|
526
|
+
* `publicSurface.baseline` charges for.)
|
|
527
|
+
*/
|
|
528
|
+
const OPTIMIZATION_FAILED_BADGE = 'Optimization failed — playing original';
|
|
529
|
+
const PLAYBACK_DEGRADED_BADGE = 'Reduced quality — could not reach the media store';
|
|
476
530
|
/**
|
|
477
|
-
* The
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
531
|
+
* The top-right corner of a video surface, as ONE stack.
|
|
532
|
+
*
|
|
533
|
+
* 🔴 A stack rather than each badge pinning itself to `top: 8; right: 8`, because both facts
|
|
534
|
+
* can be true of the same play — an optimization that failed AND a media store we could not
|
|
535
|
+
* reach — and two absolutely-positioned pills at one coordinate draw exactly on top of each
|
|
536
|
+
* other, so the second sentence is invisible precisely when there is most to say. Laid out as
|
|
537
|
+
* a column, the corner holds one, two, or (returning `null`) none.
|
|
538
|
+
*
|
|
539
|
+
* Never covers the picture: pills only, right-aligned, `pointer-events: none`, so the original
|
|
540
|
+
* bytes stay fully visible and the control bar underneath stays clickable.
|
|
481
541
|
*/
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
542
|
+
function VideoStatusBadges({ processingFailed, playbackDegraded, }) {
|
|
543
|
+
const lines = [
|
|
544
|
+
processingFailed ? OPTIMIZATION_FAILED_BADGE : null,
|
|
545
|
+
// 🔴 A SECOND line, never a re-use of the first. The optimization did not fail here — it
|
|
546
|
+
// may well have succeeded and we could not ask — so borrowing that sentence would put a
|
|
547
|
+
// false one on screen. See `PlayerVideo.playbackDegraded`.
|
|
548
|
+
playbackDegraded ? PLAYBACK_DEGRADED_BADGE : null,
|
|
549
|
+
].filter((line) => line !== null);
|
|
550
|
+
if (lines.length === 0)
|
|
551
|
+
return null;
|
|
552
|
+
return (_jsx("div", { style: {
|
|
553
|
+
position: 'absolute',
|
|
554
|
+
top: 8,
|
|
555
|
+
right: 8,
|
|
556
|
+
display: 'flex',
|
|
557
|
+
flexDirection: 'column',
|
|
558
|
+
alignItems: 'flex-end',
|
|
559
|
+
gap: 4,
|
|
560
|
+
pointerEvents: 'none',
|
|
561
|
+
}, children: lines.map((line) => (_jsx("div", { role: 'status', style: {
|
|
488
562
|
padding: '3px 8px',
|
|
489
563
|
borderRadius: 999,
|
|
490
564
|
// A corner badge scrim ON TOP of video content — dark-on-video regardless of app
|
|
@@ -495,32 +569,49 @@ export function ProcessingIndicator({ status, progress, }) {
|
|
|
495
569
|
fontSize: 12,
|
|
496
570
|
fontWeight: 600,
|
|
497
571
|
lineHeight: 1.4,
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
572
|
+
}, children: line }, line))) }));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* The transport state for a video surface: a thin progress bar pinned across the bottom edge
|
|
576
|
+
* while derivatives build (indeterminate shimmer until real progress arrives), plus whatever
|
|
577
|
+
* {@link VideoStatusBadges} has to say in the corner — optimization failed, and/or this play
|
|
578
|
+
* being a known fallback off the ladder. Never covers the video — the original bytes stay
|
|
579
|
+
* fully visible and playable behind it. Shared by {@link VideoPlayer} and the canvas fallback.
|
|
580
|
+
*
|
|
581
|
+
* 🔴 `status` is OPTIONAL, because a degraded play is not a processing state: a video that
|
|
582
|
+
* finished optimizing perfectly well can still be served off the progressive copy because the
|
|
583
|
+
* ladder probe did not answer. That combination has no `ProcessingStatus` to pass.
|
|
584
|
+
*/
|
|
585
|
+
export function ProcessingIndicator({ status, progress, playbackDegraded, }) {
|
|
586
|
+
// The corner is one stack, so it is rendered from one place — see `VideoStatusBadges`.
|
|
587
|
+
const badges = (_jsx(VideoStatusBadges, { processingFailed: status === 'failed', playbackDegraded: playbackDegraded }));
|
|
588
|
+
// The bar is for work in FLIGHT. A failed, ready or absent status has nothing building, so
|
|
589
|
+
// the corner is the whole of what this component draws.
|
|
590
|
+
if (status !== 'pending' && status !== 'processing')
|
|
591
|
+
return badges;
|
|
501
592
|
const clamped = Math.max(0, Math.min(100, progress ?? 0));
|
|
502
593
|
const indeterminate = clamped === 0;
|
|
503
|
-
return (_jsxs("div", { role: 'progressbar', "aria-label": 'Optimizing video', "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": indeterminate ? undefined : Math.round(clamped), style: {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
594
|
+
return (_jsxs(_Fragment, { children: [badges, _jsxs("div", { role: 'progressbar', "aria-label": 'Optimizing video', "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": indeterminate ? undefined : Math.round(clamped), style: {
|
|
595
|
+
position: 'absolute',
|
|
596
|
+
left: 0,
|
|
597
|
+
right: 0,
|
|
598
|
+
bottom: 0,
|
|
599
|
+
height: 4,
|
|
600
|
+
// The progress bar's TRACK sits directly on the video surface, not app chrome — a
|
|
601
|
+
// translucent white track reads on any video frame regardless of app theme (the fill
|
|
602
|
+
// is already theme-token'd: `var(--vds-accent, var(--accent))`).
|
|
603
|
+
// guardrails-ignore no-hardcoded-colors: see comment above.
|
|
604
|
+
background: 'rgba(255, 255, 255, 0.25)',
|
|
605
|
+
overflow: 'hidden',
|
|
606
|
+
pointerEvents: 'none',
|
|
607
|
+
}, children: [_jsx("style", { children: '@keyframes cb-video-processing-indeterminate{0%{transform:translateX(-100%)}100%{transform:translateX(400%)}}' }), _jsx("div", { style: {
|
|
608
|
+
width: indeterminate ? '25%' : `${clamped}%`,
|
|
609
|
+
height: '100%',
|
|
610
|
+
background: 'var(--vds-accent, var(--accent))',
|
|
611
|
+
transition: indeterminate ? undefined : 'width 300ms',
|
|
612
|
+
animation: indeterminate
|
|
613
|
+
? 'cb-video-processing-indeterminate 1.4s ease-in-out infinite'
|
|
614
|
+
: undefined,
|
|
615
|
+
} })] })] }));
|
|
525
616
|
}
|
|
526
617
|
//# sourceMappingURL=VideoPlayer.js.map
|