# preview.frame

Source: https://docs.lightair.app/developers/remote-api/preview.frame

> Gives one JPEG frame of the program, from the primary canvas or another canvas.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Scenes. Script plugins need the `screen.capture` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `max_width` | `number` | no | The frame's width at most, 64 to 1920. Default 720. |
| `canvas` | `string` | no | A canvas id from state.get. Without it, or with an unknown id, the primary canvas. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `mime` | `string` | no | "image/jpeg". |
| `width` | `number` | no | Its width. |
| `height` | `number` | no | Its height. |
| `data` | `string` | no | The JPEG, base64. |

## Related

- [screenshot](https://docs.lightair.app/developers/remote-api/screenshot.md)
- [scene.thumbnails](https://docs.lightair.app/developers/remote-api/scene.thumbnails.md)
- [canvas.list](https://docs.lightair.app/developers/remote-api/canvas.list.md)
