Scene#
Functions#
start_scene#
start_scene(params, callback)
Propagates to all controllers in a project.
params
is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
integer |
Scene number |
|
For callback
please see JavaScript Command Callback.
release_scene#
release_scene(params, callback)
Propagates to all controllers in a project.
params
is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
integer |
Scene number |
|
|
float |
Optional. Release fade time in seconds. If not provided, the default fade time will be used. |
|
For callback
please see JavaScript Command Callback.
toggle_scene#
toggle_scene(params, callback)
Propagates to all controllers in a project.
params
is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
integer |
Scene number |
|
|
float |
Optional. The release fade time in seconds to apply if the toggle action results in the scene being released. If not provided, the default fade time will be used. |
|
For callback
please see JavaScript Command Callback.
release_all_scenes#
release_all_scenes(params, callback)
Propagates to all controllers in a project.
params
is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
float |
Optional. Release fade time in seconds. If not provided, the default fade time will be used. |
|
|
string |
Optional. Scene group name: |
|
For callback
please see JavaScript Command Callback.
release_all#
Release all timelines and scenes. Propagates to all controllers in a project.
release_all(params, callback)
params
is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
float |
Optional. Release fade time in seconds. If not provided, the default fade time will be used. |
|
|
string |
Optional. Timeline/Scene group name: |
|
For callback
please see JavaScript Command Callback.
get_scene_info#
Returns data about the scenes in the project and their state on the controller.
get_scene_info(callback[, num])
Returns an object with a single scenes
attribute, which has an array value. Each item in the array is a Scene object with the same attributes as in the HTTP GET response.
num
can be used to filter which scenes are returned and is expected to be a JSON object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
---|---|---|---|
|
string or integer |
Define the numbers of the scene that should be returned |
|
For example:
Query.get_scene_info(s => {
let name = s.scenes[0].name // name of the first scene returned
}, {"num":"1,2-5"})
JavaScript Command Callback#
Functions in the JavaScript API that perform actions on the controller, e.g. start_timeline
, have an optional callback
argument. This expects a function, which is called when a response to the underlying HTTP API request is received. Its argument, if non-null, is the response body. If the content type of the response was "application/json"
then the argument will be an object - the result of parsing the body as JSON.