Skip to main content

Stream a camera preview

GET 

/api/peripherals/cameras/preview/:session_id/stream

Relays the preview's JPEG frames as a long-lived multipart/x-mixed-replace; boundary=frame response, one image/jpeg part with a Content-Length per frame, for an <img> element. Insight checks the board's framing and refuses a frame over 4 MiB. One viewer per session: a second request returns 409 preview_active. When the response ends (the viewer disconnects, or the board sends nothing for 10 s, or for two frame periods for a mode slower than 0.2 fps, at most 60 s) the preview stops on the board. An unknown or superseded session id returns 404.

Request​

Responses​

Long-lived multipart JPEG stream.