mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-24 22:25:55 -05:00
improve init segment fetch error msg
Fixes #146, in combination with earlier commit 4892ed7
.
This commit is contained in:
parent
d2c7b62771
commit
7e5bc42646
@ -160,9 +160,15 @@ class LiveCameraDriver {
|
||||
videoSampleEntryId: part.videoSampleEntryId,
|
||||
};
|
||||
let initSegmentResult = await api.init(part.videoSampleEntryId, {});
|
||||
if (initSegmentResult.status !== "success") {
|
||||
this.error(`init segment fetch status ${initSegmentResult.status}`);
|
||||
return;
|
||||
switch (initSegmentResult.status) {
|
||||
case "error":
|
||||
this.error(`init segment fetch error: ${initSegmentResult.message}`);
|
||||
return;
|
||||
case "aborted":
|
||||
this.error(`init segment fetch aborted`);
|
||||
return;
|
||||
case "success":
|
||||
break;
|
||||
}
|
||||
this.setAspect(initSegmentResult.response.aspect);
|
||||
srcBuf.appendBuffer(initSegmentResult.response.body);
|
||||
|
Loading…
Reference in New Issue
Block a user