Skip to content
Changelog

editor.clip.trim

Trims a clip's start or end to a moment on the timeline.

JSON-RPC 2.0project.write

Parameters

  • clipstringrequiredThe clip's id, from editor.timeline.get.
  • start_msnumberWhere it starts.
  • end_msnumberWhere it ends.
  • canvasstringA canvas's id or name, shown first. Default: the canvas shown.

Result

  • (the clip){ id: string, name: string, track: number, start_ms: number, end_ms: number, in_ms: number, out_ms: number, speed: number, volume: number, muted: boolean, media: string | null, text: string | null }The clip as editor.timeline.get lists it.

Errors

Invalid params (-32602) without either. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it. Invalid params (-32602) for a clip id that can't be read; not found (-32004) for a clip that isn't on the canvas.

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_clip (action: trim) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.clip.trim",
"params": {}
}

editor.clip.split · editor.clip.move