OpenreStream openre.stream@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

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

openre.stream@1: one stream definition as OpenRe.Stream's API shows it (server/api/v1.js publicDefinition): the owner's stream with its protocols, recording and playback settings, ingest endpoints, key metadata (hints only, never a key) and the open session if any.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
titlestringyes
  • maxLength 140
descriptionstring | null
owneridentity.subject-refyes
protocolsarray of enumyes
  • items: one of "rtmp", "whip", "webrtc", "jsmpeg"
recording_modeenumyes
  • one of "vod", "clips", "none"
recording_visibilityenum
  • one of "public", "unlisted", "private"
playback_visibilityenum
  • one of "public", "unlisted", "private"
mirror_to_liveinteger | boolean
stateenumyes
  • one of "active", "disabled", "archived"
revisionintegeryes
external_refsarray of object
external_refs[].servicestringyes
external_refs[].typestringyes
external_refs[].idstring | integeryes
external_refs[].labelstring | null
ingestobjectyesWhere an encoder publishes (never the key).
ingest.rtmpobject
ingest.rtmp.urlstringyes
ingest.rtmp.key_hintstring | null
ingest.rtmp.key_idstring | null
keysarray of objectyes
keys[].idstringyes
keys[].hintstringyes
keys[].statusenumyes
  • one of "active", "grace", "revoked"
keys[].grace_untilstring | null
  • format date-time
keys[].created_atstring | null
  • format date-time
keys[].last_used_atstring | null
  • format date-time
sessionobject | nullyes
created_atstring | nullyes
  • format date-time
updated_atstring | nullyes
  • format date-time

Examples

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

Valid: main-cam
{
  "id": "def_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Main cam",
  "description": "",
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "protocols": [
    "rtmp"
  ],
  "recording_mode": "vod",
  "recording_visibility": "public",
  "playback_visibility": "public",
  "mirror_to_live": 1,
  "state": "active",
  "revision": 3,
  "external_refs": [
    {
      "service": "live",
      "type": "managed_stream",
      "id": "12",
      "label": null
    }
  ],
  "ingest": {
    "rtmp": {
      "url": "rtmp://ingest.openre.stream/live",
      "key_hint": "x9Q2",
      "key_id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR"
    }
  },
  "keys": [
    {
      "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR",
      "hint": "x9Q2",
      "status": "active",
      "grace_until": null,
      "created_at": "2026-09-20T10:00:00.000Z",
      "last_used_at": "2026-09-25T21:00:00.000Z"
    }
  ],
  "session": null,
  "created_at": "2026-09-20T10:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}
Rejected: unknown-protocol
{
  "id": "def_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Main cam",
  "description": "",
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "protocols": [
    "hls"
  ],
  "recording_mode": "vod",
  "recording_visibility": "public",
  "playback_visibility": "public",
  "mirror_to_live": 1,
  "state": "active",
  "revision": 3,
  "external_refs": [
    {
      "service": "live",
      "type": "managed_stream",
      "id": "12",
      "label": null
    }
  ],
  "ingest": {
    "rtmp": {
      "url": "rtmp://ingest.openre.stream/live",
      "key_hint": "x9Q2",
      "key_id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR"
    }
  },
  "keys": [
    {
      "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR",
      "hint": "x9Q2",
      "status": "active",
      "grace_until": null,
      "created_at": "2026-09-20T10:00:00.000Z",
      "last_used_at": "2026-09-25T21:00:00.000Z"
    }
  ],
  "session": null,
  "created_at": "2026-09-20T10:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}

Validate

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