Cue properties
Everything a script reaches through this, by cue type. Each property is
this.<name>.get(), and this.<name>.set(value) when it is writable — a
read-only property has no set at all.
Writes are live: they change the cue that is playing, never the saved show. Editing the same field in the inspector while the cue is on air overwrites what the script set, because the engine then pushes the stored value back onto it.
Every cue type
| Property | Access | Type | Meaning |
|---|---|---|---|
duration | get | number | null | Length in seconds. null when the cue never ends on its own. |
level | get / set | number | Playback level, 0 to 1 — volume for a sound, opacity for a picture. Setting it is a fade of no length, the same path the inspector’s slider takes. Only on the types marked below. |
level is there for: audio, image, video, text, html, youtube, webcam,
visio, screen. The control and group cues have no level of their own.
audio
| Property | Access | Type | Meaning |
|---|---|---|---|
pan | get | number | Stereo position, -1 left to 1 right. Read-only: the pan node is built into the audio graph when the cue starts. |
Plus duration and level.
function onTick() {
// Duck to a quarter after ten seconds.
if (time > 10) this.level.set(0.25);
}
image
| Property | Access | Type | Meaning |
|---|---|---|---|
tint | get / set | string | null | Colour laid over the picture; null for none |
brightness | get / set | number | 1 = untouched |
contrast | get / set | number | 1 = untouched |
saturation | get / set | number | 1 = untouched, 0 = greyscale |
mirrorX | get / set | boolean | Flip horizontally |
mirrorY | get / set | boolean | Flip vertically |
Plus duration and level.
video
The same six as image, plus:
| Property | Access | Type | Meaning |
|---|---|---|---|
audioLevel | get / set | number | Volume of the video’s own sound, 0 to 1 |
Plus duration and level.
text
| Property | Access | Type | Meaning |
|---|---|---|---|
text | get / set | string | The words on screen |
fontFamily | get / set | string | null | Font family name; null for the default |
fontSize | get / set | number | Size in pixels at the output’s own resolution |
textColor | get / set | string | Any CSS colour |
align | get / set | string | left, center or right |
valign | get / set | string | top, middle or bottom |
offsetX | get / set | number | Horizontal offset, as a fraction of the output width |
offsetY | get / set | number | Vertical offset, as a fraction of the output height |
tint | get / set | string | null | Colour laid over the text |
brightness | get / set | number | 1 = untouched |
contrast | get / set | number | 1 = untouched |
saturation | get / set | number | 1 = untouched |
Plus duration and level.
const names = ['ANNA', 'BERT', 'CLARE'];
function onStart() {
every({ interval: 2, delay: 0 }, function (index) {
this.text.set(names[index % names.length]);
});
}
html
| Property | Access | Type | Meaning |
|---|---|---|---|
tint | get / set | string | null | Colour laid over the page |
brightness | get / set | number | 1 = untouched |
contrast | get / set | number | 1 = untouched |
saturation | get / set | number | 1 = untouched |
audioLevel | get / set | number | Volume of the page’s sound, 0 to 1 |
Plus duration and level.
visio and screen
| Property | Access | Type | Meaning |
|---|---|---|---|
tint | get / set | string | null | Colour laid over the picture |
brightness | get / set | number | 1 = untouched |
contrast | get / set | number | 1 = untouched |
saturation | get / set | number | 1 = untouched |
audioLevel | get / set | number | Volume of the guest’s microphone, 0 to 1 |
Plus duration and level.
webcam
| Property | Access | Type | Meaning |
|---|---|---|---|
audioLevel | get / set | number | Volume of the camera’s microphone, 0 to 1 |
Plus duration and level. A camera feed is not colour-corrected, so it has
no tint / brightness / contrast / saturation.
youtube
| Property | Access | Type | Meaning |
|---|---|---|---|
audioLevel | get / set | number | Volume of the video, 0 to 1 |
Plus duration and level. The picture lives in a cross-origin iframe that
cannot be filtered, so there are no colour properties.
playlist
| Property | Access | Type | Meaning |
|---|---|---|---|
index | get | number | Item playing, counting from 1; 0 between items |
count | get | number | How many items the playlist plays in a pass |
pass | get | number | Pass in flight, counting from 1 |
Plus duration. Read-only: which item plays is the playlist’s own business.
function onTick() {
if (this.index.get() === this.count.get()) {
log.info('last item of pass', this.pass.get());
}
}
Everything else
multilaunch, fade, fadeall, start, stop, stopall,
loadshow, osc, midi, mqtt and http expose duration and
nothing more. The message cues are fire-and-forget: by the time a script could
touch a field, the message has been sent.
Not exposed, on purpose
inputRect(the source sub-rect of a visual cue) is an object rather than a single value, and handing scripts a shape means committing to it.- Anything the inspector stores but playback cannot change mid-run — a cue’s file, its output routing, its loop settings. Changing those means restarting the cue, which a script can already ask for by other means.
Adding one
Properties come from two passes, in src/lib/engine-v2/scriptable-properties.ts:
baseScriptableProperties— what any cue has (duration, andlevelwhen the runner reports one).- the cue’s runner, through
getScriptableProperties(cue, ctx), for what only that type knows about. A runner that returns a name the base pass already used replaces it.
A property declares a name, a one-line description (which is what the
editor shows beside it), a read(running, ctx), and optionally a
write(running, ctx, value). Leave write out and the property is read-only
everywhere, including in the editor’s proposals.