Skip to content

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

just fast forward to the end because chrome wont play in the background

roryclear87247c247b49
diff --git a/clearcam/player.html b/clearcam/player.html
index 76045f1..7e903bd 100644
--- a/clearcam/player.html
+++ b/clearcam/player.html
@@ -139,6 +139,15 @@
videoContainer.addEventListener('touchend', toggleControls);
videoContainer.addEventListener('click', toggleControls);
+ document.addEventListener("visibilitychange", () => {
+ if (isPlaying && !document.hidden && segments.length > 0) {
+ currentSegment = segments.length - 1;
+ currentVideo.src = segments[currentSegment].url;
+ currentVideo.currentTime = segments[currentSegment].duration;
+ currentVideo.play().catch(() => {});
+ }
+ });
+
async function fetchSegments() {
try {
const startParam = segments.length;
@@ -332,6 +341,6 @@
});
fetchSegments();
- </script>
+ </script>
</body>
</html>