the liveStream div now has the monitorId appended to it, so add that when we lookup the livestream and put a new rand on it to force a reload

This commit is contained in:
Isaac Connor 2016-08-31 12:53:34 -04:00
parent 824d7c5b43
commit f35fe185fb
1 changed files with 6 additions and 2 deletions

View File

@ -213,9 +213,13 @@ function getStreamCmdResponse( respObj, respText )
else {
checkStreamForErrors("getStreamCmdResponse",respObj);//log them
// Try to reload the image stream.
var streamImg = document.getElementById('liveStream');
if ( streamImg )
var streamImg = document.getElementById('liveStream'+monitorId);
if ( streamImg ) {
streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) ));
console.log("Changing lviestream src to " + streamImg.src);
} else {
console.log("Unable to find streamImg liveStream");
}
}
var streamCmdTimeout = statusRefreshTimeout;