mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-03-30 09:13:42 -04: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,
|
videoSampleEntryId: part.videoSampleEntryId,
|
||||||
};
|
};
|
||||||
let initSegmentResult = await api.init(part.videoSampleEntryId, {});
|
let initSegmentResult = await api.init(part.videoSampleEntryId, {});
|
||||||
if (initSegmentResult.status !== "success") {
|
switch (initSegmentResult.status) {
|
||||||
this.error(`init segment fetch status ${initSegmentResult.status}`);
|
case "error":
|
||||||
return;
|
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);
|
this.setAspect(initSegmentResult.response.aspect);
|
||||||
srcBuf.appendBuffer(initSegmentResult.response.body);
|
srcBuf.appendBuffer(initSegmentResult.response.body);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user