events.subscribe
Chooses which events this connection gets; without a list, every event.
Events arrive as notifications: {"jsonrpc": "2.0", "method": "event", "params": {"name", "data"}}.
- scene.program {id, name}, scene.list {scenes}
- record.state {active, paused, path, started_at, elapsed_ms}, stream.state {active, started_at, destinations}, vcam.state {active}
- output.changed: one output's kind (stream, record, clips, vcam), id, name and its state as output.list gives it
- canvas.changed {id, change, name, width, height} (added, removed, renamed, resized)
- clip.saved {path, id, duration_ms, formats, thumbnail}
- audio.mute, audio.volume, object.visible, workspace.changed
- source.tally (a Phone camera layer's source, program, staged, live)
- panic.state, deck.changed
- editor.changed {project, canvas, revision, read_only}, editor.export (as editor.export.status gives it)
While Lightair Live is connected, Lightair also sends staging.state, chat.message, chat.removed, activity.item, issue.raised, issue.cleared, output.health (once a second while live) and scene.thumbnail, and audio.levels 20 times a second. audio.levels goes only to connections that name it.
Parameters
- eventsstring[]Event names. Without it, every event.
Result
- eventsstring[] | nullThe events this connection gets; null for all.
Example
{ "jsonrpc": "2.0", "id": 1, "method": "events.subscribe", "params": { "events": [ "scene.program", "stream.state", "output.changed" ] }}lightair call events.subscribe '{"events":["scene.program","stream.state","output.changed"]}'Result
{ "events": ["scene.program", "stream.state", "output.changed"] }