MediaResource¶
MediaResource
¶
The kvmd-media daemon, which is where live video comes from.
It runs beside kvmd and serves one REST endpoint and one WebSocket.
Opening the socket is PiKVM.media_ws(); this
resource is the endpoint that says what the socket can be asked for.
Source code in src/aiopikvm/resources/media.py
get_state(*, timeout=None)
async
¶
Read what the daemon is configured to stream.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float | None
|
Per-call timeout in seconds. |
None
|
Returns:
| Type | Description |
|---|---|
MediaState
|
The formats the daemon has, and what it publishes about each. |
Raises:
| Type | Description |
|---|---|
APIError
|
The daemon is not running, which kvmd's nginx reports as HTTP 502 — it has no upstream socket to reach. |
ResponseError
|
The answer carried no |