Merge branch 'release-1.34'

This commit is contained in:
Isaac Connor 2020-03-20 11:07:46 -04:00
commit 5a20ef959f
1 changed files with 22 additions and 14 deletions

View File

@ -48,7 +48,7 @@ function changeScale() {
streamImg.src = streamImg.src.replace(/scale=\d+/i, 'scale='+(scale== 'auto' ? autoScale : scale));
} else {
console.error('No element found for liveStream.');
console.error('No element found for liveStream'+monitorId);
}
}
@ -742,10 +742,14 @@ function handleClick( event ) {
function appletRefresh() {
if ( streamStatus && (!streamStatus.paused && !streamStatus.delayed) ) {
var streamImg = $('liveStream');
var streamImg = $('liveStream'+monitorId);
if ( streamImg ) {
var parent = streamImg.getParent();
streamImg.dispose();
streamImg.inject( parent );
} else {
console.error("Nothing found for liveStream"+monitorId);
}
if ( appletRefreshTime ) {
appletRefresh.delay( appletRefreshTime*1000 );
}
@ -798,11 +802,14 @@ function initPage() {
eventCmdTimer = eventCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout );
watchdogCheck.pass('event').periodical(eventsRefreshTimeout*2);
if ( canStreamNative || streamMode == 'single' ) {
if ( canStreamNative || (streamMode == 'single') ) {
var streamImg = $('imageFeed').getElement('img');
if ( !streamImg ) {
streamImg = $('imageFeed').getElement('object');
}
if ( !streamImg ) {
console.error('No streamImg found for imageFeed');
} else {
if ( streamMode == 'single' ) {
streamImg.addEvent('click', fetchImage.pass(streamImg));
fetchImage.pass(streamImg).periodical(imageRefreshTimeout);
@ -811,7 +818,8 @@ function initPage() {
handleClick(event);
});
}
}
} // end if have streamImg
} // streamMode native or single
if ( refreshApplet && appletRefreshTime ) {
appletRefresh.delay(appletRefreshTime*1000);