Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,45 @@ protected override void RegisterActions()
if (Room is IRunDefaultPresentRoute defaultRoom)
AddAction("/defaultsource", (id, content) => defaultRoom.RunDefaultPresentRoute());

if (Room is IHasCurrentSourceInfoChange sscRoom)
sscRoom.CurrentSourceChange += Room_CurrentSingleSourceChange;

if (Room is IEssentialsHuddleVtc1Room vtcRoom)
{
if (vtcRoom.ScheduleSource != null)
{
var key = vtcRoom.Key + "-" + Key;

if (!AppServerController.CheckForDeviceMessenger(key))
{
var scheduleMessenger = new IHasScheduleAwarenessMessenger(key, vtcRoom.ScheduleSource,
$"/room/{vtcRoom.Key}");
AppServerController.AddDeviceMessenger(scheduleMessenger);
}
}

vtcRoom.InCallFeedback.OutputChange += InCallFeedback_OutputChange;
}

if (Room is IPrivacy privacyRoom)
{
AddAction("/volumes/master/privacyMuteToggle", (id, content) => privacyRoom.PrivacyModeToggle());

privacyRoom.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
}


if (Room is IRunDefaultCallRoute defCallRm)
{
AddAction("/activityVideo", (id, content) => defCallRm.RunDefaultCallRoute());
}

Room.OnFeedback.OutputChange += OnFeedback_OutputChange;
Room.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
Room.IsWarmingUpFeedback.OutputChange += IsWarmingUpFeedback_OutputChange;

AddTechRoomActions();

if (Room is IHasCurrentVolumeControls volumeRoom)
{
volumeRoom.CurrentVolumeDeviceChange += Room_CurrentVolumeDeviceChange;
Expand Down Expand Up @@ -146,12 +185,12 @@ protected override void RegisterActions()
});

AddAction("/volumes/master/volumeUp", (id, content) => PressAndHoldHandler.HandlePressAndHold(DeviceKey, content, (b) =>
{
if (volumeRoom.CurrentVolumeControls is IBasicVolumeWithFeedback basicVolumeWithFeedback)
{
if (volumeRoom.CurrentVolumeControls is IBasicVolumeWithFeedback basicVolumeWithFeedback)
{
basicVolumeWithFeedback.VolumeUp(b);
}
basicVolumeWithFeedback.VolumeUp(b);
}
}
));

AddAction("/volumes/master/volumeDown", (id, content) => PressAndHoldHandler.HandlePressAndHold(DeviceKey, content, (b) =>
Expand All @@ -163,7 +202,6 @@ protected override void RegisterActions()
}
));


// Registers for initial volume events, if possible
if (volumeRoom.CurrentVolumeControls is IBasicVolumeWithFeedback currentVolumeDevice)
{
Expand All @@ -173,45 +211,6 @@ protected override void RegisterActions()
currentVolumeDevice.VolumeLevelFeedback.OutputChange += VolumeLevelFeedback_OutputChange;
}
}

if (Room is IHasCurrentSourceInfoChange sscRoom)
sscRoom.CurrentSourceChange += Room_CurrentSingleSourceChange;

if (Room is IEssentialsHuddleVtc1Room vtcRoom)
{
if (vtcRoom.ScheduleSource != null)
{
var key = vtcRoom.Key + "-" + Key;

if (!AppServerController.CheckForDeviceMessenger(key))
{
var scheduleMessenger = new IHasScheduleAwarenessMessenger(key, vtcRoom.ScheduleSource,
$"/room/{vtcRoom.Key}");
AppServerController.AddDeviceMessenger(scheduleMessenger);
}
}

vtcRoom.InCallFeedback.OutputChange += InCallFeedback_OutputChange;
}

if (Room is IPrivacy privacyRoom)
{
AddAction("/volumes/master/privacyMuteToggle", (id, content) => privacyRoom.PrivacyModeToggle());

privacyRoom.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
}


if (Room is IRunDefaultCallRoute defCallRm)
{
AddAction("/activityVideo", (id, content) => defCallRm.RunDefaultCallRoute());
}

Room.OnFeedback.OutputChange += OnFeedback_OutputChange;
Room.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
Room.IsWarmingUpFeedback.OutputChange += IsWarmingUpFeedback_OutputChange;

AddTechRoomActions();
}

private void OnTouchPanelsUpdated(JToken content)
Expand Down