Updated timeline to cuelist

2025-06-23 13:50:09 +02:00
parent 75f0aee237
commit bdcaa7ec1c
4 changed files with 64 additions and 45 deletions

@@ -1,20 +1,27 @@
# Module.json Condition # Module.json Condition
A condition is a way for the timeline to wait till a condition is met. There are two types of conditions: server or client.
A condition is a way for a cue list to wait till a condition is met. There are two types of conditions: server or client.
### Client Conditions ### Client Conditions
Client conditions can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows timeline makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition.
Client conditions can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows cue list makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition.
### Server Conditions ### Server Conditions
Server conditions can be met via the [ModuleServerAPI](./ModuleServerAPI). Server conditions can be met via the [ModuleServerAPI](./ModuleServerAPI).
Although these two types of conditions function differently you specify them the same way in your module.json. Below is an example of what a condition would look like: Although these two types of conditions function differently you specify them the same way in your module.json. Below is an example of what a condition would look like:
```JSON ```JSON
{ {
"title": "Wait for something", "title": "Wait for something",
"description": "This will wait till something will happen." "description": "This will wait till something will happen."
} }
``` ```
|Parameter|Description|
|-|-|
title | Visual title of the condition
description | Short description that explains what the condition does
View this in a [complete module.json example](./module.json). | Parameter | Description |
| ----------- | ------------------------------------------------------- |
| title | Visual title of the condition |
| description | Short description that explains what the condition does |
View this in a [complete module.json example](./module.json).

