mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-26 20:38:43 -05:00
better error msg on live view when misconfigured
Improves (but doesn't fix) #119 and #120.
This commit is contained in:
@@ -80,6 +80,15 @@ class LiveCameraDriver {
|
||||
if (this.ws !== undefined) {
|
||||
return;
|
||||
}
|
||||
const subStream = this.camera.streams.sub;
|
||||
if (subStream === undefined || !subStream.record) {
|
||||
this.error(
|
||||
"Must have sub stream set to record; see " +
|
||||
"https://github.com/scottlamb/moonfire-nvr/issues/119 and " +
|
||||
"https://github.com/scottlamb/moonfire-nvr/issues/120"
|
||||
);
|
||||
return;
|
||||
}
|
||||
console.log(`${this.camera.shortName}: starting stream: ${reason}`);
|
||||
const loc = window.location;
|
||||
const proto = loc.protocol === "https:" ? "wss" : "ws";
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface Stream {
|
||||
totalSampleFileBytes: number;
|
||||
fsBytes: number;
|
||||
days: Record<string, Day>;
|
||||
record: boolean;
|
||||
}
|
||||
|
||||
export interface Day {
|
||||
|
||||
Reference in New Issue
Block a user