A fresh viewer token for a seated page (a reconnect)
id*stringapplication/json- body
seat*SeatId^se_[0-9a-f]{32}$hidden?booleanthe tab is hidden (its seat lives 60 s without a heartbeat, not 20 s)
falseminted
application/json- response
A token and where to use it; the player and the SDK publisher take it whole.
token?stringthe CAT, base64url without padding; CLIENT_SETUP AUTHORIZATION TOKEN type 1
token_id?|the CWT cti: s-... (viewer), pub-... (SDK publisher asked with token_id), ing-... (gateway), turn: (controller); null for a device publisher token
expires_at?stringdate-timeexp?integerUnix seconds
relays?array<>namespace?stringcatalog?stringrelay_cert_sha256?stringonly for a relay with a self-signed certificate
hls?stringthe LL-HLS playlist for the player fallback; with the API edge, /v1/play/{id}/hls/index.m3u8 and only for streams with encoder ingest
state?"in""in"seat?SeatId^se_[0-9a-f]{32}$heartbeat_ms?integerplay_url?stringwhere the player keeps the seat: POST {play_url}/hb every heartbeat_ms, and {play_url}/leave on close, with the seat alone; present when the API knows its public address
curl -X POST 'https://api.nearglass.com/v1/play/st_8f2c41d09a7be3105c6e2d77/token' \ -H 'Content-Type: application/json' \ -d '{ "seat": "se_5b0e1c7a9d3f42e68a1c0b7d2e9f4a63"}'{ "token": "string", "token_id": "string", "expires_at": "2019-08-24T14:15:22Z", "exp": 0, "relays": [ { "url": "string" } ], "namespace": "string", "catalog": "string", "relay_cert_sha256": "string", "hls": "string", "state": "in", "seat": "string", "heartbeat_ms": 0, "play_url": "string"}The public waiting room (a page, publishable key) POST
For streams with `admission: public`. A waiting page calls it every 2 s with its `seat`; when offered a seat (state `offer`, 10 s), the viewer presses Join and the page calls with `join: true`. Rate limited per client address (a burst of 20, then 2 a second). Any origin may call it (CORS).
Keep the seat (every 5 s; a hidden tab as often as the browser lets it) POST
Next Page