Edit commands

Every edit the window can make, as a JSON object you send through edit.apply.

{
  "method": "edit.apply",
  "path": "/edits/Reel",
  "command": {
    "op": "trimClip",
    "clipId": "c2",
    "edge": "end",
    "delta": -1.5
  }
}

A command is {"op": "<name>", …fields}. Fields are camelCase. The reply is an EditorView of the project after the edit; createdId names what the command made, if anything.

Media

Placing clips

Moving and cutting

Changing a clip

Tracks

Timelines

Templates and fonts

Grouping

Rules that apply to every command

  • Ids. Clips are c…, tracks t… (the first timeline's starter lanes are T1–T4), timelines tl… (the first is TL1), media m…. Ids come from the EditorView replies.
  • Unknown ids are usually a tolerated no-op: the request succeeds, nothing changes, no undo step. Where a command errs instead, its entry says so.
  • Times are seconds on the timeline. A start below 0 lands at 0.
  • Numbers are clamped, not refused, into the range each field states. A NaN or infinite number is refused: "A number in that edit is not finite."
  • A refusal is a refused error whose message is the exact sentence the window would show. The project is as it was.
  • Commands act on the active timeline, except where the entry says "all timelines".

Refusal sentences

SentenceRaised by
That media is no longer in the bin.a clip-placing command whose media is gone
That track no longer exists.a clip-placing command whose track is gone
There are no tracks.first-free placement on a timeline with no tracks
A timeline needs at least one track.removeTrack on the last track
A project needs at least one timeline.removeTimeline on the last timeline
That template slot no longer exists.fillSlot with an unknown id
That media is not a template slot.fillSlot on ordinary media
A number in that edit is not finite.any command carrying NaN or infinity
(one of several sentences)mergeClips, saying why the pieces cannot be rejoined