mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-03-30 17:23:43 -04:00
better error msg on live view when misconfigured
Improves (but doesn't fix) #119 and #120.
This commit is contained in:
parent
42cf77f0d6
commit
b8b5038f71
@ -14,7 +14,8 @@ Each release is tagged in Git and on the Docker repository
|
|||||||
workaround, so anamorphic videos looked correct on Chrome but slightly
|
workaround, so anamorphic videos looked correct on Chrome but slightly
|
||||||
stretched on Firefox. Now both live streams and playback are fully correct
|
stretched on Firefox. Now both live streams and playback are fully correct
|
||||||
on all browsers.
|
on all browsers.
|
||||||
* UI: better error message on browsers where live view is unsupported.
|
* UI: better error messages on live view when browser is unsupported,
|
||||||
|
`sub` stream is unconfigured, or `sub` stream is not set to record.
|
||||||
* upgrade to retina v0.1.0, which uses `SET_PARAMETERS` rather than
|
* upgrade to retina v0.1.0, which uses `SET_PARAMETERS` rather than
|
||||||
`GET_PARAMETERS` as a RTSP keepalive. GW Security cameras would ignored
|
`GET_PARAMETERS` as a RTSP keepalive. GW Security cameras would ignored
|
||||||
the latter, causing Moonfire NVR to drop the connection every minute.
|
the latter, causing Moonfire NVR to drop the connection every minute.
|
||||||
|
@ -177,6 +177,7 @@ Example response:
|
|||||||
"maxEndTime90k": 130985466591817,
|
"maxEndTime90k": 130985466591817,
|
||||||
"totalDuration90k": 96736169725,
|
"totalDuration90k": 96736169725,
|
||||||
"totalSampleFileBytes": 446774393937,
|
"totalSampleFileBytes": 446774393937,
|
||||||
|
"record": true,
|
||||||
"days": {
|
"days": {
|
||||||
"2016-05-01": {
|
"2016-05-01": {
|
||||||
"endTime90k": 131595516000000,
|
"endTime90k": 131595516000000,
|
||||||
|
@ -399,9 +399,6 @@ here are some things to check:
|
|||||||
guide](schema.md) prior to 29 Feb 2020, look at [this
|
guide](schema.md) prior to 29 Feb 2020, look at [this
|
||||||
update](https://github.com/scottlamb/moonfire-nvr/commit/92266612b5c9163eb6096c580ba751280a403648#diff-e8bdd96dda101a25a541a6629675ea46bd6eaf670c6417c76662db5397c50c19)
|
update](https://github.com/scottlamb/moonfire-nvr/commit/92266612b5c9163eb6096c580ba751280a403648#diff-e8bdd96dda101a25a541a6629675ea46bd6eaf670c6417c76662db5397c50c19)
|
||||||
to those instructions.
|
to those instructions.
|
||||||
* The live view currently only uses the `sub` stream. If you configure only
|
|
||||||
a `main` stream on your cameras, you will see this error consistently.
|
|
||||||
[#119](https://github.com/scottlamb/moonfire-nvr/issues/119)
|
|
||||||
|
|
||||||
### Errors in kernel logs
|
### Errors in kernel logs
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ pub struct Stream<'a> {
|
|||||||
pub total_duration_90k: Duration,
|
pub total_duration_90k: Duration,
|
||||||
pub total_sample_file_bytes: i64,
|
pub total_sample_file_bytes: i64,
|
||||||
pub fs_bytes: i64,
|
pub fs_bytes: i64,
|
||||||
|
pub record: bool,
|
||||||
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
#[serde(serialize_with = "Stream::serialize_days")]
|
#[serde(serialize_with = "Stream::serialize_days")]
|
||||||
@ -243,6 +244,7 @@ impl<'a> Stream<'a> {
|
|||||||
total_duration_90k: s.duration,
|
total_duration_90k: s.duration,
|
||||||
total_sample_file_bytes: s.sample_file_bytes,
|
total_sample_file_bytes: s.sample_file_bytes,
|
||||||
fs_bytes: s.fs_bytes,
|
fs_bytes: s.fs_bytes,
|
||||||
|
record: s.record,
|
||||||
days: if include_days { Some(s.days()) } else { None },
|
days: if include_days { Some(s.days()) } else { None },
|
||||||
config: match include_config {
|
config: match include_config {
|
||||||
false => None,
|
false => None,
|
||||||
|
@ -80,6 +80,15 @@ class LiveCameraDriver {
|
|||||||
if (this.ws !== undefined) {
|
if (this.ws !== undefined) {
|
||||||
return;
|
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}`);
|
console.log(`${this.camera.shortName}: starting stream: ${reason}`);
|
||||||
const loc = window.location;
|
const loc = window.location;
|
||||||
const proto = loc.protocol === "https:" ? "wss" : "ws";
|
const proto = loc.protocol === "https:" ? "wss" : "ws";
|
||||||
|
@ -31,6 +31,7 @@ export interface Stream {
|
|||||||
totalSampleFileBytes: number;
|
totalSampleFileBytes: number;
|
||||||
fsBytes: number;
|
fsBytes: number;
|
||||||
days: Record<string, Day>;
|
days: Record<string, Day>;
|
||||||
|
record: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Day {
|
export interface Day {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user