@@ -1,9 +1,11 @@
# Module.json # Module.json
The module.json is the main file for every module. It contains metadata that tells Getiyo what it is and it contains the modules properties, triggers & conditions. The [GetiyoModuleTool](./GetiyoModuleTool) will set this file up for you, but if you wish to change/add properties/triggers/conditions see the documentation below. There is also a [complete module.json example](./module.json). The module.json is the main file for every module. It contains metadata that tells Getiyo what it is and it contains the modules properties, triggers & conditions. The [GetiyoModuleTool](./GetiyoModuleTool) will set this file up for you, but if you wish to change/add properties/triggers/conditions see the documentation below. There is also a [complete module.json example](./module.json).
The module.json file serves as the central configuration file for each module in Getiyo. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the documentation provided below. For a full example of a module.json file, see the [complete module.json example](./module.json). The module.json file serves as the central configuration file for each module in Getiyo. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the documentation provided below. For a full example of a module.json file, see the [complete module.json example](./module.json).
## Structure ## Structure
```JSON ```JSON
{ {
"name": "DemoModule", "name": "DemoModule",
@@ -38,18 +40,18 @@ The module.json file serves as the central configuration file for each module in
``` ```
|Property|Description|Example | Property | Description | Example |
|-|-|-| | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
name | The property name, used internally for creating an ID. Changing this will break modules using the old name. | name | The property name, used internally for creating an ID. Changing this will break modules using the old name. |
author | The module author. | author | The module author. |
category | A fitting category for the module. | category | A fitting category for the module. |
description | A short module description. | description | A short module description. |
default_reference_properties | An object with property IDs as keys and property objects as values. Reference properties are unique for each scene a module is a part of. These are also the properties you edit in the scene editor. See [property](./ModuleJSONProperty) for all parameters. | ```{ property1: { property }, property2: { property } }``` | default_reference_properties | An object with property IDs as keys and property objects as values. Reference properties are unique for each scene a module is a part of. These are also the properties you edit in the scene editor. See [property](./ModuleJSONProperty) for all parameters. | `{ property1: { property }, property2: { property } }` |
default_module_properties | An object with property IDs as keys and property objects as values. Module properties are shared for the entire module instance. See [property](./ModuleJSONProperty) for all parameters. | ```{ property1: { property }, property2: { property } }``` | default_module_properties | An object with property IDs as keys and property objects as values. Module properties are shared for the entire module instance. See [property](./ModuleJSONProperty) for all parameters. | `{ property1: { property }, property2: { property } }` |
triggers | An object with trigger IDs as keys and trigger data as values. Triggers allow the timeline to call the server-side of a module, controlling module behavior automatically. See [trigger](./ModuleTrigger) for all parameters. | ```{ trigger1: { trigger }, trigger1: { trigger } }``` | triggers | An object with trigger IDs as keys and trigger data as values. Triggers allow a cue list to call the server-side of a module, controlling module behavior automatically. See [trigger](./ModuleTrigger) for all parameters. | `{ trigger1: { trigger }, trigger1: { trigger } }` |
conditions.client | An object with condition IDs as keys and condition data as values. A condition is a way for the timeline to wait till a condition is met. These are client conditions, they can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows timeline makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition. See [conditions](./ModuleCondition) for all parameters. | ```{ condition1: { condition }, condition2: { condition } }``` | conditions.client | An object with condition IDs as keys and condition data as values. A condition is a way for a cue list to wait till a condition is met. These are client conditions, they can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows cue list makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition. See [conditions](./ModuleCondition) for all parameters. | `{ condition1: { condition }, condition2: { condition } }` |
conditions.server | An object with condition IDs as keys and condition data as values. These are server conditions, they can be met via the [ModuleServerAPI](./ModuleServerAPI). The object is the same as `conditions.client`. | ```{ condition1: { condition }, condition2: { condition } }``` | conditions.server | An object with condition IDs as keys and condition data as values. These are server conditions, they can be met via the [ModuleServerAPI](./ModuleServerAPI). The object is the same as `conditions.client`. | `{ condition1: { condition }, condition2: { condition } }` |
defaultsize.width | The default width of the module. | defaultsize.width | The default width of the module. |
defaultsize.height |The default height of the module. | defaultsize.height | The default height of the module. |
defaultlocation.x | <span style="color:red">**Probably deprecated soon!**</span> Default x coordinate of the module. | defaultlocation.x | <span style="color:red">**Probably deprecated soon!**</span> Default x coordinate of the module. |
defaultlocation.y | <span style="color:red">**Probably deprecated soon!**</span> Default y coordinate of the module. | defaultlocation.y | <span style="color:red">**Probably deprecated soon!**</span> Default y coordinate of the module. |

@@ -201,16 +201,16 @@ api.onFileUpload(callback);
### onTrigger ### onTrigger
Register a listener for when a trigger is called from the timeline. Register a listener for when a trigger is called from a cue list.
```javascript ```javascript
api.onTrigger(triggerId, callback); api.onTrigger(triggerId, callback);
``` ```
| Argument | Type | Description | | Argument | Type | Description |
| --------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | --------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| triggerId | string | The trigger ID that the listener will receive. | | triggerId | string | The trigger ID that the listener will receive. |
| callback | ( finish:function, status: (text:string)=>void, ...args:any[] ):void | Function will be called when the trigger is called from the timeline. The callback will receive the arguments in the same order they are defined in the [module.json](./ModuleJSON). | | callback | ( finish:function, status: (text:string)=>void, ...args:any[] ):void | Function will be called when the trigger is called from a cue list. The callback will receive the arguments in the same order they are defined in the [module.json](./ModuleJSON). |
### onInit **Deprecated**. ### onInit **Deprecated**.

@@ -1,5 +1,7 @@
# Module.json Trigger # Module.json Trigger
A trigger is a way for the timeline to call the server side of a module. This way you can control the module behavior automatically. You can also specify parameters to input values. A basic trigger with no parameters will look like this:
A trigger is a way for a cue list to call the server side of a module. This way you can control the module behavior automatically. You can also specify parameters to input values. A basic trigger with no parameters will look like this:
```JSON ```JSON
{ {
"title":"Update Something", "title":"Update Something",
@@ -7,41 +9,49 @@ A trigger is a way for the timeline to call the server side of a module. This wa
"arguments": [] "arguments": []
} }
``` ```
|Property|Description|
|-|-| | Property | Description |
title|The title of the trigger, this is visible in the timeline. | ----------- | ---------------------------------------------------------- |
description|Description that explains what the trigger does. | title | The title of the trigger, this is visible in the cue list. |
arguments|An array of arguments, see below. | description | Description that explains what the trigger does. |
| arguments | An array of arguments, see below. |
## Arguments ## Arguments
Arguments can be used to let a timeline creator input variable values. This can be used to control a module through the timeline. Every argument needs to have a type and some argument types have additional parameters. Below you can find the argument types and their parameters.
Arguments can be used to let a cue list creator input variable values. This can be used to control a module through a cue list. Every argument needs to have a type and some argument types have additional parameters. Below you can find the argument types and their parameters.
### text ### text
|Parameter|Type|Description|
|-|-|-| | Parameter | Type | Description |
title|string|Visual name of the argument. | --------- | ------ | ---------------------------- |
| title | string | Visual name of the argument. |
### number ### number
|Parameter|Type|Description|
|-|-|-| | Parameter | Type | Description |
title|string|Visual name of the argument. | --------- | ------ | ---------------------------- |
| title | string | Visual name of the argument. |
### scenes ### scenes
|Parameter|Type|Description|
|-|-|-|
title|string|Visual name of the argument.
onlyContainingModule|boolean|Can only select scenes this module is a part of.
| Parameter | Type | Description |
| -------------------- | ------- | ------------------------------------------------ |
| title | string | Visual name of the argument. |
| onlyContainingModule | boolean | Can only select scenes this module is a part of. |
## Example Argument ## Example Argument
Number argument Number argument
```JSON ```JSON
{ {
"type": "number", "type": "number",
"title": "Hours from now" "title": "Hours from now"
} }
``` ```
Scene select argument Scene select argument
```JSON ```JSON
{ {
"type": "scenes", "type": "scenes",
@@ -50,4 +60,4 @@ Scene select argument
} }
``` ```
View this in a [complete module.json example](./module.json). View this in a [complete module.json example](./module.json).