Skip to content

NVR with realtime local object detection for IP cameras

Do not show the loader during recordings api call (#6366)

Peeter N17b92aa65753
diff --git a/web/src/routes/Recording.jsx b/web/src/routes/Recording.jsx
index 9a40b674cc..405549e8b0 100644
--- a/web/src/routes/Recording.jsx
+++ b/web/src/routes/Recording.jsx
@@ -30,7 +30,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
// calculates the seek seconds by adding up all the seconds in the segments prior to the playback time
const seekSeconds = useMemo(() => {
if (!recordings) {
- return 0;
+ return undefined;
}
const currentUnix = getUnixTime(currentDate);
@@ -103,6 +103,9 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
}, [playlistIndex]);
useEffect(() => {
+ if (seekSeconds === undefined) {
+ return;
+ }
if (this.player) {
// if the playlist has moved on to the next item, then reset
if (this.player.playlist.currentItem() !== playlistIndex) {
@@ -114,7 +117,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
}
}, [seekSeconds, playlistIndex]);
- if (!recordingsSummary || !recordings || !config) {
+ if (!recordingsSummary || !config) {
return <ActivityIndicator />;
}
@@ -145,7 +148,9 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
player.playlist(playlist);
player.playlist.autoadvance(0);
player.playlist.currentItem(playlistIndex);
- player.currentTime(seekSeconds);
+ if (seekSeconds !== undefined) {
+ player.currentTime(seekSeconds);
+ }
this.player = player;
}
}}