# `T3.WebSocket.Routes`
[🔗](https://github.com/dl-alexandre/t3-elixir/blob/main/lib/t3/web_socket/routes.ex#L1)

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.

# `all`

# `catalog`

# `devices`

# `emulator`

# `preview`

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

# `preview_ack`

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

# `simulator`

# `source_ref`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
