Actions
Scenes
6 actions in the Scenes group. Each is its own JSON-RPC method, and also runs through action.run.
scene.switchSwitch scene
Puts a scene on air.
Parameters
The scene to put on air. Give its id or name.
This switch only: a type (fade, slide, move, layer_by_layer…), an effect, a pack transition or a saved transition's name, as for transition.set. Left out, the scene's own or the default plays.
This switch only: how long it takes (Layer by layer takes as long as its layers' own shows and hides).
This switch only: play it backward with its pictures swapped.
Result
namestringalwayscan be nullIts name.
scenestring (uuid)alwaysThe id of the scene on air now.
transitionTransitionSummaryoptionalThe transition this switch played, when it was given one of its own.
Fields of
transitionduration_msintegeralwaysHow long it takes; a stinger lasts as long as its video.
namestringalwaysIts saved name, else its type's (or effect's, or pack transition's) name.
reversebooleanalwaysWhether it plays backward with its pictures swapped.
typestringalwayscut, fade, fade_to_color, slide, swipe, luma_wipe, move, effect, shader, pack or stinger.
Live state
scenes.program == scene bool
On while this scene is on air. From the scenes topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "scene.switch",
"params": {
"scene": "<scene id or name>"
}
}In the SDKs
Task<SceneSwitchResult> SceneSwitchAsync(SceneSwitchParams parameters, CancellationToken cancellationToken = default)sceneSwitch(params: SceneSwitchParams): Promise<SceneSwitchResult>async def scene_switch(self, *, scene: str, duration_ms: int | None = None, reverse: bool | None = None, transition: str | None = None) -> SceneSwitchResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"duration_ms": {
"description": "This switch only: how long it takes (Layer by layer takes as long as its layers' own shows and hides).",
"maximum": 20000,
"minimum": 0,
"type": "integer"
},
"reverse": {
"description": "This switch only: play it backward with its pictures swapped.",
"type": "boolean"
},
"scene": {
"description": "The scene to put on air. Give its id or name.",
"minLength": 1,
"type": "string"
},
"transition": {
"description": "This switch only: a type (fade, slide, move, layer_by_layer…), an effect, a pack transition or a saved transition's name, as for transition.set. Left out, the scene's own or the default plays.",
"maxLength": 120,
"type": "string"
}
},
"required": [
"scene"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Its name.",
"type": [
"string",
"null"
]
},
"scene": {
"description": "The id of the scene on air now.",
"format": "uuid",
"type": "string"
},
"transition": {
"additionalProperties": false,
"description": "The transition this switch played, when it was given one of its own.",
"properties": {
"duration_ms": {
"description": "How long it takes; a stinger lasts as long as its video.",
"type": "integer"
},
"name": {
"description": "Its saved name, else its type's (or effect's, or pack transition's) name.",
"type": "string"
},
"reverse": {
"description": "Whether it plays backward with its pictures swapped.",
"type": "boolean"
},
"type": {
"description": "cut, fade, fade_to_color, slide, swipe, luma_wipe, move, effect, shader, pack or stinger.",
"type": "string"
}
},
"required": [
"type",
"name",
"duration_ms",
"reverse"
],
"title": "TransitionSummary",
"type": "object"
}
},
"required": [
"scene",
"name"
],
"type": "object"
}
}scene.nextNext scene
Puts the scene after the one on air on air, in the Scenes list's order (wrapping around).
KeyDialscope: control
Parameters
Result
namestringalwayscan be nullIts name.
scenestring (uuid)alwaysThe id of the scene on air now.
Live state
scenes.program_name string
The name of the scene on air. From the scenes topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "scene.next"
}In the SDKs
Task<SceneNextResult> SceneNextAsync(CancellationToken cancellationToken = default)sceneNext(): Promise<SceneNextResult>async def scene_next(self) -> SceneNextResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {},
"required": [],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Its name.",
"type": [
"string",
"null"
]
},
"scene": {
"description": "The id of the scene on air now.",
"format": "uuid",
"type": "string"
}
},
"required": [
"scene",
"name"
],
"type": "object"
}
}scene.previousPrevious scene
Puts the scene before the one on air on air, in the Scenes list's order (wrapping around).
KeyDialscope: control
Parameters
Result
namestringalwayscan be nullIts name.
scenestring (uuid)alwaysThe id of the scene on air now.
Live state
scenes.program_name string
The name of the scene on air. From the scenes topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "scene.previous"
}In the SDKs
Task<ScenePreviousResult> ScenePreviousAsync(CancellationToken cancellationToken = default)scenePrevious(): Promise<ScenePreviousResult>async def scene_previous(self) -> ScenePreviousResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {},
"required": [],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Its name.",
"type": [
"string",
"null"
]
},
"scene": {
"description": "The id of the scene on air now.",
"format": "uuid",
"type": "string"
}
},
"required": [
"scene",
"name"
],
"type": "object"
}
}scene.refreshRefresh a scene
Reloads every web page in a scene (the same reload Reload page does), including web pages inside the scenes it nests, each one once, and reconnects any camera, capture card or audio device in it that's lost its connection. Handy for a custom giveaway or chaos wheel page, or anything else in the scene that needs a fresh start, all at once.
Parameters
The scene to refresh. Left out: the scene on air. Give its id or name.
Result
reconnectedarray of string (uuid)alwaysDevice sources (cameras, capture cards, audio devices) that were reconnected.
reloadedarray of string (uuid)alwaysThe web page sources reloaded (each once, nested scenes included).
scenestring (uuid)alwaysThe id of the scene refreshed.
still_stalledarray of objectalwaysDevice sources that were tried and couldn't reconnect.
Fields of
still_stallederrorstringalwayssourcestring (uuid)always
Live state
{
"jsonrpc": "2.0",
"id": 1,
"method": "scene.refresh"
}In the SDKs
Task<SceneRefreshResult> SceneRefreshAsync(CancellationToken cancellationToken = default)async def scene_refresh(self, *, scene: str | None = None) -> SceneRefreshResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"scene": {
"description": "The scene to refresh. Left out: the scene on air. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"reconnected": {
"description": "Device sources (cameras, capture cards, audio devices) that were reconnected.",
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
},
"reloaded": {
"description": "The web page sources reloaded (each once, nested scenes included).",
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
},
"scene": {
"description": "The id of the scene refreshed.",
"format": "uuid",
"type": "string"
},
"still_stalled": {
"description": "Device sources that were tried and couldn't reconnect.",
"items": {
"additionalProperties": false,
"properties": {
"error": {
"type": "string"
},
"source": {
"format": "uuid",
"type": "string"
}
},
"required": [
"source",
"error"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"scene",
"reloaded",
"reconnected",
"still_stalled"
],
"type": "object"
}
}vertical.pinPin the vertical canvas
Keeps the vertical canvas on one scene while the main (landscape) canvas switches scenes, or lets it follow the scene on air again. pin keeps it on the scene; follow lets it follow the scene on air (no scene needed); toggle pins it to the scene, or lets it follow again when it's already pinned there (with no scene, a pinned canvas follows again). A scene with no vertical layout shows its horizontal layout, fitted. Needs the vertical canvas (Settings › Video › Vertical canvas); while it's off, the choice is kept for when it's back on. If the pinned scene is deleted, the vertical canvas follows the scene on air again.
Parameters
The scene to keep the vertical canvas on (for pin and toggle). Give its id or name.
Pin, follow the scene on air, or toggle.
Result
namestringalwayscan be nullThat scene's name.
pinnedstring (uuid)alwayscan be nullThe id of the scene the vertical canvas is pinned to; null while it follows the scene on air.
Live state
scenes.vertical_pinned == scene bool
On while the vertical canvas is pinned to this scene. From the scenes topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "vertical.pin"
}In the SDKs
Task<VerticalPinResult> VerticalPinAsync(CancellationToken cancellationToken = default)async def vertical_pin(self, *, mode: VerticalPinMode | None = None, scene: str | None = None) -> VerticalPinResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"mode": {
"default": "toggle",
"description": "Pin, follow the scene on air, or toggle.",
"enum": [
"pin",
"follow",
"toggle"
],
"type": "string"
},
"scene": {
"description": "The scene to keep the vertical canvas on (for pin and toggle). Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "That scene's name.",
"type": [
"string",
"null"
]
},
"pinned": {
"description": "The id of the scene the vertical canvas is pinned to; null while it follows the scene on air.",
"format": "uuid",
"type": [
"string",
"null"
]
}
},
"required": [
"pinned",
"name"
],
"type": "object"
}
}vertical.remove_layoutRemove a vertical layout
Removes a scene's own vertical layout (or every scene's, with all), as Studio's "Remove vertical layout" does: the scene shows its horizontal layout fitted on the vertical canvas again, as before it had one. Horizontal layouts are never changed; a horizontal layer that was linked to a removed vertical layer just stops being linked. Sources that only the removed layers used, and that nothing else names, are deleted, as removing a layer in Studio does. The vertical canvas itself and its settings stay. It all happens in one step. Needs "confirm": true.
Keydestructivescope: manage
Parameters
The scene whose vertical layout goes (not needed with all). Give its id or name.
true: remove every scene's vertical layout (no scene needed).
Must be true.
Result
layers_removedintegeralwaysVertical layers removed with them.
links_clearedintegeralwaysHorizontal layers that were linked to one of them (now not linked).
removedarray of string (uuid)alwaysThe ids of the scenes whose vertical layout was removed.
sources_deletedintegeralwaysSources deleted because nothing uses them any more.
Live state
{
"jsonrpc": "2.0",
"id": 1,
"method": "vertical.remove_layout",
"params": {
"confirm": true
}
}In the SDKs
Task<VerticalRemoveLayoutResult> VerticalRemoveLayoutAsync(VerticalRemoveLayoutParams parameters, CancellationToken cancellationToken = default)verticalRemoveLayout(params: VerticalRemoveLayoutParams): Promise<VerticalRemoveLayoutResult>async def vertical_remove_layout(self, *, confirm: bool, all: bool | None = None, scene: str | None = None) -> VerticalRemoveLayoutResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"all": {
"description": "true: remove every scene's vertical layout (no scene needed).",
"type": "boolean"
},
"confirm": {
"const": true,
"description": "Must be true.",
"type": "boolean"
},
"scene": {
"description": "The scene whose vertical layout goes (not needed with all). Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"confirm"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"layers_removed": {
"description": "Vertical layers removed with them.",
"type": "integer"
},
"links_cleared": {
"description": "Horizontal layers that were linked to one of them (now not linked).",
"type": "integer"
},
"removed": {
"description": "The ids of the scenes whose vertical layout was removed.",
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
},
"sources_deleted": {
"description": "Sources deleted because nothing uses them any more.",
"type": "integer"
}
},
"required": [
"removed",
"layers_removed",
"links_cleared",
"sources_deleted"
],
"type": "object"
}
}
