if (cameraFrame.proto == 'mjpeg') {
/* no manual refresh for simple mjpeg cameras */
- var url = cameraFrame.url.replace('127.0.0.1', window.location.host);
+ var url = cameraFrame.url.replace('127.0.0.1', window.location.host.split(':')[0]);
url += (url.indexOf('?') > 0 ? '&' : '?') + '_=' + new Date().getTime();
img.src = url;
return;
if (dict['proto'] == 'mjpeg') {
mjpgUrl = dict['url'];
- mjpgUrl = mjpgUrl.replace('127.0.0.1', window.location.host);
+ mjpgUrl = mjpgUrl.replace('127.0.0.1', window.location.host.split(':')[0]);
embedUrl = cameraUrl + 'frame/';
}
else {
if (!this.img) {
this.img = $(this).find('img.camera')[0];
if (this.config['proto'] == 'mjpeg') {
- var url = this.config['url'].replace('127.0.0.1', window.location.host);
+ var url = this.config['url'].replace('127.0.0.1', window.location.host.split(':')[0]);
url += (url.indexOf('?') > 0 ? '&' : '?') + '_=' + new Date().getTime();
this.img.src = url;
}