@pixerate/editor 0.79.0 → 0.80.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.
|
@@ -120,6 +120,11 @@ interface VideoTrack {
|
|
|
120
120
|
hidden?: boolean;
|
|
121
121
|
/** Refuses edits to the track's clips. */
|
|
122
122
|
locked?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Moves with ripple edits made on other sync-locked tracks, so it stays in sync (default true).
|
|
125
|
+
* Turn it off for a track that should stay put while the others ripple (e.g. a music bed).
|
|
126
|
+
*/
|
|
127
|
+
syncLocked?: boolean;
|
|
123
128
|
/** Gain applied to every clip on the track (1 = unchanged, default 1). */
|
|
124
129
|
volume?: number;
|
|
125
130
|
clips: VideoClip[];
|
|
@@ -209,6 +214,13 @@ interface VideoColorClip extends VideoClipBase {
|
|
|
209
214
|
}
|
|
210
215
|
type VideoClip = VideoMediaClip | VideoTextClip | VideoColorClip;
|
|
211
216
|
type VideoClipType = VideoClip['type'];
|
|
217
|
+
/**
|
|
218
|
+
* How a clip is placed where others already are: `refuse` an overlap (the default), `overwrite`
|
|
219
|
+
* what is underneath (cutting, trimming or removing it), or `insert` (cut everything across the
|
|
220
|
+
* point and push later material along on every sync-locked track).
|
|
221
|
+
*/
|
|
222
|
+
type VideoPlacementMode = 'refuse' | 'overwrite' | 'insert';
|
|
223
|
+
declare const VIDEO_PLACEMENT_MODES: readonly ["refuse", "overwrite", "insert"];
|
|
212
224
|
declare const VIDEO_CLIP_TYPES: readonly ["media", "text", "color"];
|
|
213
225
|
interface VideoMarker {
|
|
214
226
|
id: string;
|
|
@@ -275,6 +287,8 @@ declare function createVideoProject(options?: CreateVideoProjectOptions): VideoP
|
|
|
275
287
|
/** Clip edges closer than this (ms) count as touching: a cut, not a gap. */
|
|
276
288
|
declare const VIDEO_TIME_EPSILON = 0.5;
|
|
277
289
|
declare const videoClipEnd: (clip: VideoClip) => number;
|
|
290
|
+
/** Whether a track moves with ripple edits on other tracks (`syncLocked`, default true). */
|
|
291
|
+
declare const videoTrackSyncLocked: (track: VideoTrack) => boolean;
|
|
278
292
|
/** Playback speed of a clip (1 for titles and colours). */
|
|
279
293
|
declare const videoClipSpeed: (clip: VideoClip) => number;
|
|
280
294
|
/** The stretch of source a media clip plays (ms), or `null` for titles and colours. */
|
|
@@ -397,6 +411,7 @@ type TrackFields = {
|
|
|
397
411
|
muted?: boolean;
|
|
398
412
|
hidden?: boolean;
|
|
399
413
|
locked?: boolean;
|
|
414
|
+
syncLocked?: boolean;
|
|
400
415
|
volume?: number;
|
|
401
416
|
};
|
|
402
417
|
/** A clip to add: `id` and `start` are optional (default: a fresh id, the end of the track). */
|
|
@@ -448,12 +463,14 @@ type VideoEdit = ({
|
|
|
448
463
|
op: 'add_clip';
|
|
449
464
|
track: string;
|
|
450
465
|
clip: NewVideoClip;
|
|
466
|
+
mode?: VideoPlacementMode;
|
|
451
467
|
ripple?: boolean;
|
|
452
468
|
} | {
|
|
453
469
|
op: 'move_clip';
|
|
454
470
|
clip: string;
|
|
455
471
|
start?: number;
|
|
456
472
|
track?: string;
|
|
473
|
+
mode?: VideoPlacementMode;
|
|
457
474
|
} | {
|
|
458
475
|
op: 'trim_clip';
|
|
459
476
|
clip: string;
|
|
@@ -478,6 +495,33 @@ type VideoEdit = ({
|
|
|
478
495
|
op: 'set_transition';
|
|
479
496
|
clip: string;
|
|
480
497
|
transition: VideoTransition | null;
|
|
498
|
+
} | {
|
|
499
|
+
op: 'slip_clip';
|
|
500
|
+
clip: string;
|
|
501
|
+
delta: number;
|
|
502
|
+
} | {
|
|
503
|
+
op: 'roll_edit';
|
|
504
|
+
left: string;
|
|
505
|
+
right: string;
|
|
506
|
+
delta: number;
|
|
507
|
+
} | {
|
|
508
|
+
op: 'slide_clip';
|
|
509
|
+
clip: string;
|
|
510
|
+
delta: number;
|
|
511
|
+
} | {
|
|
512
|
+
op: 'lift_range';
|
|
513
|
+
from: number;
|
|
514
|
+
to: number;
|
|
515
|
+
tracks?: string[];
|
|
516
|
+
} | {
|
|
517
|
+
op: 'extract_range';
|
|
518
|
+
from: number;
|
|
519
|
+
to: number;
|
|
520
|
+
tracks?: string[];
|
|
521
|
+
} | {
|
|
522
|
+
op: 'split_at';
|
|
523
|
+
at: number;
|
|
524
|
+
tracks?: string[];
|
|
481
525
|
}
|
|
482
526
|
/** Keys for one property (in any order; clip-relative ms), or null to stop animating it and keep its value at the clip's start. */
|
|
483
527
|
| {
|
|
@@ -516,6 +560,16 @@ interface VideoEditOutcome {
|
|
|
516
560
|
track?: string;
|
|
517
561
|
asset?: string;
|
|
518
562
|
marker?: string;
|
|
563
|
+
/** Clips the op made by cutting others (the right-hand parts). */
|
|
564
|
+
created?: string[];
|
|
565
|
+
/** Clips it deleted to make room (overwrite, lift, extract). */
|
|
566
|
+
removed?: string[];
|
|
567
|
+
/** Clips it shortened to make room. */
|
|
568
|
+
trimmed?: string[];
|
|
569
|
+
/** Tracks a ripple moved (the edited ones and every sync-locked one with them). */
|
|
570
|
+
rippled?: string[];
|
|
571
|
+
/** For slip, roll and slide: how far it actually moved (ms), after clamping to what the media allows. */
|
|
572
|
+
delta?: number;
|
|
519
573
|
}
|
|
520
574
|
type VideoEditResult = {
|
|
521
575
|
ok: true;
|
|
@@ -1023,6 +1077,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1023
1077
|
transition?: VideoTransition;
|
|
1024
1078
|
})[];
|
|
1025
1079
|
volume?: number | undefined;
|
|
1080
|
+
syncLocked?: boolean | undefined;
|
|
1026
1081
|
locked?: boolean | undefined;
|
|
1027
1082
|
hidden?: boolean | undefined;
|
|
1028
1083
|
muted?: boolean | undefined;
|
|
@@ -1042,8 +1097,9 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1042
1097
|
/**
|
|
1043
1098
|
* Agent tools for a `VideoEditorController`: read the project (assets, tracks with clips and their
|
|
1044
1099
|
* times, gaps, what plays at a moment), check it, render frames, export to ffmpeg or an EDL, and
|
|
1045
|
-
* edit it a step at a time (add assets and tracks, add / move / trim / split / delete clips
|
|
1046
|
-
*
|
|
1100
|
+
* edit it a step at a time (add assets and tracks, add / move / trim / split / delete clips with
|
|
1101
|
+
* overwrite, insert and sync-locked ripple, slip / roll / slide, lift / extract a range, cut across
|
|
1102
|
+
* tracks, transitions, markers). Every write is checked first (unknown ids with "did you mean", overlaps,
|
|
1047
1103
|
* trims past the source, locked tracks), applies as one undo step, and returns what it made and
|
|
1048
1104
|
* the resulting length and issues. Write tools are hidden while the project is read-only.
|
|
1049
1105
|
*/
|
|
@@ -1073,6 +1129,11 @@ interface VideoClipDragInput {
|
|
|
1073
1129
|
track?: string;
|
|
1074
1130
|
/** Push later clips along instead of refusing overlaps (trims) — hold a modifier for it. */
|
|
1075
1131
|
ripple?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* For move: what to do with clips where it lands (default refuse). The timelines use Alt for
|
|
1134
|
+
* insert and Shift for overwrite.
|
|
1135
|
+
*/
|
|
1136
|
+
placement?: VideoPlacementMode;
|
|
1076
1137
|
/** Snaps a time (e.g. `controller.snap(t, { exclude: [clip] }).time`); default: none. */
|
|
1077
1138
|
snap?: (time: number) => number;
|
|
1078
1139
|
}
|
|
@@ -1093,11 +1154,14 @@ interface VideoClipDragPlan {
|
|
|
1093
1154
|
declare function planVideoClipDrag(project: VideoProject, input: VideoClipDragInput): VideoClipDragPlan | null;
|
|
1094
1155
|
/** Tracks a clip may be dragged onto: the same kind as its own, unlocked. */
|
|
1095
1156
|
declare function videoDropTracks(project: VideoProject, clipId: string): string[];
|
|
1157
|
+
/** The label for the undo step a drag makes. */
|
|
1158
|
+
declare function videoDragLabel(edit: VideoEdit): string;
|
|
1096
1159
|
/** The edit that adds an asset as a clip where the person dropped it (or at the end of the first fitting track). */
|
|
1097
1160
|
declare function videoAssetDropEdit(project: VideoProject, assetId: string, options?: {
|
|
1098
1161
|
track?: string;
|
|
1099
1162
|
start?: number;
|
|
1100
1163
|
ripple?: boolean;
|
|
1164
|
+
mode?: VideoPlacementMode;
|
|
1101
1165
|
}): VideoEdit | null;
|
|
1102
1166
|
/** What `probeVideoMedia` found out about a file. */
|
|
1103
1167
|
interface VideoMediaProbe {
|
|
@@ -1147,4 +1211,4 @@ declare function videoKeyframeValueEdit(project: VideoProject, clipId: string, p
|
|
|
1147
1211
|
*/
|
|
1148
1212
|
declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string, property: VideoKeyframeProperty, time: number): VideoEdit | null;
|
|
1149
1213
|
|
|
1150
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FITS, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, 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 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 VideoMarker, type VideoMediaClip, type VideoMediaProbe, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, checkVideoProject, createVideoEditorToolProvider, createVideoProject, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, isVideoKeyframes, nextFreeVideoSlot, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoKeyframes, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, videoAssetDropEdit, videoAssetKindOf, videoAssetMap, videoClipAfter, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipsAt, videoContactSheetSvg, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTitleFrame, videoTransformAt, videoValueAt, videoWipeRect };
|
|
1214
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FITS, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, 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 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 VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, checkVideoProject, createVideoEditorToolProvider, createVideoProject, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, isVideoKeyframes, nextFreeVideoSlot, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoKeyframes, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, videoAssetDropEdit, videoAssetKindOf, videoAssetMap, videoClipAfter, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTitleFrame, videoTrackSyncLocked, videoTransformAt, videoValueAt, videoWipeRect };
|
|
@@ -120,6 +120,11 @@ interface VideoTrack {
|
|
|
120
120
|
hidden?: boolean;
|
|
121
121
|
/** Refuses edits to the track's clips. */
|
|
122
122
|
locked?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Moves with ripple edits made on other sync-locked tracks, so it stays in sync (default true).
|
|
125
|
+
* Turn it off for a track that should stay put while the others ripple (e.g. a music bed).
|
|
126
|
+
*/
|
|
127
|
+
syncLocked?: boolean;
|
|
123
128
|
/** Gain applied to every clip on the track (1 = unchanged, default 1). */
|
|
124
129
|
volume?: number;
|
|
125
130
|
clips: VideoClip[];
|
|
@@ -209,6 +214,13 @@ interface VideoColorClip extends VideoClipBase {
|
|
|
209
214
|
}
|
|
210
215
|
type VideoClip = VideoMediaClip | VideoTextClip | VideoColorClip;
|
|
211
216
|
type VideoClipType = VideoClip['type'];
|
|
217
|
+
/**
|
|
218
|
+
* How a clip is placed where others already are: `refuse` an overlap (the default), `overwrite`
|
|
219
|
+
* what is underneath (cutting, trimming or removing it), or `insert` (cut everything across the
|
|
220
|
+
* point and push later material along on every sync-locked track).
|
|
221
|
+
*/
|
|
222
|
+
type VideoPlacementMode = 'refuse' | 'overwrite' | 'insert';
|
|
223
|
+
declare const VIDEO_PLACEMENT_MODES: readonly ["refuse", "overwrite", "insert"];
|
|
212
224
|
declare const VIDEO_CLIP_TYPES: readonly ["media", "text", "color"];
|
|
213
225
|
interface VideoMarker {
|
|
214
226
|
id: string;
|
|
@@ -275,6 +287,8 @@ declare function createVideoProject(options?: CreateVideoProjectOptions): VideoP
|
|
|
275
287
|
/** Clip edges closer than this (ms) count as touching: a cut, not a gap. */
|
|
276
288
|
declare const VIDEO_TIME_EPSILON = 0.5;
|
|
277
289
|
declare const videoClipEnd: (clip: VideoClip) => number;
|
|
290
|
+
/** Whether a track moves with ripple edits on other tracks (`syncLocked`, default true). */
|
|
291
|
+
declare const videoTrackSyncLocked: (track: VideoTrack) => boolean;
|
|
278
292
|
/** Playback speed of a clip (1 for titles and colours). */
|
|
279
293
|
declare const videoClipSpeed: (clip: VideoClip) => number;
|
|
280
294
|
/** The stretch of source a media clip plays (ms), or `null` for titles and colours. */
|
|
@@ -397,6 +411,7 @@ type TrackFields = {
|
|
|
397
411
|
muted?: boolean;
|
|
398
412
|
hidden?: boolean;
|
|
399
413
|
locked?: boolean;
|
|
414
|
+
syncLocked?: boolean;
|
|
400
415
|
volume?: number;
|
|
401
416
|
};
|
|
402
417
|
/** A clip to add: `id` and `start` are optional (default: a fresh id, the end of the track). */
|
|
@@ -448,12 +463,14 @@ type VideoEdit = ({
|
|
|
448
463
|
op: 'add_clip';
|
|
449
464
|
track: string;
|
|
450
465
|
clip: NewVideoClip;
|
|
466
|
+
mode?: VideoPlacementMode;
|
|
451
467
|
ripple?: boolean;
|
|
452
468
|
} | {
|
|
453
469
|
op: 'move_clip';
|
|
454
470
|
clip: string;
|
|
455
471
|
start?: number;
|
|
456
472
|
track?: string;
|
|
473
|
+
mode?: VideoPlacementMode;
|
|
457
474
|
} | {
|
|
458
475
|
op: 'trim_clip';
|
|
459
476
|
clip: string;
|
|
@@ -478,6 +495,33 @@ type VideoEdit = ({
|
|
|
478
495
|
op: 'set_transition';
|
|
479
496
|
clip: string;
|
|
480
497
|
transition: VideoTransition | null;
|
|
498
|
+
} | {
|
|
499
|
+
op: 'slip_clip';
|
|
500
|
+
clip: string;
|
|
501
|
+
delta: number;
|
|
502
|
+
} | {
|
|
503
|
+
op: 'roll_edit';
|
|
504
|
+
left: string;
|
|
505
|
+
right: string;
|
|
506
|
+
delta: number;
|
|
507
|
+
} | {
|
|
508
|
+
op: 'slide_clip';
|
|
509
|
+
clip: string;
|
|
510
|
+
delta: number;
|
|
511
|
+
} | {
|
|
512
|
+
op: 'lift_range';
|
|
513
|
+
from: number;
|
|
514
|
+
to: number;
|
|
515
|
+
tracks?: string[];
|
|
516
|
+
} | {
|
|
517
|
+
op: 'extract_range';
|
|
518
|
+
from: number;
|
|
519
|
+
to: number;
|
|
520
|
+
tracks?: string[];
|
|
521
|
+
} | {
|
|
522
|
+
op: 'split_at';
|
|
523
|
+
at: number;
|
|
524
|
+
tracks?: string[];
|
|
481
525
|
}
|
|
482
526
|
/** Keys for one property (in any order; clip-relative ms), or null to stop animating it and keep its value at the clip's start. */
|
|
483
527
|
| {
|
|
@@ -516,6 +560,16 @@ interface VideoEditOutcome {
|
|
|
516
560
|
track?: string;
|
|
517
561
|
asset?: string;
|
|
518
562
|
marker?: string;
|
|
563
|
+
/** Clips the op made by cutting others (the right-hand parts). */
|
|
564
|
+
created?: string[];
|
|
565
|
+
/** Clips it deleted to make room (overwrite, lift, extract). */
|
|
566
|
+
removed?: string[];
|
|
567
|
+
/** Clips it shortened to make room. */
|
|
568
|
+
trimmed?: string[];
|
|
569
|
+
/** Tracks a ripple moved (the edited ones and every sync-locked one with them). */
|
|
570
|
+
rippled?: string[];
|
|
571
|
+
/** For slip, roll and slide: how far it actually moved (ms), after clamping to what the media allows. */
|
|
572
|
+
delta?: number;
|
|
519
573
|
}
|
|
520
574
|
type VideoEditResult = {
|
|
521
575
|
ok: true;
|
|
@@ -1023,6 +1077,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1023
1077
|
transition?: VideoTransition;
|
|
1024
1078
|
})[];
|
|
1025
1079
|
volume?: number | undefined;
|
|
1080
|
+
syncLocked?: boolean | undefined;
|
|
1026
1081
|
locked?: boolean | undefined;
|
|
1027
1082
|
hidden?: boolean | undefined;
|
|
1028
1083
|
muted?: boolean | undefined;
|
|
@@ -1042,8 +1097,9 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1042
1097
|
/**
|
|
1043
1098
|
* Agent tools for a `VideoEditorController`: read the project (assets, tracks with clips and their
|
|
1044
1099
|
* times, gaps, what plays at a moment), check it, render frames, export to ffmpeg or an EDL, and
|
|
1045
|
-
* edit it a step at a time (add assets and tracks, add / move / trim / split / delete clips
|
|
1046
|
-
*
|
|
1100
|
+
* edit it a step at a time (add assets and tracks, add / move / trim / split / delete clips with
|
|
1101
|
+
* overwrite, insert and sync-locked ripple, slip / roll / slide, lift / extract a range, cut across
|
|
1102
|
+
* tracks, transitions, markers). Every write is checked first (unknown ids with "did you mean", overlaps,
|
|
1047
1103
|
* trims past the source, locked tracks), applies as one undo step, and returns what it made and
|
|
1048
1104
|
* the resulting length and issues. Write tools are hidden while the project is read-only.
|
|
1049
1105
|
*/
|
|
@@ -1073,6 +1129,11 @@ interface VideoClipDragInput {
|
|
|
1073
1129
|
track?: string;
|
|
1074
1130
|
/** Push later clips along instead of refusing overlaps (trims) — hold a modifier for it. */
|
|
1075
1131
|
ripple?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* For move: what to do with clips where it lands (default refuse). The timelines use Alt for
|
|
1134
|
+
* insert and Shift for overwrite.
|
|
1135
|
+
*/
|
|
1136
|
+
placement?: VideoPlacementMode;
|
|
1076
1137
|
/** Snaps a time (e.g. `controller.snap(t, { exclude: [clip] }).time`); default: none. */
|
|
1077
1138
|
snap?: (time: number) => number;
|
|
1078
1139
|
}
|
|
@@ -1093,11 +1154,14 @@ interface VideoClipDragPlan {
|
|
|
1093
1154
|
declare function planVideoClipDrag(project: VideoProject, input: VideoClipDragInput): VideoClipDragPlan | null;
|
|
1094
1155
|
/** Tracks a clip may be dragged onto: the same kind as its own, unlocked. */
|
|
1095
1156
|
declare function videoDropTracks(project: VideoProject, clipId: string): string[];
|
|
1157
|
+
/** The label for the undo step a drag makes. */
|
|
1158
|
+
declare function videoDragLabel(edit: VideoEdit): string;
|
|
1096
1159
|
/** The edit that adds an asset as a clip where the person dropped it (or at the end of the first fitting track). */
|
|
1097
1160
|
declare function videoAssetDropEdit(project: VideoProject, assetId: string, options?: {
|
|
1098
1161
|
track?: string;
|
|
1099
1162
|
start?: number;
|
|
1100
1163
|
ripple?: boolean;
|
|
1164
|
+
mode?: VideoPlacementMode;
|
|
1101
1165
|
}): VideoEdit | null;
|
|
1102
1166
|
/** What `probeVideoMedia` found out about a file. */
|
|
1103
1167
|
interface VideoMediaProbe {
|
|
@@ -1147,4 +1211,4 @@ declare function videoKeyframeValueEdit(project: VideoProject, clipId: string, p
|
|
|
1147
1211
|
*/
|
|
1148
1212
|
declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string, property: VideoKeyframeProperty, time: number): VideoEdit | null;
|
|
1149
1213
|
|
|
1150
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FITS, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, 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 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 VideoMarker, type VideoMediaClip, type VideoMediaProbe, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, checkVideoProject, createVideoEditorToolProvider, createVideoProject, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, isVideoKeyframes, nextFreeVideoSlot, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoKeyframes, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, videoAssetDropEdit, videoAssetKindOf, videoAssetMap, videoClipAfter, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipsAt, videoContactSheetSvg, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTitleFrame, videoTransformAt, videoValueAt, videoWipeRect };
|
|
1214
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FITS, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, 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 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 VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTrack, type VideoTrackKind, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, checkVideoProject, createVideoEditorToolProvider, createVideoProject, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoClip, findVideoGaps, formatVideoSeconds, formatVideoTimecode, isVideoKeyframes, nextFreeVideoSlot, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoKeyframes, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, videoAssetDropEdit, videoAssetKindOf, videoAssetMap, videoClipAfter, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoProjectDuration, videoProjectSvg, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTitleFrame, videoTrackSyncLocked, videoTransformAt, videoValueAt, videoWipeRect };
|