fix monitor mute and unmute in Live Grid
parent
9baca18736
commit
27bd0a60f7
|
@ -734,6 +734,13 @@ function setSwitchUIState(systemSwitch,toggleState){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var dashboardSwitchCallbacks = {}
|
var dashboardSwitchCallbacks = {}
|
||||||
|
function runDashboardSwitchCallback(systemSwitch){
|
||||||
|
var theSwitches = dashboardOptions().switches
|
||||||
|
var afterAction = dashboardSwitchCallbacks[systemSwitch]
|
||||||
|
if(afterAction){
|
||||||
|
afterAction(theSwitches[systemSwitch])
|
||||||
|
}
|
||||||
|
}
|
||||||
function dashboardSwitch(systemSwitch){
|
function dashboardSwitch(systemSwitch){
|
||||||
var theSwitches = dashboardOptions().switches
|
var theSwitches = dashboardOptions().switches
|
||||||
if(!theSwitches){
|
if(!theSwitches){
|
||||||
|
@ -748,8 +755,7 @@ function dashboardSwitch(systemSwitch){
|
||||||
theSwitches[systemSwitch]=1
|
theSwitches[systemSwitch]=1
|
||||||
}
|
}
|
||||||
dashboardOptions('switches',theSwitches)
|
dashboardOptions('switches',theSwitches)
|
||||||
var afterAction = dashboardSwitchCallbacks[systemSwitch]
|
runDashboardSwitchCallback(systemSwitch)
|
||||||
if(afterAction)afterAction(theSwitches[systemSwitch])
|
|
||||||
setSwitchUIState(systemSwitch,theSwitches[systemSwitch])
|
setSwitchUIState(systemSwitch,theSwitches[systemSwitch])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1078,12 +1078,13 @@ $(document).ready(function(e){
|
||||||
dashboardSwitchCallbacks.monitorMuteAudio = function(toggleState){
|
dashboardSwitchCallbacks.monitorMuteAudio = function(toggleState){
|
||||||
var monitorMutes = dashboardOptions().monitorMutes || {}
|
var monitorMutes = dashboardOptions().monitorMutes || {}
|
||||||
$('.monitor_item video').each(function(n,vidEl){
|
$('.monitor_item video').each(function(n,vidEl){
|
||||||
var monitorId = $(this).parents('[mid]').attr('mid')
|
var el = $(this)
|
||||||
|
var monitorId = el.parents('[data-mid]').attr('data-mid')
|
||||||
if(toggleState === 1){
|
if(toggleState === 1){
|
||||||
vidEl.muted = true
|
el.attr('muted','muted')
|
||||||
}else{
|
}else{
|
||||||
if(monitorMutes[monitorId] !== 1){
|
if(monitorMutes[monitorId] !== 1){
|
||||||
vidEl.muted = false
|
el.removeAttr('muted')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue