Timeline#
Note
The functions listed on this page require a project to be loaded on the controller.
Functions#
start_timeline#
start_timeline(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 |
Timeline number |
|
start_timeline_release_others#
start_timeline_release_others(params, callback)
Starts the timeline and releases others.
Attribute |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
integer |
Timeline number |
|
|
string or integer |
Optional timeline group name or number. If name, prepend the name with |
|
|
boolean |
Optional flag to target the same group as the selected timeline. This flag has no effect when |
|
|
float |
Optional fade time to use when releasing other timelines, in seconds |
|
For callback please see JavaScript Command Callback.
release_timeline#
release_timeline(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 |
Timeline 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_timeline#
toggle_timeline(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 |
Timeline number |
|
|
float |
Optional. The release fade time in seconds to apply if the toggle action results in the timeline being released. If not provided, the default fade time will be used. |
|
For callback please see JavaScript Command Callback.
pause_timeline#
pause_timeline(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 |
Timeline number |
|
For callback please see JavaScript Command Callback.
resume_timeline#
resume_timeline(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 |
Timeline number |
|
For callback please see JavaScript Command Callback.
pause_all#
Pause all timelines in the project which are currently running. Propagates to all controllers in a project.
pause_all(callback)
For callback please see JavaScript Command Callback.
resume_all#
Resume all timelines in the project which are currently paused. Propagates to all controllers in a project.
resume_all(callback)
For callback please see JavaScript Command Callback.
release_all_timelines#
release_all_timelines(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 or integer |
Optional. Timeline group name or number. If name, prepend the name with |
|
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 or integer |
Optional. Timeline/Scene group name or number. If name, prepend the name with |
|
For callback please see JavaScript Command Callback.
set_timeline_rate#
set_timeline_rate(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 |
Timeline number |
|
|
string |
A string containing a floating point number or a bounded integer, where 1.0 means the timeline’s default rate. |
|
For callback please see JavaScript Command Callback.
set_timeline_position#
set_timeline_position(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 |
Timeline number |
|
|
string |
A string containing a floating point number or a bounded integer, representing a fraction of the timeline length. |
|
For callback please see JavaScript Command Callback.
get_timeline_info#
get_timeline_info(callback[, num])
Returns data about the timelines in the project and their state on the controller.
Returns an object with a single timelines attribute, which has an array value. Each item in the array is a Timeline object with the same attributes as in the HTTP GET response.
num can be used to filter which timelines are returned and is expected to be an object with the following attributes:
Attribute |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
string or integer |
Define the numbers of the timeline that should be returned |
|
For example:
Query.get_timeline_info(t => {
let name = t.timelines[0].name // name of the first timeline returned
}, {"num":"1-4"})
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.