mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Updates to mute toggle for ZoomRoom
This commit is contained in:
@@ -316,7 +316,7 @@ namespace PepperDash.Essentials.UIDrivers
|
|||||||
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var c = sender as ICommunicationMonitor;
|
var c = sender as ICommunicationMonitor;
|
||||||
if (StatusListDeviceIndexes.ContainsKey(c))
|
if (c != null && StatusListDeviceIndexes.ContainsKey(c))
|
||||||
{
|
{
|
||||||
var i = StatusListDeviceIndexes[c];
|
var i = StatusListDeviceIndexes[c];
|
||||||
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
||||||
|
|||||||
@@ -157,7 +157,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return () => CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0);
|
return () =>
|
||||||
|
{
|
||||||
|
var scaledVol = CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0);
|
||||||
|
|
||||||
|
if (Configuration.Audio.Output.Volume != 0)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Storing previous volume level as: {0}, scaled: {1}", Configuration.Audio.Output.Volume, scaledVol);
|
||||||
|
_previousVolumeLevel = scaledVol; // Store the previous level for recall
|
||||||
|
}
|
||||||
|
|
||||||
|
return scaledVol;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1684,12 +1695,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
public override void MuteOff()
|
public override void MuteOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Unmuting to previous level: {0}", _previousVolumeLevel);
|
||||||
SetVolume((ushort)_previousVolumeLevel);
|
SetVolume((ushort)_previousVolumeLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MuteOn()
|
public override void MuteOn()
|
||||||
{
|
{
|
||||||
_previousVolumeLevel = Configuration.Audio.Output.Volume; // Store the previous level for recall
|
|
||||||
|
|
||||||
SetVolume(0);
|
SetVolume(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user