Merge branch 'reload_stream_on_error' into storageareas

This commit is contained in:
Isaac Connor 2016-04-04 16:13:26 -04:00
commit 98fce7c3c6
1 changed files with 6 additions and 1 deletions

View File

@ -205,8 +205,13 @@ function getStreamCmdResponse( respObj, respText )
$('enableDisableAlarms').removeClass( 'hidden' );
}
}
else
else {
checkStreamForErrors("getStreamCmdResponse",respObj);//log them
// Try to reload the image stream.
var streamImg = document.getElementById('liveStream');
if ( streamImg )
streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) ));
}
var streamCmdTimeout = statusRefreshTimeout;
if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT )