LiveElementPressedPayload live.element.pressed@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- live
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/live.element.pressed.v1.json
live.element.pressed v1 (OpenVibe.Live server/elements): a viewer's element press was accepted and ran. It carries the public facts the stream should see: the channel, the element's id and name, the presser's public name and subject, the trigger that fired, the channel points it cost and the element-state revision it left behind. It never carries the presser's email, address, account balance or anything private; a refused press does not produce it. Envelope: subject { type: element, id: el_… }, actor the presser's subject, visibility public, priority low. Also written to the channel's AI timeline as a moment, so the stream's own timeline can cite 'chat made the robot dance'.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
channel | object | yes | The public channel facts (the channel page is public already). |
|
channel.username | string | yes |
| |
channel.display_name | string | yes |
| |
element_id | string | yes |
| |
element_name | string | yes |
| |
presser | identity.subject-ref | yes | ||
presser_name | string | yes | The display name the stream shows, never an email or an account id. |
|
trigger | ui.trigger | yes | ||
points_spent | integer | Channel points the press cost; 0 when it was free. |
| |
state_revision | integer | The element-state revision after the actions ran; 0 when the element has no state yet. |
| |
at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: chat-command
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"element_id": "el_01JAB2C3D4E5F6G7H8J9K0MNPS",
"element_name": "Headlight tally",
"presser": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"presser_name": "Maticus",
"trigger": {
"kind": "chat_command",
"command": "!headlights"
},
"points_spent": 0,
"state_revision": 2,
"at": "2026-11-11T20:31:00.000Z"
}Valid: press
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"element_id": "el_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"element_name": "Make it dance",
"presser": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"presser_name": "Maticus",
"trigger": {
"kind": "press"
},
"points_spent": 50,
"state_revision": 4,
"at": "2026-11-11T20:31:00.000Z"
}Rejected: bad-presser
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"element_id": "el_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"element_name": "Make it dance",
"presser": {
"type": "user",
"id": "alice"
},
"presser_name": "Alice",
"trigger": {
"kind": "press"
},
"at": "2026-11-11T20:31:00.000Z"
}Rejected: missing-element
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"presser": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"presser_name": "Maticus",
"trigger": {
"kind": "press"
},
"at": "2026-11-11T20:31:00.000Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('live.element.pressed@1', value); // { valid, errors: [{ path, message }] }