Show P1/A1 cameras as a refreshing picture
SnapshotView fetches one frame at a time through the backend, pauses while the tab is hidden and backs off after failures. PrinterCard picks it when /stream answers kind "snapshot".
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
/**
|
||||
* Where a printer's camera can be watched, from `GET /printers/:id/stream`.
|
||||
*/
|
||||
export interface PrinterStream {
|
||||
export type PrinterStream =
|
||||
| WebrtcStream
|
||||
// A P1/A1: no stream to negotiate, a picture to fetch again and again.
|
||||
| { kind: "snapshot"; snapshotPath: string; intervalMs: number };
|
||||
|
||||
export interface WebrtcStream {
|
||||
kind?: "webrtc";
|
||||
/** The go2rtc stream name to negotiate for. */
|
||||
cameraId: string;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user