mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
fix(essentials): #1017 -Send command to select camera by ID
This commit is contained in:
@@ -366,26 +366,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
public void SelectCamera(string key)
|
public void SelectCamera(string key)
|
||||||
{
|
{
|
||||||
if (Cameras == null)
|
if (CameraIsMutedFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
return;
|
CameraMuteOff();
|
||||||
}
|
}
|
||||||
|
|
||||||
var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(key, StringComparison.OrdinalIgnoreCase) > -1);
|
SendText(string.Format("zConfiguration Video Camera selectedId: {0}", key));
|
||||||
if (camera != null)
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Selected Camera with key: '{0}'", camera.Key);
|
|
||||||
SelectedCamera = camera;
|
|
||||||
|
|
||||||
if (CameraIsMutedFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
CameraMuteOff();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unable to select camera with key: '{0}'", key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CameraBase FarEndCamera { get; private set; }
|
public CameraBase FarEndCamera { get; private set; }
|
||||||
@@ -648,8 +634,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
if (a.PropertyName == "SelectedId")
|
if (a.PropertyName == "SelectedId")
|
||||||
{
|
{
|
||||||
SelectCamera(Configuration.Video.Camera.SelectedId);
|
if (Cameras == null)
|
||||||
// this will in turn fire the affected feedbacks
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(Configuration.Video.Camera.SelectedId, StringComparison.OrdinalIgnoreCase) > -1);
|
||||||
|
if (camera != null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Camera selected with key: '{0}'", camera.Key);
|
||||||
|
|
||||||
|
SelectedCamera = camera;
|
||||||
|
|
||||||
|
if (CameraIsMutedFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
CameraMuteOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "No camera found with key: '{0}'", Configuration.Video.Camera.SelectedId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user