diff --git a/docker/config/nginx/motionui.conf b/docker/config/nginx/motionui.conf
index ac4ec265..cfa55022 100644
--- a/docker/config/nginx/motionui.conf
+++ b/docker/config/nginx/motionui.conf
@@ -83,6 +83,7 @@ server {
fastcgi_request_buffering off;
}
+ # Go2rtc stream access
location ~ /api/stream.mjpeg {
proxy_pass http://127.0.0.1:1984;
proxy_http_version 1.1;
@@ -92,6 +93,11 @@ server {
proxy_read_timeout 86400;
}
+ # Go2rtc main page
+ location ~ /go2rtc {
+ proxy_pass http://127.0.0.1:1984/;
+ }
+
location ~ \.php$ {
root $WWW_DIR/public;
include fastcgi_params;
diff --git a/www/controllers/Camera/Timelapse.php b/www/controllers/Camera/Timelapse.php
index 0dd42a90..92c7e15d 100644
--- a/www/controllers/Camera/Timelapse.php
+++ b/www/controllers/Camera/Timelapse.php
@@ -130,7 +130,7 @@ public function timelapse()
/**
* Ignore if it fails to capture image because the camera may not be running 24/7
*/
- if ($content === false) {
+ if ($content === false or empty($content)) {
continue;
}
diff --git a/www/public/resources/js/camera.js b/www/public/resources/js/camera.js
index 82853e74..9bedadbb 100644
--- a/www/public/resources/js/camera.js
+++ b/www/public/resources/js/camera.js
@@ -328,6 +328,9 @@ $(document).on('click','.timelapse-camera-btn',function () {
// Execute functions :
[ "$('footer').append(jsonValue.message)" ]
);
+
+ // Temporary hide all other stream images to avoid CPU loads
+ $('.camera-image').hide();
});
/**
@@ -380,9 +383,8 @@ $(document).on('click','#timelapse-play-btn',function () {
/**
* Play timelapse
- * @returns
*/
-async function playTimelapse()
+function playTimelapse()
{
/**
* Retrieve camera id, date, max range and all pictures names
@@ -587,6 +589,9 @@ $(document).on('click','.hide-camera-configuration-btn',function () {
* Event: close timelapse screen
*/
$(document).on('click','.close-timelapse-btn',function () {
+ // Show all stream images
+ $('.camera-image').show();
+
$('#timelapse').remove();
});
@@ -594,40 +599,33 @@ $(document).on('click','.close-timelapse-btn',function () {
* Event: set a camera on full screen
*/
$(document).on('click','.full-screen-camera-btn',function () {
- var cameraId = $(this).attr('camera-id');
-
- /**
- * Add full-screen class to set the div on full screen
- */
- $('.camera-container[camera-id='+cameraId+']').addClass("full-screen");
-
- /**
- * Show and hide certain buttons
- */
- $('.delete-camera-btn[camera-id='+cameraId+']').hide();
- $('.configure-camera-btn[camera-id='+cameraId+']').hide();
- $('.timelapse-camera-btn[camera-id='+cameraId+']').hide();
- $('.close-full-screen-container[camera-id='+cameraId+']').css('display', 'block');
+ var img = $(this);
+
+ html = '
'
+ + '
'
+ + ''
+ + '
'
+ + '
'
+ + ''
+ + '
'
+ + '
';
+
+ // Append the fullscreen div to the body
+ $('body').append(html);
+
+ // Temporary hide all other stream images to avoid CPU loads
+ $('.camera-image').hide();
});
/**
* Event: close camera full screen
*/
-$(document).on('click','.close-full-screen-btn',function () {
- var cameraId = $(this).attr('camera-id');
+$(document).on('click','.close-fullscreen-btn',function () {
+ // Show all stream images
+ $('.camera-image').show();
- /**
- * Remove full-screen class to set the div on normal screen
- */
- $('.camera-container[camera-id='+cameraId+']').removeClass("full-screen");
-
- /**
- * Show and hide certain buttons
- */
- $('.delete-camera-btn[camera-id='+cameraId+']').show();
- $('.configure-camera-btn[camera-id='+cameraId+']').show();
- $('.timelapse-camera-btn[camera-id='+cameraId+']').show();
- $('.close-full-screen-container[camera-id='+cameraId+']').hide();
+ // Remove the fullscreen div
+ $('#fullscreen').remove();
});
/**
diff --git a/www/public/resources/js/motion.js b/www/public/resources/js/motion.js
index 96eba13b..ca16adb1 100644
--- a/www/public/resources/js/motion.js
+++ b/www/public/resources/js/motion.js
@@ -247,8 +247,17 @@ $(document).on('change','.event-date-input',function () {
$(document).on('click','.play-picture-btn',function () {
var fileId = $(this).attr('file-id');
- $('.event-print-file').html('');
- $('.event-print-file-container').css('display', 'flex');
+ html = '
'
+ + '
'
+ + ''
+ + '
'
+ + '
'
+ + ''
+ + '
'
+ + '
';
+
+ // Append the fullscreen div to the body
+ $('body').append(html);
});
/**
@@ -257,8 +266,17 @@ $(document).on('click','.play-picture-btn',function () {
$(document).on('click','.play-video-btn',function () {
var fileId = $(this).attr('file-id');
- $('.event-print-file').html('');
- $('.event-print-file-container').css('display', 'flex');
+ html = '
\ No newline at end of file
diff --git a/www/views/includes/containers/cameras/list.inc.php b/www/views/includes/containers/cameras/list.inc.php
index 853ceeec..bf02d887 100644
--- a/www/views/includes/containers/cameras/list.inc.php
+++ b/www/views/includes/containers/cameras/list.inc.php
@@ -126,10 +126,6 @@
-
-