T3.WebSocket.Routes (T3 v0.3.0)

Copy Markdown View Source

The four non-Effect WebSocket routes in the pinned T3 server. All use the environment/media authentication audience, not MCP OAuth credentials. Obtain a media ticket with T3.HTTP.Auth.web_socket_ticket_for(http, "media") and pass ticket: response.body["ticket"].

Preview delivers binary JPEG frames plus JSON text status/control messages. After consuming a JPEG delivery, preview_ack/2 releases the local delivery and sends the route's {"type":"ack"}. Other route-specific control/video codecs remain literal frames: the SDK does not transcode JPEG/H.264/emulator protocols.

Device routes accept query: %{"hostId" => host_id, ...}. The server consumes hostId/wsTicket and forwards remaining query parameters to its allowlisted hub. simulator/2 and emulator/2 require orchestration operate scope; discovery requires read scope. Preview controls additionally require preview operate scope.

Summary

Functions

Connect a preview viewer. Set query interactive=false for view-only behavior.

Release a consumed JPEG delivery and send preview's server acknowledgement.

Functions

all()

catalog()

devices(base_url, opts \\ [])

emulator(base_url, opts \\ [])

preview(base_url, thread_id, tab_id, opts \\ [])

Connect a preview viewer. Set query interactive=false for view-only behavior.

preview_ack(socket, delivery_ref)

Release a consumed JPEG delivery and send preview's server acknowledgement.

simulator(base_url, opts \\ [])

source_ref()