if (cameraFrame.proto == 'mjpeg') {
/* no manual refresh for simple mjpeg cameras */
- img.src = cameraFrame.url;
+ img.src = cameraFrame.url.replace('127.0.0.1', window.location.host);
return;
}
if (dict['proto'] == 'mjpeg') {
mjpgUrl = dict['url'];
+ mjpgUrl = mjpgUrl.replace('127.0.0.1', window.location.host);
embedUrl = cameraUrl + 'frame/';
}
else {
if (snapshotUrl) {
snapshotUrl = addAuthParams('GET', snapshotUrl);
}
- if (mjpgUrl) {
+ if (mjpgUrl && dict['proto'] != 'mjpeg') {
mjpgUrl = addAuthParams('GET', mjpgUrl);
}
}
if (!this.img) {
this.img = $(this).find('img.camera')[0];
if (this.config['proto'] == 'mjpeg') {
- this.img.src = this.config['url'];
+ this.img.src = this.config['url'].replace('127.0.0.1', window.location.host);
}
}