@pixerate/editor 0.83.0 → 0.84.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/video-editor/index.cjs +556 -90
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +247 -8
- package/dist/video-editor/index.d.ts +247 -8
- package/dist/video-editor/index.js +503 -37
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/pixerate-video-editor/SKILL.md +24 -6
|
@@ -142,8 +142,16 @@ interface VideoTransform {
|
|
|
142
142
|
/** How a picture is fitted to the frame before its transform: like CSS `object-fit`. */
|
|
143
143
|
type VideoFit = 'contain' | 'cover' | 'fill' | 'none';
|
|
144
144
|
declare const VIDEO_FITS: readonly ["contain", "cover", "fill", "none"];
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
/**
|
|
146
|
+
* - `crossfade`: this clip fades up over the one before.
|
|
147
|
+
* - `dip`: down into a colour and up out of it.
|
|
148
|
+
* - `wipe`: an edge travels across, revealing this clip.
|
|
149
|
+
* - `push`: this clip slides in, pushing the one before out.
|
|
150
|
+
* - `slide`: this clip slides in over the one before, which stays put.
|
|
151
|
+
* - `iris`: a circle opens from the centre, revealing this clip.
|
|
152
|
+
*/
|
|
153
|
+
type VideoTransitionType = 'crossfade' | 'dip' | 'wipe' | 'push' | 'slide' | 'iris';
|
|
154
|
+
declare const VIDEO_TRANSITION_TYPES: readonly ["crossfade", "dip", "wipe", "push", "slide", "iris"];
|
|
147
155
|
type VideoWipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
148
156
|
declare const VIDEO_WIPE_DIRECTIONS: readonly ["left", "right", "up", "down"];
|
|
149
157
|
/**
|
|
@@ -157,8 +165,54 @@ interface VideoTransition {
|
|
|
157
165
|
duration: number;
|
|
158
166
|
/** For dip: the colour passed through (default black). */
|
|
159
167
|
color?: string;
|
|
160
|
-
/** For wipe: the way the edge travels (default right
|
|
168
|
+
/** For wipe, push and slide: the way the edge or picture travels (default right: in from the left). */
|
|
161
169
|
direction?: VideoWipeDirection;
|
|
170
|
+
/**
|
|
171
|
+
* Shape of the sound's fades through the transition (see `VideoFadeCurve`). Default
|
|
172
|
+
* `equal-power` for crossfades and wipes, where two sounds overlap and a linear mix dips in
|
|
173
|
+
* loudness halfway; `linear` for dips, where one sound fades out before the other fades in.
|
|
174
|
+
*/
|
|
175
|
+
audioCurve?: VideoFadeCurve;
|
|
176
|
+
}
|
|
177
|
+
/** The curve a transition's sound fades follow (its `audioCurve`, else the default for its type). */
|
|
178
|
+
declare const videoTransitionAudioCurve: (t: VideoTransition) => VideoFadeCurve;
|
|
179
|
+
/**
|
|
180
|
+
* How a clip's picture mixes with what is beneath it, as in CSS `mix-blend-mode` (`add` sums the
|
|
181
|
+
* colours, `plus-lighter` in CSS). These are the modes the canvas preview, SVG frames and ffmpeg's
|
|
182
|
+
* `blend` filter all share.
|
|
183
|
+
*/
|
|
184
|
+
type VideoBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'add';
|
|
185
|
+
declare const VIDEO_BLEND_MODES: readonly ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "add"];
|
|
186
|
+
/**
|
|
187
|
+
* Colour correction for a clip's picture (see `VIDEO_GRADE_CONTROLS` for ranges). Applied in a fixed
|
|
188
|
+
* order: exposure, contrast, saturation, hue, then white balance (temperature and tint).
|
|
189
|
+
*/
|
|
190
|
+
interface VideoGrade {
|
|
191
|
+
/** Stops: +1 doubles every channel (default 0). */
|
|
192
|
+
exposure?: number;
|
|
193
|
+
/** -1 (flat grey) to 1 (twice as steep), around mid grey (default 0). */
|
|
194
|
+
contrast?: number;
|
|
195
|
+
/** -1 (black and white) to 1 (twice as saturated); default 0. */
|
|
196
|
+
saturation?: number;
|
|
197
|
+
/** Hue rotation in degrees (default 0). */
|
|
198
|
+
hue?: number;
|
|
199
|
+
/** -1 (cool) to 1 (warm); default 0. */
|
|
200
|
+
temperature?: number;
|
|
201
|
+
/** -1 (green) to 1 (magenta); default 0. */
|
|
202
|
+
tint?: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* How a clip enters or leaves: `fade`; `rise` (up into place) or `drop` (down into place);
|
|
206
|
+
* `slide-left` / `slide-right` (in moving that way); `zoom` (grows into place); `pop` (grows past its
|
|
207
|
+
* size and settles). Each also fades. An exit plays the same movement backwards.
|
|
208
|
+
*/
|
|
209
|
+
type VideoClipAnimationEffect = 'fade' | 'rise' | 'drop' | 'slide-left' | 'slide-right' | 'zoom' | 'pop';
|
|
210
|
+
declare const VIDEO_CLIP_ANIMATION_EFFECTS: readonly ["fade", "rise", "drop", "slide-left", "slide-right", "zoom", "pop"];
|
|
211
|
+
/** An entrance or exit animation (see `VideoClipAnimationEffect`). */
|
|
212
|
+
interface VideoClipAnimation {
|
|
213
|
+
effect: VideoClipAnimationEffect;
|
|
214
|
+
/** Length (ms, default 500). */
|
|
215
|
+
duration?: number;
|
|
162
216
|
}
|
|
163
217
|
interface VideoClipBase {
|
|
164
218
|
id: string;
|
|
@@ -172,6 +226,14 @@ interface VideoClipBase {
|
|
|
172
226
|
transform?: VideoTransform;
|
|
173
227
|
/** Default contain. */
|
|
174
228
|
fit?: VideoFit;
|
|
229
|
+
/** How the picture mixes with what is beneath it (default normal). */
|
|
230
|
+
blend?: VideoBlendMode;
|
|
231
|
+
/** Colour correction of the picture. */
|
|
232
|
+
grade?: VideoGrade;
|
|
233
|
+
/** How the picture enters, from the clip's start (on top of any fade in). */
|
|
234
|
+
animateIn?: VideoClipAnimation;
|
|
235
|
+
/** How the picture leaves, up to the clip's end. */
|
|
236
|
+
animateOut?: VideoClipAnimation;
|
|
175
237
|
/** Fade in from nothing over this long (ms), pictures and sound. */
|
|
176
238
|
fadeIn?: number;
|
|
177
239
|
/** Fade out over this long (ms). */
|
|
@@ -274,6 +336,8 @@ declare function parseVideoAnimatable(v: unknown, path: string, range?: {
|
|
|
274
336
|
optional?: boolean;
|
|
275
337
|
}): VideoAnimatable | undefined;
|
|
276
338
|
declare function parseVideoTransform(v: unknown, path: string): VideoTransform | undefined;
|
|
339
|
+
declare function parseVideoClipAnimation(v: unknown, path: string): VideoClipAnimation | undefined;
|
|
340
|
+
declare function parseVideoGrade(v: unknown, path: string): VideoGrade | undefined;
|
|
277
341
|
declare function parseVideoTransition(v: unknown, path: string): VideoTransition | undefined;
|
|
278
342
|
declare function parseVideoAsset(v: unknown, path?: string): VideoAsset;
|
|
279
343
|
declare function parseVideoClip(v: unknown, path?: string): VideoClip;
|
|
@@ -410,7 +474,7 @@ declare function videoClipKeyframes(clip: VideoClip): {
|
|
|
410
474
|
keys: ReturnType<typeof videoKeysOf>;
|
|
411
475
|
}[];
|
|
412
476
|
type VideoIssueSeverity = 'error' | 'warning' | 'note';
|
|
413
|
-
declare const VIDEO_ISSUE_CODES: readonly ["missing-asset", "wrong-track", "overlap", "source-overrun", "transition-without-cut", "transition-too-long", "transition-handles", "fades-too-long", "keyframes-outside-clip", "unknown-duration", "unused-asset", "marker-past-end", "empty"];
|
|
477
|
+
declare const VIDEO_ISSUE_CODES: readonly ["missing-asset", "wrong-track", "overlap", "source-overrun", "transition-without-cut", "transition-too-long", "transition-handles", "fades-too-long", "animations-too-long", "animation-keyed", "keyframes-outside-clip", "unknown-duration", "unused-asset", "marker-past-end", "empty"];
|
|
414
478
|
type VideoIssueCode = (typeof VIDEO_ISSUE_CODES)[number];
|
|
415
479
|
interface VideoIssue {
|
|
416
480
|
code: VideoIssueCode;
|
|
@@ -653,6 +717,10 @@ interface VideoLayer {
|
|
|
653
717
|
direction: VideoWipeDirection;
|
|
654
718
|
progress: number;
|
|
655
719
|
};
|
|
720
|
+
/** For an iris: only a circle on the frame's centre shows, its radius `progress` (0–1) of the way to the frame's corners. */
|
|
721
|
+
iris?: {
|
|
722
|
+
progress: number;
|
|
723
|
+
};
|
|
656
724
|
/** For text: what to draw. */
|
|
657
725
|
text?: {
|
|
658
726
|
text: string;
|
|
@@ -664,6 +732,10 @@ interface VideoLayer {
|
|
|
664
732
|
};
|
|
665
733
|
/** For colour clips and dips. */
|
|
666
734
|
color?: string;
|
|
735
|
+
/** How it mixes with the layers beneath (absent = normal). */
|
|
736
|
+
blend?: VideoBlendMode;
|
|
737
|
+
/** Colour correction (absent = none). */
|
|
738
|
+
grade?: VideoGrade;
|
|
667
739
|
}
|
|
668
740
|
/** One sound playing at a moment. */
|
|
669
741
|
interface VideoAudioSource {
|
|
@@ -710,6 +782,8 @@ declare function videoTextStyle(clip: VideoTextClip): NonNullable<VideoLayer['te
|
|
|
710
782
|
* transforms without them, and moves the image itself).
|
|
711
783
|
*/
|
|
712
784
|
declare function videoTitleFrame(project: VideoProject, clip: VideoTextClip, clipTime?: number): VideoFrame;
|
|
785
|
+
/** How far a push or slide has moved at `progress` (0–1): eased in and out, (1 − cos πp) / 2. */
|
|
786
|
+
declare const videoTransitionEase: (progress: number) => number;
|
|
713
787
|
/** Gain of a fade shape `x` of the way up (0–1); a fade out uses the time left, so it mirrors the fade in. */
|
|
714
788
|
declare function videoFadeCurveGain(curve: VideoFadeCurve | undefined, x: number): number;
|
|
715
789
|
/**
|
|
@@ -828,6 +902,137 @@ declare class VideoAudioPeaksCache {
|
|
|
828
902
|
private emit;
|
|
829
903
|
}
|
|
830
904
|
|
|
905
|
+
/**
|
|
906
|
+
* Colour correction as a fixed series of colour-matrix steps on gamma-encoded sRGB, each clamped
|
|
907
|
+
* to 0–1, in the same order everywhere: exposure, contrast, saturation, hue, then white balance.
|
|
908
|
+
* Every step is one the browser has (CSS `brightness`, `contrast`, `saturate`, `hue-rotate`; white
|
|
909
|
+
* balance as an SVG `feColorMatrix`) and ffmpeg has (`lutrgb`, `colorchannelmixer`), with the same
|
|
910
|
+
* formulas, so the preview, SVG frames and the export agree.
|
|
911
|
+
*/
|
|
912
|
+
/** One slider of a grade: its range, default and step, for schemas, inspectors and clamping. */
|
|
913
|
+
interface VideoGradeControl {
|
|
914
|
+
key: keyof VideoGrade;
|
|
915
|
+
label: string;
|
|
916
|
+
min: number;
|
|
917
|
+
max: number;
|
|
918
|
+
step: number;
|
|
919
|
+
/** What the number means, for tool descriptions. */
|
|
920
|
+
description: string;
|
|
921
|
+
}
|
|
922
|
+
declare const VIDEO_GRADE_CONTROLS: readonly VideoGradeControl[];
|
|
923
|
+
/** Named looks. Apply them at a strength with `videoGradePreset`. */
|
|
924
|
+
declare const VIDEO_GRADE_PRESETS: {
|
|
925
|
+
readonly warm: {
|
|
926
|
+
readonly temperature: 0.4;
|
|
927
|
+
readonly saturation: 0.1;
|
|
928
|
+
};
|
|
929
|
+
readonly cool: {
|
|
930
|
+
readonly temperature: -0.4;
|
|
931
|
+
readonly tint: -0.05;
|
|
932
|
+
};
|
|
933
|
+
readonly punchy: {
|
|
934
|
+
readonly contrast: 0.25;
|
|
935
|
+
readonly saturation: 0.3;
|
|
936
|
+
};
|
|
937
|
+
readonly faded: {
|
|
938
|
+
readonly exposure: 0.15;
|
|
939
|
+
readonly contrast: -0.3;
|
|
940
|
+
readonly saturation: -0.3;
|
|
941
|
+
};
|
|
942
|
+
readonly 'black-and-white': {
|
|
943
|
+
readonly saturation: -1;
|
|
944
|
+
readonly contrast: 0.15;
|
|
945
|
+
};
|
|
946
|
+
readonly 'bleach-bypass': {
|
|
947
|
+
readonly saturation: -0.6;
|
|
948
|
+
readonly contrast: 0.4;
|
|
949
|
+
};
|
|
950
|
+
readonly 'day-for-night': {
|
|
951
|
+
readonly exposure: -1.5;
|
|
952
|
+
readonly saturation: -0.4;
|
|
953
|
+
readonly temperature: -0.6;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
type VideoGradePreset = keyof typeof VIDEO_GRADE_PRESETS;
|
|
957
|
+
declare const VIDEO_GRADE_PRESET_NAMES: VideoGradePreset[];
|
|
958
|
+
/** A grade with every value clamped to its range and zero values left out; `undefined` when nothing is left. */
|
|
959
|
+
declare function normalizeVideoGrade(grade: VideoGrade | undefined): VideoGrade | undefined;
|
|
960
|
+
/** A preset at `amount` (0–1, default 1) of its strength. */
|
|
961
|
+
declare function videoGradePreset(name: VideoGradePreset, amount?: number): VideoGrade | undefined;
|
|
962
|
+
/** One step of a grade. */
|
|
963
|
+
type VideoGradeStep = {
|
|
964
|
+
kind: 'brightness';
|
|
965
|
+
amount: number;
|
|
966
|
+
} | {
|
|
967
|
+
kind: 'contrast';
|
|
968
|
+
amount: number;
|
|
969
|
+
} | {
|
|
970
|
+
kind: 'saturate';
|
|
971
|
+
amount: number;
|
|
972
|
+
} | {
|
|
973
|
+
kind: 'hue-rotate';
|
|
974
|
+
degrees: number;
|
|
975
|
+
} | {
|
|
976
|
+
kind: 'gains';
|
|
977
|
+
r: number;
|
|
978
|
+
g: number;
|
|
979
|
+
b: number;
|
|
980
|
+
};
|
|
981
|
+
/** The steps a grade applies, in order, leaving out those that change nothing. */
|
|
982
|
+
declare function videoGradeSteps(grade: VideoGrade | undefined): VideoGradeStep[];
|
|
983
|
+
/**
|
|
984
|
+
* A step as a 3 × 4 matrix (rows r, g, b; columns r, g, b, offset), with the coefficients the CSS
|
|
985
|
+
* Filter Effects spec gives for `saturate` and `hue-rotate`.
|
|
986
|
+
*/
|
|
987
|
+
declare function videoGradeStepMatrix(step: VideoGradeStep): number[][];
|
|
988
|
+
/** An RGB colour (0–255 each) through a grade, as the preview and export draw it. */
|
|
989
|
+
declare function applyVideoGrade(grade: VideoGrade | undefined, rgb: readonly [number, number, number]): [number, number, number];
|
|
990
|
+
/** The `values` of an SVG `feColorMatrix type="matrix"` for a step. */
|
|
991
|
+
declare function videoGradeStepSvgValues(step: VideoGradeStep): string;
|
|
992
|
+
/** An SVG `<filter>` applying a grade, steps in order (each clamps, as CSS filters do). */
|
|
993
|
+
declare function videoGradeSvgFilter(id: string, grade: VideoGrade | undefined): string;
|
|
994
|
+
/** Id of the SVG filter for a white-balance step: the same gains always get the same id. */
|
|
995
|
+
declare const videoGradeGainsFilterId: (step: Extract<VideoGradeStep, {
|
|
996
|
+
kind: "gains";
|
|
997
|
+
}>) => string;
|
|
998
|
+
/**
|
|
999
|
+
* A grade as a CSS / canvas `filter`: CSS functions for every step, and `url(#id)` for white balance,
|
|
1000
|
+
* which CSS has no function for (see `videoGradeGainsFilterId`; the host puts that filter in the page).
|
|
1001
|
+
* `''` when the grade changes nothing.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function videoGradeCssFilter(grade: VideoGrade | undefined): string;
|
|
1004
|
+
/** The white-balance SVG filters a grade's CSS filter refers to, as `{ id, markup }`. */
|
|
1005
|
+
declare function videoGradeSvgDefs(grade: VideoGrade | undefined): {
|
|
1006
|
+
id: string;
|
|
1007
|
+
markup: string;
|
|
1008
|
+
}[];
|
|
1009
|
+
/** A grade as ffmpeg filters on RGB, in order: `lutrgb` for exposure and contrast, `colorchannelmixer` for the rest. */
|
|
1010
|
+
declare function videoGradeFfmpegFilters(grade: VideoGrade | undefined): string[];
|
|
1011
|
+
|
|
1012
|
+
/** Default length of an entrance or exit animation (ms). */
|
|
1013
|
+
declare const VIDEO_CLIP_ANIMATION_DURATION = 500;
|
|
1014
|
+
declare const PROPS: readonly ["opacity", "x", "y", "scale"];
|
|
1015
|
+
type Prop = (typeof PROPS)[number];
|
|
1016
|
+
/** The properties an animation moves (each also fades: opacity is always one). */
|
|
1017
|
+
declare function videoClipAnimationProperties(animation: VideoClipAnimation): Prop[];
|
|
1018
|
+
/** Entrance and exit lengths (ms), shortened in proportion when together they are longer than the clip. */
|
|
1019
|
+
declare function videoClipAnimationSpans(clip: VideoClip): {
|
|
1020
|
+
in: number;
|
|
1021
|
+
out: number;
|
|
1022
|
+
};
|
|
1023
|
+
/**
|
|
1024
|
+
* The clip with its entrance and exit animations written out as keyframes on opacity, x, y and
|
|
1025
|
+
* scale, so previews, SVG frames and the ffmpeg export all play them the same way. A property the
|
|
1026
|
+
* clip already keys itself is left alone (`checkVideoProject` notes it). Returns the clip unchanged
|
|
1027
|
+
* when it has no animations.
|
|
1028
|
+
*/
|
|
1029
|
+
declare function videoClipAnimated(clip: VideoClip, project: Pick<VideoProject, 'width' | 'height'>): VideoClip;
|
|
1030
|
+
|
|
1031
|
+
/** Radius of an iris `progress` (0–1) open: from nothing to the frame's corners. */
|
|
1032
|
+
declare const videoIrisRadius: (frame: {
|
|
1033
|
+
width: number;
|
|
1034
|
+
height: number;
|
|
1035
|
+
}, progress: number) => number;
|
|
831
1036
|
/** The part of a rect a wipe shows. */
|
|
832
1037
|
declare function videoWipeRect(rect: VideoRect, wipe: NonNullable<VideoLayer['wipe']>): VideoRect;
|
|
833
1038
|
interface VideoSvgOptions {
|
|
@@ -849,8 +1054,10 @@ declare function videoContactSheetSvg(project: VideoProject, times: readonly num
|
|
|
849
1054
|
width?: number;
|
|
850
1055
|
}): string;
|
|
851
1056
|
/** The subset of `CanvasRenderingContext2D` `drawVideoFrame` uses (so tests and workers can pass their own). */
|
|
852
|
-
type VideoCanvasContext = Pick<CanvasRenderingContext2D, 'save' | 'restore' | 'fillRect' | 'drawImage' | 'translate' | 'rotate' | 'beginPath' | 'rect' | 'clip' | 'fillText' | 'measureText' | 'setTransform'> & {
|
|
1057
|
+
type VideoCanvasContext = Pick<CanvasRenderingContext2D, 'save' | 'restore' | 'fillRect' | 'drawImage' | 'translate' | 'rotate' | 'beginPath' | 'rect' | 'arc' | 'clip' | 'fillText' | 'measureText' | 'setTransform'> & {
|
|
853
1058
|
globalAlpha: number;
|
|
1059
|
+
globalCompositeOperation: GlobalCompositeOperation;
|
|
1060
|
+
filter?: string;
|
|
854
1061
|
fillStyle: string | CanvasGradient | CanvasPattern;
|
|
855
1062
|
font: string;
|
|
856
1063
|
textAlign: CanvasTextAlign;
|
|
@@ -862,9 +1069,13 @@ type VideoCanvasContext = Pick<CanvasRenderingContext2D, 'save' | 'restore' | 'f
|
|
|
862
1069
|
/**
|
|
863
1070
|
* Draws a frame on a 2D canvas scaled by `scale` (canvas pixels per frame pixel). `sourceFor`
|
|
864
1071
|
* returns what to draw for a media layer (a `<video>` seeked to `layer.sourceTime`, an `<img>`,
|
|
865
|
-
* an `ImageBitmap`…) or `null` for a placeholder box.
|
|
1072
|
+
* an `ImageBitmap`…) or `null` for a placeholder box. Grades become the context's `filter`; white
|
|
1073
|
+
* balance there refers to an SVG filter, which `options.defineSvgFilter` is given to put in the page
|
|
1074
|
+
* (without it, white balance is left out of the canvas).
|
|
866
1075
|
*/
|
|
867
|
-
declare function drawVideoFrame(ctx: VideoCanvasContext, frame: VideoFrame, sourceFor: (layer: VideoLayer) => CanvasImageSource | null, scale?: number
|
|
1076
|
+
declare function drawVideoFrame(ctx: VideoCanvasContext, frame: VideoFrame, sourceFor: (layer: VideoLayer) => CanvasImageSource | null, scale?: number, options?: {
|
|
1077
|
+
defineSvgFilter?: (id: string, markup: string) => void;
|
|
1078
|
+
}): void;
|
|
868
1079
|
|
|
869
1080
|
interface VideoEdlOptions {
|
|
870
1081
|
/** Track to export (default: the bottom video track, V1 in most NLEs). */
|
|
@@ -1014,6 +1225,11 @@ interface VideoPreviewOptions {
|
|
|
1014
1225
|
context?: VideoCanvasContext | null;
|
|
1015
1226
|
/** Called after each frame is drawn. */
|
|
1016
1227
|
onFrame?: (frame: VideoFrame) => void;
|
|
1228
|
+
/**
|
|
1229
|
+
* Puts an SVG filter (white balance in a grade) where the canvas's `filter: url(#id)` can find
|
|
1230
|
+
* it. Default: a hidden `<svg>` added to `document.body`. `null` leaves white balance out.
|
|
1231
|
+
*/
|
|
1232
|
+
defineSvgFilter?: ((id: string, markup: string) => void) | null;
|
|
1017
1233
|
}
|
|
1018
1234
|
/**
|
|
1019
1235
|
* Plays a project in the browser: keeps one `<video>` or `<audio>` element per playing clip in step
|
|
@@ -1031,6 +1247,8 @@ declare class VideoPreviewEngine {
|
|
|
1031
1247
|
private readonly unsubscribe;
|
|
1032
1248
|
private scheduled;
|
|
1033
1249
|
private destroyed;
|
|
1250
|
+
private filterHost;
|
|
1251
|
+
private readonly filters;
|
|
1034
1252
|
constructor(source: VideoPreviewSource, canvas: {
|
|
1035
1253
|
width: number;
|
|
1036
1254
|
height: number;
|
|
@@ -1046,6 +1264,7 @@ declare class VideoPreviewEngine {
|
|
|
1046
1264
|
private redraw;
|
|
1047
1265
|
private sourceFor;
|
|
1048
1266
|
private draw;
|
|
1267
|
+
private readonly defineSvgFilter;
|
|
1049
1268
|
/** Stops following the editor and releases every media element. */
|
|
1050
1269
|
destroy(): void;
|
|
1051
1270
|
}
|
|
@@ -1230,6 +1449,10 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1230
1449
|
opacity?: VideoAnimatable;
|
|
1231
1450
|
transform?: VideoTransform;
|
|
1232
1451
|
fit?: VideoFit;
|
|
1452
|
+
blend?: VideoBlendMode;
|
|
1453
|
+
grade?: VideoGrade;
|
|
1454
|
+
animateIn?: VideoClipAnimation;
|
|
1455
|
+
animateOut?: VideoClipAnimation;
|
|
1233
1456
|
fadeIn?: number;
|
|
1234
1457
|
fadeOut?: number;
|
|
1235
1458
|
transition?: VideoTransition;
|
|
@@ -1253,6 +1476,10 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1253
1476
|
opacity?: VideoAnimatable;
|
|
1254
1477
|
transform?: VideoTransform;
|
|
1255
1478
|
fit?: VideoFit;
|
|
1479
|
+
blend?: VideoBlendMode;
|
|
1480
|
+
grade?: VideoGrade;
|
|
1481
|
+
animateIn?: VideoClipAnimation;
|
|
1482
|
+
animateOut?: VideoClipAnimation;
|
|
1256
1483
|
fadeIn?: number;
|
|
1257
1484
|
fadeOut?: number;
|
|
1258
1485
|
transition?: VideoTransition;
|
|
@@ -1271,6 +1498,10 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1271
1498
|
opacity?: VideoAnimatable;
|
|
1272
1499
|
transform?: VideoTransform;
|
|
1273
1500
|
fit?: VideoFit;
|
|
1501
|
+
blend?: VideoBlendMode;
|
|
1502
|
+
grade?: VideoGrade;
|
|
1503
|
+
animateIn?: VideoClipAnimation;
|
|
1504
|
+
animateOut?: VideoClipAnimation;
|
|
1274
1505
|
fadeIn?: number;
|
|
1275
1506
|
fadeOut?: number;
|
|
1276
1507
|
transition?: VideoTransition;
|
|
@@ -1319,6 +1550,14 @@ declare function videoRulerTicks(duration: number, pxPerSecond: number, fps: num
|
|
|
1319
1550
|
type VideoWaveformMode = 'audio' | 'all' | 'none';
|
|
1320
1551
|
/** Whether a timeline in `mode` draws a waveform in this clip. */
|
|
1321
1552
|
declare function videoClipShowsWaveform(clip: VideoClip, asset: VideoAsset | undefined, mode?: VideoWaveformMode): asset is VideoAsset;
|
|
1553
|
+
/** Names for the entrance and exit animations, for menus. */
|
|
1554
|
+
declare const VIDEO_CLIP_ANIMATION_LABELS: Readonly<Record<VideoClipAnimationEffect, string>>;
|
|
1555
|
+
/** Names for the transitions, for menus. */
|
|
1556
|
+
declare const VIDEO_TRANSITION_LABELS: Readonly<Record<VideoTransitionType, string>>;
|
|
1557
|
+
/** Whether a transition type takes a `direction`. */
|
|
1558
|
+
declare const videoTransitionHasDirection: (type: VideoTransitionType) => boolean;
|
|
1559
|
+
/** Names for the blend modes, for menus. */
|
|
1560
|
+
declare const VIDEO_BLEND_MODE_LABELS: Readonly<Record<VideoBlendMode, string>>;
|
|
1322
1561
|
/** Names for the sound fade curves, for menus. */
|
|
1323
1562
|
declare const VIDEO_FADE_CURVE_LABELS: Readonly<Record<VideoFadeCurve, string>>;
|
|
1324
1563
|
declare function videoClipTint(clip: VideoClip, asset?: VideoAsset): string;
|
|
@@ -1416,4 +1655,4 @@ declare function videoKeyframeValueEdit(project: VideoProject, clipId: string, p
|
|
|
1416
1655
|
*/
|
|
1417
1656
|
declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string, property: VideoKeyframeProperty, time: number): VideoEdit | null;
|
|
1418
1657
|
|
|
1419
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoCanvasContext, type VideoClip, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, buildVideoAudioPeaks, checkVideoProject, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, nextFreeVideoSlot, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoHourFrames, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTimecodeFrames, videoTitleFrame, videoTrackSyncLocked, videoTransformAt, videoValueAt, videoWaveformPath, videoWipeRect };
|
|
1658
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODES, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_EFFECTS, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_LABELS, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoBlendMode, type VideoCanvasContext, type VideoClip, type VideoClipAnimation, type VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoGrade, type VideoGradeControl, type VideoGradePreset, type VideoGradeStep, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, applyVideoGrade, buildVideoAudioPeaks, checkVideoProject, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, nextFreeVideoSlot, normalizeVideoGrade, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoClipAnimation, parseVideoGrade, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTimecodeFrames, videoTitleFrame, videoTrackSyncLocked, videoTransformAt, videoTransitionAudioCurve, videoTransitionEase, videoTransitionHasDirection, videoValueAt, videoWaveformPath, videoWipeRect };
|