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