setCaptionSettings
Turn captions on or off and adjust their look, placement, line limits, translation language, and whether they use recording or voiceover audio, changing only passed fields.
Instructions
Turn the captions on or off, and set how they look and where they sit, as the editor's Captions pane does. Only the fields you pass change. style applies a named look first (font, weight, size, colour and plate together); plate then picks what is behind the text (none, dark, light) and recolours text that would vanish on it; any other field you pass wins over both. fontSize is px at a 1080-high frame (16–140), color a #rrggbb hex, plateOpacity 0.4–0.9. anchorV pins the caption block to the bottom or top edge, and insetY is its distance from that edge in % of the frame height (0–50); anchorH pins it left, centre or right, and insetX (0–25 % of the frame width) is ignored when it is centred. minWordsPerLine and maxWordsPerLine (1–12) bound how many words show at once. lane picks whose speech is captioned: the recording's, or the voiceover tracks' (it falls back to the recording when there is none, and resolvedLane says so). language shows a translation layer written with putCaptionTranslation; null shows the transcript's own words. Captions are drawn from the transcript, so they need one; enabled captions are burnt into the export.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lane | No | ||
| color | No | ||
| plate | No | ||
| style | No | ||
| insetX | No | ||
| insetY | No | ||
| anchorH | No | ||
| anchorV | No | ||
| enabled | No | ||
| fontSize | No | ||
| language | No | ||
| projectId | No | The project to act on, from listProjects. Omit it only for the project open in the OpenScreen editor, which works only while the app runs. | |
| fontFamily | No | ||
| fontWeight | No | ||
| plateOpacity | No | ||
| maxWordsPerLine | No | ||
| minWordsPerLine | No |