-> add an autoupdate mechanism
--> cache jpegs from remote cameras locally
--> cache prevention query arg should be according to the refresh rate
-> the camera is not available on page load, it is never shown afterwards - increase the timeout
-> click to zoom on cameras
-> make camera frames positions configurable
return;
}
- function refreshCameraFrame(cameraId, img) {
- img.src = '/snapshot/' + cameraId + '/current/?_=' + new Date().getTime();
+ function refreshCameraFrame(cameraId, img, fast) {
+ var timestamp = new Date().getTime();
+ if (!fast) {
+ timestamp /= 500;
+ }
+ timestamp = Math.round(timestamp);
+ img.src = '/snapshot/' + cameraId + '/current/?_=' + timestamp;
}
var cameraFrames = $('div.page-container').find('div.camera-frame');
}
else {
var cameraId = this.id.substring(6);
- refreshCameraFrame(cameraId, img);
+ refreshCameraFrame(cameraId, img, count <= 2); /* count <= 2 means at least 5 fps */
this.refreshDivider = 0;
}