mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
fix(essentials): Updates to deal with layouts and default layout for ZoomRoom
This commit is contained in:
@@ -21,11 +21,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="password"></param>
|
/// <param name="password"></param>
|
||||||
void SubmitPassword(string password);
|
void SubmitPassword(string password);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Cancels the password submission
|
|
||||||
/// </summary>
|
|
||||||
void CancelPasswordPrompt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PasswordPromptEventArgs : EventArgs
|
public class PasswordPromptEventArgs : EventArgs
|
||||||
|
|||||||
@@ -627,6 +627,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
// backer variables
|
// backer variables
|
||||||
private bool _can_Switch_Speaker_View;
|
private bool _can_Switch_Speaker_View;
|
||||||
private bool _can_Switch_Wall_View;
|
private bool _can_Switch_Wall_View;
|
||||||
|
private bool _can_Switch_Strip_View;
|
||||||
private bool _can_Switch_Share_On_All_Screens;
|
private bool _can_Switch_Share_On_All_Screens;
|
||||||
private bool _can_Switch_Floating_Share_Content;
|
private bool _can_Switch_Floating_Share_Content;
|
||||||
private bool _is_In_First_Page;
|
private bool _is_In_First_Page;
|
||||||
@@ -714,6 +715,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonProperty("can_Switch_Strip_View")]
|
||||||
|
public bool can_Switch_Strip_View
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _can_Switch_Strip_View;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != _can_Switch_Strip_View)
|
||||||
|
{
|
||||||
|
_can_Switch_Strip_View = value;
|
||||||
|
NotifyPropertyChanged("can_Switch_Strip_View");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("is_In_First_Page")]
|
[JsonProperty("is_In_First_Page")]
|
||||||
public bool is_In_First_Page
|
public bool is_In_First_Page
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -810,8 +810,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName);
|
Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName);
|
||||||
switch (a.PropertyName.ToLower())
|
switch (a.PropertyName.ToLower())
|
||||||
{
|
{
|
||||||
case "can_switch_speaker_view":
|
case "can_Switch_speaker_view":
|
||||||
case "can_switch_wall_view":
|
case "can_switch_wall_view":
|
||||||
|
case "can_switch_strip_view":
|
||||||
|
case "video_type":
|
||||||
case "can_switch_share_on_all_screens":
|
case "can_switch_share_on_all_screens":
|
||||||
{
|
{
|
||||||
ComputeAvailableLayouts();
|
ComputeAvailableLayouts();
|
||||||
@@ -827,7 +829,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
LayoutViewIsOnLastPageFeedback.FireUpdate();
|
LayoutViewIsOnLastPageFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "can_Switch_Floating_Share_Content":
|
case "can_switch_floating_share_content":
|
||||||
{
|
{
|
||||||
CanSwapContentWithThumbnailFeedback.FireUpdate();
|
CanSwapContentWithThumbnailFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
@@ -1559,7 +1561,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
|
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
|
||||||
|
|
||||||
SetLayout();
|
SetDefaultLayout();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1935,7 +1937,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetLayout()
|
private void SetDefaultLayout()
|
||||||
{
|
{
|
||||||
if (!_props.AutoDefaultLayouts) return;
|
if (!_props.AutoDefaultLayouts) return;
|
||||||
|
|
||||||
@@ -1948,8 +1950,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendText(String.Format("zconfiguration call layout style: {0}",
|
if (_props.DefaultCallLayout == (_props.DefaultCallLayout & AvailableLayouts))
|
||||||
_props.DefaultCallLayout));
|
{
|
||||||
|
SendText(String.Format("zconfiguration call layout style: {0}",
|
||||||
|
_props.DefaultCallLayout));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Debug.Console(0, this, "Unable to set default Layout. {0} not currently an available layout based on meeting state", _props.DefaultCallLayout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2149,8 +2156,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
MeetingIsLockedFeedback.BoolValue,
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
MeetingIsRecordingFeedback.BoolValue
|
MeetingIsRecordingFeedback.BoolValue
|
||||||
);
|
);
|
||||||
|
|
||||||
|
SetDefaultLayout();
|
||||||
}
|
}
|
||||||
// TODO [ ] Issue #868
|
|
||||||
else if (item.Status == eCodecCallStatus.Disconnected)
|
else if (item.Status == eCodecCallStatus.Disconnected)
|
||||||
{
|
{
|
||||||
MeetingInfo = new MeetingInfo(
|
MeetingInfo = new MeetingInfo(
|
||||||
@@ -2171,11 +2180,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
|
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
||||||
|
|
||||||
if (_props.AutoDefaultLayouts)
|
|
||||||
{
|
|
||||||
SetLayout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetSharingStatus()
|
private string GetSharingStatus()
|
||||||
@@ -3264,7 +3268,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
// There is no property that directly reports if strip mode is valid, but API stipulates
|
// There is no property that directly reports if strip mode is valid, but API stipulates
|
||||||
// that strip mode is available if the number of screens is 1
|
// that strip mode is available if the number of screens is 1
|
||||||
if (Status.NumberOfScreens.NumOfScreens == 1)
|
if (Status.NumberOfScreens.NumOfScreens == 1 || Status.Layout.can_Switch_Strip_View || Status.Layout.video_type.ToLower() == "strip")
|
||||||
{
|
{
|
||||||
availableLayouts |= zConfiguration.eLayoutStyle.Strip;
|
availableLayouts |= zConfiguration.eLayoutStyle.Strip;
|
||||||
}
|
}
|
||||||
@@ -3279,10 +3283,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
var handler = LayoutInfoChanged;
|
var handler = LayoutInfoChanged;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var currentLayout = zConfiguration.eLayoutStyle.None;
|
||||||
|
|
||||||
|
currentLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle), string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue, true);
|
||||||
|
|
||||||
handler(this, new LayoutInfoChangedEventArgs()
|
handler(this, new LayoutInfoChangedEventArgs()
|
||||||
{
|
{
|
||||||
AvailableLayouts = AvailableLayouts,
|
AvailableLayouts = AvailableLayouts,
|
||||||
CurrentSelectedLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle),string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue , true),
|
CurrentSelectedLayout = currentLayout,
|
||||||
LayoutViewIsOnFirstPage = LayoutViewIsOnFirstPageFeedback.BoolValue,
|
LayoutViewIsOnFirstPage = LayoutViewIsOnFirstPageFeedback.BoolValue,
|
||||||
LayoutViewIsOnLastPage = LayoutViewIsOnLastPageFeedback.BoolValue,
|
LayoutViewIsOnLastPage = LayoutViewIsOnLastPageFeedback.BoolValue,
|
||||||
CanSwapContentWithThumbnail = CanSwapContentWithThumbnailFeedback.BoolValue,
|
CanSwapContentWithThumbnail = CanSwapContentWithThumbnailFeedback.BoolValue,
|
||||||
@@ -3415,11 +3424,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
//OnPasswordRequired(false, false, true, "");
|
//OnPasswordRequired(false, false, true, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CancelPasswordPrompt()
|
|
||||||
{
|
|
||||||
OnPasswordRequired(false, false, true, "Login Cancelled");
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnPasswordRequired(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
|
void OnPasswordRequired(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
|
||||||
{
|
{
|
||||||
var handler = PasswordRequired;
|
var handler = PasswordRequired;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
@@ -29,11 +30,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
/* This layout will be selected when Sharing starts (either from Far end or locally)*/
|
/* This layout will be selected when Sharing starts (either from Far end or locally)*/
|
||||||
[JsonProperty("defaultSharingLayout")]
|
[JsonProperty("defaultSharingLayout")]
|
||||||
public string DefaultSharingLayout { get; set; }
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public zConfiguration.eLayoutStyle DefaultSharingLayout { get; set; }
|
||||||
|
|
||||||
//This layout will be selected when a call is connected and no content is being shared
|
//This layout will be selected when a call is connected and no content is being shared
|
||||||
[JsonProperty("defaultCallLayout")]
|
[JsonProperty("defaultCallLayout")]
|
||||||
public string DefaultCallLayout { get; set; }
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public zConfiguration.eLayoutStyle DefaultCallLayout { get; set; }
|
||||||
|
|
||||||
[JsonProperty("minutesBeforeMeetingStart")]
|
[JsonProperty("minutesBeforeMeetingStart")]
|
||||||
public int MinutesBeforeMeetingStart { get; set; }
|
public int MinutesBeforeMeetingStart { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user