Tune video encoding, offscreen rendering, bandwidth caps, and MediaSource video handling on the HTML5 Display client to balance image quality, CPU usage, and network throughput. These parameters are passed as query strings on the display endpoint.
Access Display Client
Section titled “Access Display Client”GET /api/v1/display/
Section titled “GET /api/v1/display/”Serves the HTML5 Display client web interface with URL-based configuration. The parameters documented on this page control encoding, offscreen rendering, bandwidth limits, virtual desktop width, and video support flags.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
encoding | query | string | No | Video encoding type. Use auto for best automatic selection. Accepted values: auto, webp, jpeg, png, rgb, rgb24, rgb32, h264, vp8, vp9, mpeg1, mpeg4+mp4, h264+mp4, vp8+webm, scroll, void. Default: "auto" |
offscreen | query | boolean | No | Use offscreen canvas for rendering. Default: false |
bandwidth_limit | query | integer | No | Bandwidth limit in bits per second (0 = unlimited). Default: 0 |
override_width | query | string | No | Override virtual desktop width (auto or numeric value). Default: "auto" |
video | query | boolean | No | Enable video encoding support. Default: true |
mediasource_video | query | boolean | No | Enable MediaSource API for video. Default: true |
Example Request
Section titled “Example Request”curl -X GET "https://domain.com/api/v1/display/?encoding=h264&bandwidth_limit=5000000&video=true&mediasource_video=true&offscreen=false&override_width=auto"Response
Section titled “Response”The HTML5 Display client interface is returned as text/html.
<!DOCTYPE html><html><head><title>Hoody Display Client</title></head><body> <!-- Display HTML5 client interface --></body></html>SDK Usage
Section titled “SDK Usage”import { HoodyClient } from "@hoody/sdk";
const client = new HoodyClient({ apiKey: "<api_key>" });
// Open the display client with H.264 encoding, a 5 Mbps cap,// MediaSource video enabled, and an automatic virtual desktop widthconst html = await client.display.accessClient({ encoding: "h264", bandwidth_limit: 5000000, video: true, mediasource_video: true, offscreen: false, override_width: "auto",});