patch embed page
parent
ec9145fadb
commit
0b6fe3c5e4
|
@ -22,6 +22,9 @@ function onBuildStreamElement(callback){
|
||||||
onBuildStreamElementExtensions.push(callback)
|
onBuildStreamElementExtensions.push(callback)
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
function debugLog(...args){
|
||||||
|
console.log(...args)
|
||||||
|
}
|
||||||
function buildStreamElementHtml(streamType){
|
function buildStreamElementHtml(streamType){
|
||||||
var html = ''
|
var html = ''
|
||||||
if(window.jpegModeOn === true){
|
if(window.jpegModeOn === true){
|
||||||
|
@ -500,6 +503,26 @@ function requestMonitorInit(){
|
||||||
id: monitorId
|
id: monitorId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function toggleSubStream(monitorId,callback){
|
||||||
|
var monitor = loadedMonitors[monitorId]
|
||||||
|
var substreamConfig = monitor.details.substream
|
||||||
|
var isSubStreamConfigured = !!substreamConfig.output;
|
||||||
|
if(!isSubStreamConfigured){
|
||||||
|
new PNotify({
|
||||||
|
type: 'warning',
|
||||||
|
title: lang['Invalid Settings'],
|
||||||
|
text: lang.SubstreamNotConfigured,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(monitor.subStreamToggleLock)return false;
|
||||||
|
monitor.subStreamToggleLock = true
|
||||||
|
$.getJSON(getApiPrefix() + '/toggleSubstream/'+$user.ke+'/'+monitorId,function(d){
|
||||||
|
monitor.subStreamToggleLock = false
|
||||||
|
debugLog(d)
|
||||||
|
if(callback)callback()
|
||||||
|
})
|
||||||
|
}
|
||||||
$(document).ready(function(e){
|
$(document).ready(function(e){
|
||||||
$('body')
|
$('body')
|
||||||
.on('dblclick','.stream-block',function(){
|
.on('dblclick','.stream-block',function(){
|
||||||
|
|
Loading…
Reference in New Issue