The device's turn channel (interactive streams)
Server-sent events for the device: which turn to serve. A `turn` event with the whole state at once and at every change (a turn minted, ended or expired), a comment every 2 s otherwise: `{"turn": {"turn_id", "exp", "expires_at", "secs_left", "device"}}` or `{"turn": null}`, and `{"turn": null, "stream": "gone"}` before it ends when the stream is deleted. The device serves the turn named and no other, and ends it when the channel says null, ends, or goes quiet (fail closed); nearglass-pub's `turns::follow_broadcast` does this. The publisher descriptor names it (`turns_url`). Takes the stream's own publisher token, or a secret key.
Server-sent events for the device: which turn to serve. A turn event with the
whole state at once and at every change (a turn minted, ended or expired), a
comment every 2 s otherwise: {"turn": {"turn_id", "exp", "expires_at", "secs_left", "device"}} or {"turn": null}, and {"turn": null, "stream": "gone"} before it ends when the stream is deleted. The device serves the turn
named and no other, and ends it when the channel says null, ends, or goes
quiet (fail closed); nearglass-pub's turns::follow_broadcast does this. The
publisher descriptor names it (turns_url). Takes the stream's own
publisher token, or a secret key.
AuthorizationBearer <token>the stream's publisher token
id*stringthe event stream
response?stringtext/event-streamcurl -X GET 'https://api.nearglass.com/v1/streams/st_8f2c41d09a7be3105c6e2d77/turns'"string"End a turn DELETE
The device hears the end on its turn channel at once. The relay closes the turn's control session (admin close of turn:<turn_id>) `close_after_ms` later, so the driver's page, told by your backend, can close its own session first: Chrome can crash a tab whose session the far end closes under it.
Kick a viewer DELETE
The seat is freed and its relay sessions closed at once.