Skip to main content
Per-camera live view with optional OSD (On-Screen Display) overlay. All endpoints are scoped to a specific camera.

Workflow

await client.startLiveViewStream(id);  // auto-enables live view
const frame = await client.getLiveViewFrame(id);  // single JPEG
await client.stopLiveViewStream(id);

Enable Live View

method
POST
POST /api/cameras/{cameraId}/live-view/enable
Sends the SDK Setting_Key_EnableLiveView command to the camera.
Live view is disabled by default in remote-transfer mode. You must call this endpoint before requesting frames.

Disable Live View

method
POST
POST /api/cameras/{cameraId}/live-view/disable

Live View Status

method
GET
GET /api/cameras/{cameraId}/live-view/status
{
  "success": true,
  "data": {
    "enabled": "true",
    "streaming": "true"
  }
}

Start Streaming

method
POST
POST /api/cameras/{cameraId}/live-view/start
Starts the frame capture worker thread. Auto-enables live view if disabled.

Stop Streaming

method
POST
POST /api/cameras/{cameraId}/live-view/stop

Get Frame

method
GET
GET /api/cameras/{cameraId}/live-view/frame
Returns the latest live view frame as a JPEG image (Content-Type: image/jpeg). Streaming must be started first.
curl -o frame.jpg http://localhost:8080/api/cameras/D10F60149B0C/live-view/frame

Enable OSD

method
POST
POST /api/cameras/{cameraId}/live-view/osd-enable
Enable On-Screen Display overlay. The camera renders its UI (exposure info, focus points, histogram, etc.) as an overlay image.

Disable OSD

method
POST
POST /api/cameras/{cameraId}/live-view/osd-disable

OSD Status

method
GET
GET /api/cameras/{cameraId}/live-view/osd-status
{
  "success": true,
  "data": {
    "supported": "true",
    "enabled": "true"
  }
}

Get OSD Frame

method
GET
GET /api/cameras/{cameraId}/live-view/osd-frame
Returns a composited JPEG — live view image with camera UI overlay on top.
curl -o osd-frame.jpg http://localhost:8080/api/cameras/D10F60149B0C/live-view/osd-frame

WebSocket Streaming

For continuous frame streaming at ~15fps, use the WebSocket endpoint. Endpoint: ws://localhost:8080/ws Connect with binaryType: 'arraybuffer'. Each binary message is a complete JPEG frame.

Commands (send as JSON text)

// Start live view for a specific camera
{"action": "start_liveview", "cameraId": "D10F60149B0C"}

// Stop live view
{"action": "stop_liveview"}

Client Example

const ws = new WebSocket('ws://localhost:8080/ws');
ws.binaryType = 'arraybuffer';

ws.onopen = () => {
  ws.send(JSON.stringify({
    action: 'start_liveview',
    cameraId: 'D10F60149B0C'
  }));
};

ws.onmessage = (event) => {
  const blob = new Blob([event.data], { type: 'image/jpeg' });
  document.getElementById('liveView').src = URL.createObjectURL(blob);
};