Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

fix start param thing

roryclear5a0265032818
diff --git a/clearcam/downloads.html b/clearcam/downloads.html
index aad0541..94da5c3 100644
--- a/clearcam/downloads.html
+++ b/clearcam/downloads.html
@@ -33,7 +33,7 @@
const startSeconds =
dateObj.getHours() * 3600 +
dateObj.getMinutes() * 60 +
- dateObj.getSeconds();
+ dateObj.getSeconds() - 2; //slightly before so you can see?
const row = document.createElement('tr');
row.innerHTML = `
@@ -65,10 +65,12 @@
}
function playEvent(date, startSeconds) {
- const referrer = document.referrer || '/';
+ let referrer = document.referrer || '/';
+ referrer = referrer.split('?')[0];
window.location.href = `${referrer}?date=${date}&start=${startSeconds}`;
}
+
// Load events when the page loads
window.onload = fetchEvents;
</script>
diff --git a/clearcam/player.html b/clearcam/player.html
index 44a15d8..99d72c5 100644
--- a/clearcam/player.html
+++ b/clearcam/player.html
@@ -1022,6 +1022,7 @@
videoPlayers[video_index].currentTime = segments[currentSegment].duration;
videoPlayers[video_index].play().catch(() => {});
}
+ //alert(segments.length);
}
// Handle visibility change