LiveOpenreSlotBindRequest live.openre-slot-bind-request@1

Generated at from openvibe-contracts v0.127.0 and openvibe-sdk v0.37.0.

Version
1.0.0
Owner
live
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/live/openre-slot-bind-request.v1.json

live.openre-slot-bind-request@1: the body of POST /internal/openre/slots on OpenVibe.Live (capability live.openre.slot.bind). OpenRestream asks Live for a slot on the person's channel bound to one OpenRestream stream (openre_stream_id, std_…); subject is the person who owns that stream. title names the slot on the person's dashboard.

Fields

FieldTypeRequiredDescriptionConstraints
subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
openre_stream_idstringyes
  • pattern ^std_[0-9A-HJKMNP-TV-Z]{26}$
titlestring
  • maxLength 200
protocolenum
  • one of "rtmp", "webrtc", "jsmpeg"

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: full
{
  "subject": "usr_01J8ZQ4Y7N3M2K1H0G9F8E7D6C",
  "openre_stream_id": "std_01J8ZQ4Y7N3M2K1H0G9F8E7D6C",
  "title": "Saturday streams",
  "protocol": "rtmp"
}
Valid: minimal
{
  "subject": "usr_01J8ZQ4Y7N3M2K1H0G9F8E7D6C",
  "openre_stream_id": "std_01J8ZQ4Y7N3M2K1H0G9F8E7D6C"
}
Rejected: no-stream
{
  "subject": "usr_01J8ZQ4Y7N3M2K1H0G9F8E7D6C"
}
Rejected: not-a-subject
{
  "subject": "42",
  "openre_stream_id": "std_01J8ZQ4Y7N3M2K1H0G9F8E7D6C"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('live.openre-slot-bind-request@1', value);   // { valid, errors: [{ path, message }] }