LiveAgentStreamState live.agent-stream-state@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

An older major, still in the catalog. The current one is live.agent-stream-state@2.
Version
1.0.0
Owner
live
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/live/agent-stream-state.v1.json

live.agent-stream-state@1 (the Agent Streams plan, S1): what the desk reads every ten seconds, GET /api/streams/agent/:id/state on OpenVibe.Live (with the publish ticket). VIEWERS is how many people watch. ENCODE says whether Live wants video: it is true while anyone watches or the stream is public, and while it is false the desk stops encoding and sends a snapshot every five seconds (PUT /api/streams/agent/:id/frame, JPEG or WebP, at most 200 KB, with the ticket). CURTAIN is the desk's privacy screen (the reason is the owner's only). ENDS_AT is when the stream ends.

Fields

FieldTypeRequiredDescriptionConstraints
viewersintegeryes
  • minimum 0
encodebooleanyes
curtainobjectyes
  • no other fields
curtain.upbooleanyes
curtain.sincestring | null
  • format date-time
curtain.reasonenumWhy the curtain is up. The owner's view only; a viewer never sees it.
  • one of "password_field", "secret_file", "env_print", "manual", "site", "detector"
ends_atstring | nullyes
  • format date-time

Examples

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

The fixtures that ship with the package are the current major's.

Validate

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