fix: Update share behavior for Zoom Room

This commit is contained in:
Andrew Welker
2021-09-16 13:27:09 -06:00
parent fe01842523
commit 9f3a3f64a8
2 changed files with 29 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ using Crestron.SimplSharpPro.UI;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
using PepperDash.Essentials.Core.SmartObjects; using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.PageManagers; using PepperDash.Essentials.Core.PageManagers;
using PepperDash.Essentials.Room.Config; using PepperDash.Essentials.Room.Config;
@@ -729,17 +730,32 @@ namespace PepperDash.Essentials
if (_isZoomRoomWithNoExternalSources) if (_isZoomRoomWithNoExternalSources)
{
if (!CurrentRoom.OnFeedback.BoolValue)
{ {
CurrentRoom.RunDefaultPresentRoute(); CurrentRoom.RunDefaultPresentRoute();
}
// 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.ZoomRoomContentSharingVisible, true); TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting; var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting;
var farEndContentStatusCodec = CurrentRoom.VideoCodec as IHasFarEndContentStatus;
var receivingContent = false;
if (farEndContentStatusCodec != null)
{
receivingContent = farEndContentStatusCodec.ReceivingContent.BoolValue;
}
if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall) if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall)
{ {
presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop); presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop);
} }
else if (CurrentRoom.VideoCodec.IsInCall && !CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue &&
!receivingContent)
{
CurrentRoom.VideoCodec.StartSharing();
}
if (CurrentSourcePageManager != null) if (CurrentSourcePageManager != null)
CurrentSourcePageManager.Hide(); CurrentSourcePageManager.Hide();
@@ -755,7 +771,9 @@ namespace PepperDash.Essentials
} }
else // room is on show what's active or select a source if nothing is yet active 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)) if (CurrentRoom.CurrentSourceInfo == null ||
(CurrentRoom.VideoCodec != null &&
CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
else if (CurrentSourcePageManager != null) else if (CurrentSourcePageManager != null)
{ {

View File

@@ -656,6 +656,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName); Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName);
SharingContentIsOnFeedback.FireUpdate();
if (MeetingInfo == null) if (MeetingInfo == null)
{ {
//Ignoring for now, as the CallInfo return will create the appropriate value //Ignoring for now, as the CallInfo return will create the appropriate value
@@ -1978,9 +1979,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// Stops sharing the current presentation /// Stops sharing the current presentation
/// </summary> /// </summary>
public override void StopSharing() public override void StopSharing()
{
if (Status.Sharing.isSharingBlackMagic)
{
SendText("zCommand Call Sharing HDMI Stop");
}
else
{ {
SendText("zCommand Call Sharing Disconnect"); SendText("zCommand Call Sharing Disconnect");
} }
}
public override void PrivacyModeOn() public override void PrivacyModeOn()
{ {