Stream screencast video and cursor events
GET/computers/{id}/screencast
Server-Sent Events stream carrying the video + cursor traffic for a live session. The event shapes depend on session kind:
- Browser sessions emit default (unnamed) SSE events whose
datais a JSON object with a base64-encoded JPEG frame inimage_dataand ametadataobject containing timestamp and viewport dimensions. - Desktop sessions emit three named event types:
event: h264carries a JSON object whosenalu_datafield is a base64-encoded raw H.264 NAL-unit blob suitable for feeding into a WebCodecsVideoDecoder;event: cursor_updatecarries a cursor-sprite bitmap and hotspot, emitted only when the cursor shape changes;event: cursor_positioncarriesx/ycoordinates, emitted once per video frame while the cursor is moving.
A : heartbeat SSE comment is sent every 30 seconds to keep intermediaries from closing the connection. Action responses and command output are delivered on /computers/{id}/events instead and are deliberately excluded from this stream.
Path Parameters
id: string
Stream screencast video and cursor events
curl https://api.tzafon.ai/computers/$ID/screencast \
-H "Authorization: Bearer $TZAFON_API_KEY"