Add Dynamic Substream Toggle button
parent
d46789b9b2
commit
6b3804a5b4
|
@ -7364,7 +7364,8 @@ module.exports = function(s,config,lang){
|
|||
<div class="monitor_details">
|
||||
<div class="pull-left">
|
||||
<a title="${lang['Options']}" class="btn btn-sm badge btn-secondary toggle-live-grid-monitor-menu"><i class="fa fa-bars"></i></a>
|
||||
<a title="${lang['Edit']}" class="btn btn-sm badge btn-primary default open-monitor-settings"><i class="fa fa-wrench"></i></a>
|
||||
<a title="${lang['Edit']}" class="btn btn-sm badge btn-primary open-monitor-settings"><i class="fa fa-wrench"></i></a>
|
||||
<a title="${lang['Toggle Substream']}" class="btn btn-sm badge btn-secondary toggle-monitor-substream"><i class="fa fa-eye"></i></a>
|
||||
<a title="${lang['Snapshot']}" class="btn btn-sm badge btn-warning snapshot-live-grid-monitor"><i class="fa fa-camera"></i></a>
|
||||
<a title="${lang['Videos List']}" class="btn btn-sm badge btn-secondary open-videos"><i class="fa fa-film"></i></a>
|
||||
<a title="${lang['Show Logs']}" class="btn btn-sm badge btn-warning toggle-live-grid-monitor-logs"><i class="fa fa-exclamation-triangle"></i></a>
|
||||
|
@ -7396,6 +7397,11 @@ module.exports = function(s,config,lang){
|
|||
"class": "warning toggle-live-grid-monitor-logs",
|
||||
"icon": "exclamation-triangle"
|
||||
},
|
||||
"Show Logs": {
|
||||
"label": lang['Toggle Substream'],
|
||||
"class": "warning toggle-monitor-substream",
|
||||
"icon": "eye"
|
||||
},
|
||||
"Control": {
|
||||
"label": lang['Control'],
|
||||
"class": "default toggle-live-grid-monitor-ptz-controls",
|
||||
|
|
|
@ -646,8 +646,7 @@ module.exports = (s,config,lang,app,io) => {
|
|||
})
|
||||
const eventDetails = d.details
|
||||
const passedEventFilters = checkEventFilters(d,monitorDetails,filter)
|
||||
if(!passedEventFilters)return
|
||||
const detailString = JSON.stringify(eventDetails)
|
||||
if(!passedEventFilters)return;
|
||||
const eventTime = new Date()
|
||||
if(
|
||||
filter.addToMotionCounter &&
|
||||
|
|
|
@ -900,6 +900,10 @@ $(document).ready(function(e){
|
|||
var monitorId = $(this).parents('[data-mid]').attr('data-mid')
|
||||
popOutMonitor(monitorId)
|
||||
})
|
||||
.on('click','.toggle-monitor-substream',function(){
|
||||
var monitorId = $(this).parents('[data-mid]').attr('data-mid')
|
||||
toggleSubStream(monitorId)
|
||||
})
|
||||
.on('click','.run-live-grid-monitor-ptz',function(){
|
||||
var el = $(this)
|
||||
var monitorId = el.parents('[data-mid]').attr('data-mid')
|
||||
|
|
|
@ -170,7 +170,12 @@ function runTestDetectionTrigger(monitorId,callback){
|
|||
if(callback)callback()
|
||||
})
|
||||
}
|
||||
|
||||
function toggleSubStream(monitorId,callback){
|
||||
$.getJSON(getApiPrefix() + '/toggleSubstream/'+$user.ke+'/'+monitorId,function(d){
|
||||
debugLog(d)
|
||||
if(callback)callback()
|
||||
})
|
||||
}
|
||||
function playAudioAlert(){
|
||||
var fileName = $user.details.audio_alert
|
||||
if(fileName && window.soundAlarmed !== true){
|
||||
|
|
Loading…
Reference in New Issue