Vovó Help

action.json and pad.json

Every key of the two files Vovó reads from a folder or a zip, generated from Vovó's own code, so it always matches this version. Vovó checks each file as it comes in and refuses it with a sentence saying what is wrong; a key it does not know is passed over without a word, which an editor that reads the schema underlines.

A key is lower-case letters, digits and _, and a name may have - too, each 32 characters at most.

For an editor that completes the keys and underlines mistakes, name the schema at the top of the file, as the examples do. vovo dev writes action.schema.json beside an action's parts; Vovó's source has both in its api folder.

action.json

An action's manifest: what it is called, what it hears, what it asks for, and what it offers whoever runs the live. It sits beside index.html, style.css, script.js and files/, in a package or a folder.

{
    "$schema": "./action.schema.json",
    "name": "Raffle",
    "id": "example.raffle",
    "version": "1.2.0",
    "api": 1,
    "author": "A maker",
    "site": "https://example.com/raffle",
    "description": "!join in chat joins the wheel; the panel draws the winner.",
    "license": "MIT",
    "triggers": ["chat", "timer"],
    "bindings": [
        { "event": "chat", "filter": [{ "field": "text", "op": "starts", "value": "!join" }] },
        { "event": "timer", "filter": [{ "field": "every", "op": "is", "value": 300 }] }
    ],
    "permissions": ["chat.send"],
    "controls": [
        { "key": "open", "label": "Entries open", "kind": "toggle" },
        { "key": "prize", "label": "Prize", "kind": "text" }
    ],
    "settings": [
        { "key": "color", "label": "Wheel colour", "kind": "color", "default": "#840926" },
        { "key": "size", "label": "Size", "kind": "number", "min": 200, "max": 800, "step": 10, "unit": "px", "default": 420 },
        { "key": "side", "label": "Side", "kind": "choice", "options": ["Left", "Right"], "default": "Right" }
    ],
    "panel": [
        { "kind": "control", "key": "open" },
        { "kind": "control", "key": "prize" },
        { "kind": "form", "name": "add", "label": "Put someone in", "button": "Put", "fields": [{ "key": "who", "label": "Name" }] },
        { "kind": "button", "name": "draw", "label": "Draw", "confirm": true },
        { "kind": "list", "key": "names", "label": "In the wheel", "empty": "Nobody yet", "buttons": [{ "name": "out", "label": "Take out", "confirm": true }] }
    ]
}

Conditions

Each trigger again, with the conditions that must all hold for it to fire the action, as the editor saves them. One for each name in triggers, in any order: when they do not match one for one, every condition is left out without a word and each trigger fires on everything.

A condition

One of the event's fields compared with a value. Texts are compared whatever the case; a number written as text is read as a number.

Controls

What the pad changes while the action runs: each kept in vovo.state under its key, and told to the action as the control event, which it hears without listing it.

Settings

What whoever uses the action may change without its code, in Customize: read as vovo.settings.<key>, as --vovo-<key> in its CSS and, for on or off and a choice, as data-vovo-<key> on its document. What is chosen stays with the action, and a package carries only the defaults. Eight of them at most are texts.

Settings: color

A colour; Vovó's wine, #840926, unless the action says.

Settings: number

A number from a least to a most, by steps; the least unless the action says.

Settings: toggle

On or off; off unless the action says.

Settings: choice

One of its options; the first unless the action says.

Settings: text

A line of text; empty unless the action says.

Settings: file

A picture, a sound or a video that whoever uses it chooses, 50 MB at most; as the action comes, one of its own files, by its path, or none.

Settings: font

One of the computer's fonts, by its family; Segoe UI unless the action says.

Settings: camera

One of the computer's cameras, which whoever uses the action chooses in Customize, shown where the action places it (vovo.camera.place, with the camera.show permission); four at most. It comes with none, so it has no default.

Panel

What the action shows whoever runs the live in Panels, in the side bar: pieces in order, each told by its kind, drawn by Vovó. What is done there reaches the action as the panel event, which it hears without listing it. A panel piece starts another panel, holding the pieces after it up to the next, and the pieces before the first show on every one; a tab splits a panel into sections the same way. The names of buttons, forms and a list's buttons are unique in the action. An action declares 24 panels at most, each with 40 pieces and 12 tabs at most.

Panel: panel

Another panel starts here, with an entry of its own in Panels.

Panel: tab

A section of the panel: the pieces after it, up to the next tab.

Panel: heading

A title over the pieces after it, which share a card.

Panel: note

A line saying something.

Panel: control

One of the action's controls, moved here as on the pad.

Panel: button

A button.

Panel: form

A few fields and a button: what is typed goes with the press, in the event's values. A form of one field is typed in the panel itself.

A form's fields

Each a line typed in the panel, sent with the form by its key.

Panel: list

A list read from the action's state, a line for each item, which may be thousands; one with more than eight lines has a search of its own.

A list's buttons

Buttons on each of the list's lines.

pad.json

A pad's pack: a zip or a folder of sounds and videos, with pad.json at its root saying the groups and their buttons; without it, each folder is a group and each sound or video a button named after its file. Brought in again, it updates what it names and leaves the rest as it is.

{
    "$schema": "./pad.schema.json",
    "groups": [
        {
            "name": "Sounds",
            "color": "#2F6FDB",
            "buttons": [
                { "label": "Applause", "icon": "👏", "sound": "sounds/applause.mp3", "favorite": true, "hotkey": "F13" },
                { "label": "Drum roll", "sound": "sounds/drums.ogg", "volume": 130 },
                { "label": "Rain", "video": "videos/rain.mp4", "key": "luma", "loop": true }
            ]
        },
        {
            "name": "Live",
            "buttons": [
                { "label": "Raffle", "action": "Raffle" },
                { "label": "Entries", "action": "Raffle", "control": "open" },
                { "label": "Starting", "scene": "Starting soon" },
                { "label": "Camera", "scene": "Game", "source": "Camera" },
                { "label": "Blur", "source": "Camera", "filter": "Blur" },
                { "label": "One minute", "team": "One minute, then I'm back." }
            ]
        }
    ]
}

Groups

A group of the pad and its buttons, in order.

Buttons

A button and what it does: Vovó reads the first of these it finds, in this order: sound; video; action with control; action; source with filter, or scene with source; scene. A pack brings 2,000 buttons at most.