mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-10 10:15:01 +00:00
Add camera off and auto stuff to Zoom Room
This commit is contained in:
@@ -60,8 +60,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public List<CodecActiveCallItem> ActiveCalls { get; set; }
|
||||
|
||||
public bool ShowSelfViewByDefault { get; protected set; }
|
||||
|
||||
public bool ShowSelfViewByDefault { get; protected set; }
|
||||
|
||||
protected bool SupportsCameraOff;
|
||||
protected bool SupportsCameraAutoMode;
|
||||
|
||||
public bool IsReady { get; protected set; }
|
||||
|
||||
@@ -305,8 +307,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
if (codec is IHasCameraAutoMode)
|
||||
{
|
||||
trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, true);
|
||||
trilist.SetBool(joinMap.CameraSupportsAutoMode.JoinNumber, SupportsCameraAutoMode);
|
||||
LinkVideoCodecCameraModeToApi(codec as IHasCameraAutoMode, trilist, joinMap);
|
||||
}
|
||||
|
||||
if (codec is IHasCameraOff)
|
||||
{
|
||||
trilist.SetBool(joinMap.CameraSupportsOffMode.JoinNumber, SupportsCameraOff);
|
||||
LinkVideoCodecCameraOffToApi(codec as IHasCameraOff, trilist, joinMap);
|
||||
}
|
||||
|
||||
if (codec is IHasCodecLayouts)
|
||||
@@ -364,8 +372,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
UpdateCallStatusXSig();
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LinkVideoCodecCameraOffToApi(IHasCameraOff codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
codec.CameraIsOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CameraModeOff.JoinNumber]);
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.CameraModeOff.JoinNumber, codec.CameraOff);
|
||||
}
|
||||
|
||||
private void LinkVideoCodecVolumeToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]);
|
||||
@@ -767,6 +782,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
trilist.BooleanInput[joinMap.CameraModeManual.JoinNumber]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void LinkVideoCodecSelfviewToApi(IHasCodecSelfView codec, BasicTriList trilist,
|
||||
VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public zConfiguration.Audio Audio { get; set; }
|
||||
public zConfiguration.Video Video { get; set; }
|
||||
public zConfiguration.Client Client { get; set; }
|
||||
public zConfiguration.Camera Camera { get; set; }
|
||||
|
||||
public ZoomRoomConfiguration()
|
||||
{
|
||||
@@ -93,6 +94,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
Audio = new zConfiguration.Audio();
|
||||
Video = new zConfiguration.Video();
|
||||
Client = new zConfiguration.Client();
|
||||
Camera = new zConfiguration.Camera();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,9 +700,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public bool OptimizeVideoSharing { get; set; }
|
||||
}
|
||||
|
||||
public class Camera
|
||||
public class Camera : NotifiableObject
|
||||
{
|
||||
public bool Mute { get; set; }
|
||||
private bool _mute;
|
||||
|
||||
public bool Mute
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mute;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _mute)
|
||||
{
|
||||
_mute = value;
|
||||
NotifyPropertyChanged("Mute");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Microphone : NotifiableObject
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
{
|
||||
public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
|
||||
IRouting,
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraAutoMode
|
||||
{
|
||||
private const long MeetingRefreshTimer = 60000;
|
||||
private const uint DefaultMeetingDurationMin = 30;
|
||||
@@ -92,6 +92,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
|
||||
|
||||
CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
|
||||
|
||||
CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
|
||||
|
||||
SetUpFeedbackActions();
|
||||
@@ -101,6 +103,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
SetUpDirectory();
|
||||
|
||||
Participants = new CodecParticipants();
|
||||
|
||||
SupportsCameraOff = _props.SupportsCameraOff;
|
||||
SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
|
||||
}
|
||||
|
||||
public CommunicationGather PortGather { get; private set; }
|
||||
@@ -174,6 +179,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
get { return () => !Configuration.Video.HideConfSelfVideo; }
|
||||
}
|
||||
|
||||
protected Func<bool> CameraIsOffFeedbackFunc
|
||||
{
|
||||
get { return () => !Configuration.Camera.Mute; }
|
||||
}
|
||||
|
||||
|
||||
protected Func<string> SelfviewPipPositionFeedbackFunc
|
||||
{
|
||||
get { return () => ""; }
|
||||
@@ -415,6 +426,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
};
|
||||
|
||||
Configuration.Camera.PropertyChanged += (o, a) =>
|
||||
{
|
||||
if (a.PropertyName != "Mute") return;
|
||||
|
||||
CameraIsOffFeedback.FireUpdate();
|
||||
};
|
||||
|
||||
Status.Call.Sharing.PropertyChanged += (o, a) =>
|
||||
{
|
||||
if (a.PropertyName == "State")
|
||||
@@ -961,13 +979,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
break;
|
||||
}
|
||||
case "bookings":
|
||||
case "bookings updated":
|
||||
{
|
||||
// Bookings have been updated, trigger a query to retreive the new bookings
|
||||
if (responseObj["Updated"] != null)
|
||||
{
|
||||
GetBookings();
|
||||
}
|
||||
GetBookings();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1560,6 +1574,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public CodecParticipants Participants { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Implementation of IHasCameraOff
|
||||
|
||||
public BoolFeedback CameraIsOffFeedback { get; private set; }
|
||||
|
||||
public void CameraOff()
|
||||
{
|
||||
SendText("zCommand Call Camera Mute: On");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Implementation of IHasCameraAutoMode
|
||||
//Zoom doesn't support camera auto modes. Setting this to just unmute video
|
||||
public void CameraAutoModeOn()
|
||||
{
|
||||
throw new NotImplementedException("Zoom Room Doesn't support camera auto mode");
|
||||
}
|
||||
|
||||
//Zoom doesn't support camera auto modes. Setting this to just unmute video
|
||||
public void CameraAutoModeOff()
|
||||
{
|
||||
SendText("zCommand Call Camera Mute: Off");
|
||||
}
|
||||
|
||||
public void CameraAutoModeToggle()
|
||||
{
|
||||
throw new NotImplementedException("Zoom Room doesn't support camera auto mode");
|
||||
}
|
||||
|
||||
public BoolFeedback CameraAutoModeIsOnFeedback { get; private set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -14,5 +14,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
public bool DisablePhonebookAutoDownload { get; set; }
|
||||
public bool SupportsCameraAutoMode { get; set; }
|
||||
public bool SupportsCameraOff { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user