mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Merge pull request #1235 from PepperDash/fix-volume-add-again
fix: move current volume action creation after power registrations
This commit is contained in:
@@ -116,6 +116,45 @@ namespace PepperDash.Essentials.RoomBridges
|
|||||||
if (Room is IRunDefaultPresentRoute defaultRoom)
|
if (Room is IRunDefaultPresentRoute defaultRoom)
|
||||||
AddAction("/defaultsource", (id, content) => defaultRoom.RunDefaultPresentRoute());
|
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)
|
if (Room is IHasCurrentVolumeControls volumeRoom)
|
||||||
{
|
{
|
||||||
volumeRoom.CurrentVolumeDeviceChange += Room_CurrentVolumeDeviceChange;
|
volumeRoom.CurrentVolumeDeviceChange += Room_CurrentVolumeDeviceChange;
|
||||||
@@ -163,7 +202,6 @@ namespace PepperDash.Essentials.RoomBridges
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
// Registers for initial volume events, if possible
|
// Registers for initial volume events, if possible
|
||||||
if (volumeRoom.CurrentVolumeControls is IBasicVolumeWithFeedback currentVolumeDevice)
|
if (volumeRoom.CurrentVolumeControls is IBasicVolumeWithFeedback currentVolumeDevice)
|
||||||
{
|
{
|
||||||
@@ -173,45 +211,6 @@ namespace PepperDash.Essentials.RoomBridges
|
|||||||
currentVolumeDevice.VolumeLevelFeedback.OutputChange += VolumeLevelFeedback_OutputChange;
|
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)
|
private void OnTouchPanelsUpdated(JToken content)
|
||||||
|
|||||||
Reference in New Issue
Block a user