fix(essentials): minor fixes to UI oddities

This commit is contained in:
Neil Dorin
2021-08-31 18:18:24 -06:00
parent adec25104c
commit 8539a6b79c

View File

@@ -181,6 +181,14 @@ namespace PepperDash.Essentials
private UiDisplayMode _currentMode; private UiDisplayMode _currentMode;
private bool _isZoomRoomWithNoExternalSources
{
get
{
return CurrentRoom.VideoCodec is Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom && _sourceListCount <= 1;
}
}
private uint _sourceListCount; private uint _sourceListCount;
/// <summary> /// <summary>
@@ -649,7 +657,7 @@ namespace PepperDash.Essentials
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
if (presentationMode && CurrentRoom.VideoCodec is IHasMeetingInfo && _sourceListCount < 2) if (presentationMode &&_isZoomRoomWithNoExternalSources)
{ {
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
@@ -704,25 +712,39 @@ namespace PepperDash.Essentials
if (VCDriver.IsVisible) if (VCDriver.IsVisible)
VCDriver.Hide(); VCDriver.Hide();
HideNextMeetingPopup(); HideNextMeetingPopup();
// Run default source when room is off and share is pressed
if (!CurrentRoom.OnFeedback.BoolValue)
{ if (_isZoomRoomWithNoExternalSources)
// If there's no default, show UI elements
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
}
else // room is on show what's active or select a source if nothing is yet active
{ {
if(CurrentRoom.CurrentSourceInfo == null || (CurrentRoom.VideoCodec != null && CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key)) (CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute();
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); // For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
else if (CurrentSourcePageManager != null) TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
if (CurrentSourcePageManager != null)
CurrentSourcePageManager.Hide();
}
else
{
// Run default source when room is off and share is pressed
if (!CurrentRoom.OnFeedback.BoolValue)
{ {
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); // If there's no default, show UI elements
CurrentSourcePageManager.Show(); if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
} }
else // room is on show what's active or select a source if nothing is yet active
{
if (CurrentRoom.CurrentSourceInfo == null || (CurrentRoom.VideoCodec != null && CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
else if (CurrentSourcePageManager != null)
{
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
CurrentSourcePageManager.Show();
}
}
SetupSourceList();
} }
CurrentMode = UiDisplayMode.Presentation; CurrentMode = UiDisplayMode.Presentation;
SetupSourceList();
} }
/// <summary> /// <summary>
@@ -761,7 +783,7 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void ShowCurrentSource() void ShowCurrentSource()
{ {
if (CurrentRoom.CurrentSourceInfo == null) if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources)
return; return;
CurrentMode = UiDisplayMode.Presentation; CurrentMode = UiDisplayMode.Presentation;