mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-24 22:25:55 -05:00
minor error handling improvements
* When the MediaSource is in error state (or busy, I think), endOfStream throws an exception. This prevented the error from being properly displayed in the UI. We don't really need to call endOfStream, I guess. * including an Event in a format string just said [Object object], at least on Safari. Use the type instead, which I think is the only useful info in the event anyway.
This commit is contained in:
parent
d7f4b255bf
commit
f34937220d
@ -92,7 +92,6 @@ class LiveCameraDriver {
|
||||
console.error(`${this.camera.shortName}: aborting due to ${reason}`);
|
||||
this.stopStream(reason);
|
||||
this.buf = { state: "error" };
|
||||
this.src.endOfStream("network");
|
||||
this.setPlaybackState({ state: "error", message: reason });
|
||||
};
|
||||
|
||||
@ -230,7 +229,7 @@ class LiveCameraDriver {
|
||||
};
|
||||
|
||||
bufEvent = (e: Event) => {
|
||||
this.error(`bufEvent: ${e}`);
|
||||
this.error(`SourceBuffer ${e.type}`);
|
||||
};
|
||||
|
||||
videoPlaying = (e: SyntheticEvent<HTMLVideoElement, Event>) => {
|
||||
|
Loading…
Reference in New Issue
Block a user