mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Merge pull request #724 from PepperDash/hotfix/zoom-room-views
Hotfix/zoom room views
This commit is contained in:
@@ -122,6 +122,7 @@
|
|||||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||||
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
||||||
<Compile Include="Codec\iHasCallFavorites.cs" />
|
<Compile Include="Codec\iHasCallFavorites.cs" />
|
||||||
<Compile Include="Codec\iHasCallHistory.cs" />
|
<Compile Include="Codec\iHasCallHistory.cs" />
|
||||||
|
|||||||
@@ -90,5 +90,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
public bool HandIsRaisedFb { get; set; }
|
public bool HandIsRaisedFb { get; set; }
|
||||||
public bool IsPinnedFb { get; set; }
|
public bool IsPinnedFb { get; set; }
|
||||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
public int ScreenIndexIsPinnedToFb { get; set; }
|
||||||
|
|
||||||
|
public Participant()
|
||||||
|
{
|
||||||
|
// Initialize to -1 (no screen)
|
||||||
|
ScreenIndexIsPinnedToFb = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||||
|
{
|
||||||
|
public interface IHasSelfviewSize
|
||||||
|
{
|
||||||
|
StringFeedback SelfviewPipSizeFeedback { get; }
|
||||||
|
|
||||||
|
void SelfviewPipSizeSet(CodecCommandWithLabel size);
|
||||||
|
|
||||||
|
void SelfviewPipSizeToggle();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -530,28 +530,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||||
{
|
{
|
||||||
|
// make sure to update the values when the EISC comes online
|
||||||
|
trilist.OnlineStatusChange += (sender, args) =>
|
||||||
|
{
|
||||||
|
if (sender.IsOnline)
|
||||||
|
{
|
||||||
|
UpdateParticipantsXSig(codec, trilist, joinMap);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// set actions and update the values when the list changes
|
||||||
codec.Participants.ParticipantsListHasChanged += (sender, args) =>
|
codec.Participants.ParticipantsListHasChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
string participantsXSig;
|
|
||||||
|
|
||||||
if (codec.Participants.CurrentParticipants.Count == 0)
|
|
||||||
{
|
|
||||||
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
|
|
||||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
|
||||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants);
|
SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants);
|
||||||
|
|
||||||
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
|
UpdateParticipantsXSig(codec, trilist, joinMap);
|
||||||
|
|
||||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
|
||||||
|
|
||||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||||
|
{
|
||||||
|
string participantsXSig;
|
||||||
|
|
||||||
|
if (codec.Participants.CurrentParticipants.Count == 0)
|
||||||
|
{
|
||||||
|
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
|
||||||
|
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||||
|
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
|
||||||
|
|
||||||
|
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||||
|
|
||||||
|
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the actions for each participant in the list
|
/// Sets the actions for each participant in the list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -613,6 +628,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
{
|
{
|
||||||
if (meetingIndex >= maxParticipants * offset) break;
|
if (meetingIndex >= maxParticipants * offset) break;
|
||||||
|
|
||||||
|
Debug.Console(2, this,
|
||||||
|
@"Updating Participant on xsig:
|
||||||
|
Name: {0} (s{9})
|
||||||
|
AudioMute: {1} (d{10})
|
||||||
|
VideoMute: {2} (d{11})
|
||||||
|
CanMuteVideo: {3} (d{12})
|
||||||
|
CanUMuteVideo: {4} (d{13})
|
||||||
|
IsHost: {5} (d{14})
|
||||||
|
HandIsRaised: {6} (d{15})
|
||||||
|
IsPinned: {7} (d{16})
|
||||||
|
ScreenIndexIsPinnedTo: {8} (a{17})
|
||||||
|
",
|
||||||
|
participant.Name,
|
||||||
|
participant.AudioMuteFb,
|
||||||
|
participant.VideoMuteFb,
|
||||||
|
participant.CanMuteVideo,
|
||||||
|
participant.CanUnmuteVideo,
|
||||||
|
participant.IsHost,
|
||||||
|
participant.HandIsRaisedFb,
|
||||||
|
participant.IsPinnedFb,
|
||||||
|
participant.ScreenIndexIsPinnedToFb,
|
||||||
|
stringIndex + 1,
|
||||||
|
digitalIndex + 1,
|
||||||
|
digitalIndex + 2,
|
||||||
|
digitalIndex + 3,
|
||||||
|
digitalIndex + 4,
|
||||||
|
digitalIndex + 5,
|
||||||
|
digitalIndex + 6,
|
||||||
|
digitalIndex + 7,
|
||||||
|
analogIndex + 1
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//digitals
|
//digitals
|
||||||
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb);
|
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb);
|
||||||
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb);
|
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb);
|
||||||
@@ -622,6 +670,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
|
tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
|
||||||
tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb);
|
tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb);
|
||||||
|
|
||||||
|
Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes()));
|
||||||
|
|
||||||
//serials
|
//serials
|
||||||
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
|
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
|
||||||
|
|
||||||
@@ -657,7 +707,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
analogIndex += maxAnalogs;
|
analogIndex += maxAnalogs;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetXSigString(tokenArray);
|
var returnString = GetXSigString(tokenArray);
|
||||||
|
|
||||||
|
//Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString)));
|
||||||
|
|
||||||
|
|
||||||
|
return returnString;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||||
|
|||||||
@@ -1440,7 +1440,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
CanMuteVideo = p.IsVideoCanMuteByHost,
|
CanMuteVideo = p.IsVideoCanMuteByHost,
|
||||||
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
||||||
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
||||||
VideoMuteFb = p.VideoStatusIsSending,
|
VideoMuteFb = !p.VideoStatusIsSending,
|
||||||
HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid,
|
HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
@@ -1454,16 +1454,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
if (participants == null)
|
if (participants == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)");
|
//Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug testing
|
// debug testing
|
||||||
foreach (ListParticipant participant in participants)
|
//foreach (ListParticipant participant in participants)
|
||||||
{
|
//{
|
||||||
Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}",
|
// Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}",
|
||||||
participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString());
|
// participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString());
|
||||||
}
|
//}
|
||||||
|
|
||||||
List<ListParticipant> handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList();
|
List<ListParticipant> handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList();
|
||||||
|
|
||||||
@@ -1471,8 +1471,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
IOrderedEnumerable<ListParticipant> orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp);
|
IOrderedEnumerable<ListParticipant> orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp);
|
||||||
|
|
||||||
foreach (var participant in handRaisedParticipantsList)
|
//foreach (var participant in handRaisedParticipantsList)
|
||||||
Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId);
|
// Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ListParticipant> allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList();
|
List<ListParticipant> allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList();
|
||||||
@@ -1481,8 +1481,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
allOtherParticipantsList.OrderBy(p => p.UserName);
|
allOtherParticipantsList.OrderBy(p => p.UserName);
|
||||||
|
|
||||||
foreach (var participant in allOtherParticipantsList)
|
//foreach (var participant in allOtherParticipantsList)
|
||||||
Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId);
|
// Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// merge the lists
|
// merge the lists
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
|
public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
|
||||||
IRouting,
|
IRouting,
|
||||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
||||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute
|
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute, IHasSelfviewSize
|
||||||
{
|
{
|
||||||
private const long MeetingRefreshTimer = 60000;
|
private const long MeetingRefreshTimer = 60000;
|
||||||
private const uint DefaultMeetingDurationMin = 30;
|
private const uint DefaultMeetingDurationMin = 30;
|
||||||
@@ -109,6 +109,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
|
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
|
||||||
|
|
||||||
|
// TODO: #714 [ ] SelfviewPipSizeFeedback
|
||||||
|
SelfviewPipSizeFeedback = new StringFeedback(SelfviewPipSizeFeedbackFunc);
|
||||||
|
|
||||||
SetUpFeedbackActions();
|
SetUpFeedbackActions();
|
||||||
|
|
||||||
Cameras = new List<CameraBase>();
|
Cameras = new List<CameraBase>();
|
||||||
@@ -228,6 +231,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: #714 [ ] SelfviewPipSizeFeedbackFunc
|
||||||
|
protected Func<string> SelfviewPipSizeFeedbackFunc
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return
|
||||||
|
() =>
|
||||||
|
_currentSelfviewPipSize != null
|
||||||
|
? _currentSelfviewPipSize.Command ?? "Unknown"
|
||||||
|
: "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected Func<bool> LocalLayoutIsProminentFeedbackFunc
|
protected Func<bool> LocalLayoutIsProminentFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => false; }
|
get { return () => false; }
|
||||||
@@ -495,7 +511,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
case "Position":
|
case "Position":
|
||||||
{
|
{
|
||||||
ComputeSelfviewPipStatus();
|
ComputeSelfviewPipPositionStatus();
|
||||||
|
|
||||||
SelfviewPipPositionFeedback.FireUpdate();
|
SelfviewPipPositionFeedback.FireUpdate();
|
||||||
|
|
||||||
@@ -511,6 +527,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
LocalLayoutFeedback.FireUpdate();
|
LocalLayoutFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "Size":
|
||||||
|
{
|
||||||
|
// TODO: #714 [ ] SetupFeedbackActions >> Size
|
||||||
|
ComputeSelfviewPipSizeStatus();
|
||||||
|
|
||||||
|
SelfviewPipSizeFeedback.FireUpdate();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -522,7 +547,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
case "Position":
|
case "Position":
|
||||||
{
|
{
|
||||||
ComputeSelfviewPipStatus();
|
ComputeSelfviewPipPositionStatus();
|
||||||
|
|
||||||
SelfviewPipPositionFeedback.FireUpdate();
|
SelfviewPipPositionFeedback.FireUpdate();
|
||||||
|
|
||||||
@@ -596,21 +621,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
Status.Layout.PropertyChanged += (o, a) =>
|
Status.Layout.PropertyChanged += (o, a) =>
|
||||||
{
|
{
|
||||||
switch (a.PropertyName)
|
Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName);
|
||||||
|
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_Share_On_All_Screens":
|
case "can_switch_share_on_all_screens":
|
||||||
{
|
{
|
||||||
ComputeAvailableLayouts();
|
ComputeAvailableLayouts();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "is_In_First_Page":
|
case "is_in_first_page":
|
||||||
{
|
{
|
||||||
LayoutViewIsOnFirstPageFeedback.FireUpdate();
|
LayoutViewIsOnFirstPageFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "is_In_Last_Page":
|
case "is_in_last_page":
|
||||||
{
|
{
|
||||||
LayoutViewIsOnLastPageFeedback.FireUpdate();
|
LayoutViewIsOnLastPageFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
@@ -1319,6 +1345,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
var status = responseObj.ToObject<zEvent.PinStatusOfScreenNotification>();
|
var status = responseObj.ToObject<zEvent.PinStatusOfScreenNotification>();
|
||||||
|
|
||||||
|
Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex);
|
||||||
|
|
||||||
|
Participant alreadyPinnedParticipant = null;
|
||||||
|
|
||||||
|
// Check for a participant already pinned to the same screen index.
|
||||||
|
if (status.PinnedUserId > 0)
|
||||||
|
{
|
||||||
|
alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
|
||||||
|
|
||||||
|
// Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb.
|
||||||
|
if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.",
|
||||||
|
alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb);
|
||||||
|
alreadyPinnedParticipant.IsPinnedFb = false;
|
||||||
|
alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
|
var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
|
||||||
|
|
||||||
if (participant != null)
|
if (participant != null)
|
||||||
@@ -1330,13 +1375,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
|
participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
|
||||||
|
|
||||||
if (participant == null)
|
if (participant == null && alreadyPinnedParticipant == null)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex);
|
Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else if (participant != null)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, participant.UserId, status.ScreenIndex);
|
||||||
participant.IsPinnedFb = false;
|
participant.IsPinnedFb = false;
|
||||||
participant.ScreenIndexIsPinnedToFb = -1;
|
participant.ScreenIndexIsPinnedToFb = -1;
|
||||||
}
|
}
|
||||||
@@ -1483,7 +1529,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "****************************Call Participants***************************");
|
Debug.Console(1, this, "*************************** Call Participants **************************");
|
||||||
foreach (var participant in Participants.CurrentParticipants)
|
foreach (var participant in Participants.CurrentParticipants)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name,
|
Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name,
|
||||||
@@ -1570,7 +1616,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "****************************Active Calls*********************************");
|
Debug.Console(1, this, "*************************** Active Calls ********************************");
|
||||||
|
|
||||||
// Clean up any disconnected calls left in the list
|
// Clean up any disconnected calls left in the list
|
||||||
for (int i = 0; i < ActiveCalls.Count; i++)
|
for (int i = 0; i < ActiveCalls.Count; i++)
|
||||||
@@ -1586,7 +1632,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
if (!call.IsActiveCall)
|
if (!call.IsActiveCall)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "******Removing Inactive Call: {0}******", call.Name);
|
Debug.Console(1, this, "***** Removing Inactive Call: {0} *****", call.Name);
|
||||||
ActiveCalls.Remove(call);
|
ActiveCalls.Remove(call);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1772,8 +1818,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString());
|
trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString());
|
||||||
};
|
};
|
||||||
|
|
||||||
layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]);
|
|
||||||
trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail());
|
trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail());
|
||||||
|
|
||||||
|
layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]);
|
||||||
layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]);
|
layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]);
|
||||||
|
|
||||||
layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]);
|
layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]);
|
||||||
@@ -1806,6 +1853,42 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
// Set the value of the local property to be used when pinning a participant
|
// Set the value of the local property to be used when pinning a participant
|
||||||
trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u);
|
trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: #714 [ ] LinkZoomRoomToApi >> layoutSizeCoodec
|
||||||
|
var layoutSizeCodec = this as IHasSelfviewSize;
|
||||||
|
if (layoutSizeCodec != null)
|
||||||
|
{
|
||||||
|
trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle);
|
||||||
|
trilist.SetStringSigAction(joinMap.GetSetSelfviewPipSize.JoinNumber, (s) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var size = (zConfiguration.eLayoutSize)Enum.Parse(typeof(zConfiguration.eLayoutSize), s, true);
|
||||||
|
var cmd = SelfviewPipSizes.FirstOrDefault(c => c.Command.Equals(size.ToString()));
|
||||||
|
SelfviewPipSizeSet(cmd);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
trilist.OnlineStatusChange += (device, args) =>
|
||||||
|
{
|
||||||
|
if (!args.DeviceOnLine) return;
|
||||||
|
|
||||||
|
ComputeAvailableLayouts();
|
||||||
|
layoutsCodec.LocalLayoutFeedback.FireUpdate();
|
||||||
|
layoutsCodec.CanSwapContentWithThumbnailFeedback.FireUpdate();
|
||||||
|
layoutsCodec.ContentSwappedWithThumbnailFeedback.FireUpdate();
|
||||||
|
layoutsCodec.LayoutViewIsOnFirstPageFeedback.FireUpdate();
|
||||||
|
layoutsCodec.LayoutViewIsOnLastPageFeedback.FireUpdate();
|
||||||
|
pinCodec.NumberOfScreensFeedback.FireUpdate();
|
||||||
|
layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ExecuteSwitch(object selector)
|
public override void ExecuteSwitch(object selector)
|
||||||
@@ -2177,13 +2260,58 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
new CodecCommandWithLabel("DownLeft", "Lower Left")
|
new CodecCommandWithLabel("DownLeft", "Lower Left")
|
||||||
};
|
};
|
||||||
|
|
||||||
private void ComputeSelfviewPipStatus()
|
private void ComputeSelfviewPipPositionStatus()
|
||||||
{
|
{
|
||||||
_currentSelfviewPipPosition =
|
_currentSelfviewPipPosition =
|
||||||
SelfviewPipPositions.FirstOrDefault(
|
SelfviewPipPositions.FirstOrDefault(
|
||||||
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
|
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// TODO: #714 [ ] Implementation of IHasSelfviewPipSize
|
||||||
|
#region Implementation of IHasSelfviewPipSize
|
||||||
|
|
||||||
|
private CodecCommandWithLabel _currentSelfviewPipSize;
|
||||||
|
|
||||||
|
public StringFeedback SelfviewPipSizeFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void SelfviewPipSizeSet(CodecCommandWithLabel size)
|
||||||
|
{
|
||||||
|
SendText(String.Format("zConfiguration Call Layout Size: {0}", size.Command));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SelfviewPipSizeToggle()
|
||||||
|
{
|
||||||
|
if (_currentSelfviewPipSize != null)
|
||||||
|
{
|
||||||
|
var nextPipSizeIndex = SelfviewPipSizes.IndexOf(_currentSelfviewPipSize) + 1;
|
||||||
|
|
||||||
|
if (nextPipSizeIndex >= SelfviewPipSizes.Count)
|
||||||
|
// Check if we need to loop back to the first item in the list
|
||||||
|
nextPipSizeIndex = 0;
|
||||||
|
|
||||||
|
SelfviewPipSizeSet(SelfviewPipSizes[nextPipSizeIndex]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CodecCommandWithLabel> SelfviewPipSizes = new List<CodecCommandWithLabel>()
|
||||||
|
{
|
||||||
|
new CodecCommandWithLabel("Off", "Off"),
|
||||||
|
new CodecCommandWithLabel("Size1", "Size 1"),
|
||||||
|
new CodecCommandWithLabel("Size2", "Size 2"),
|
||||||
|
new CodecCommandWithLabel("Size3", "Size 3"),
|
||||||
|
new CodecCommandWithLabel("Strip", "Strip")
|
||||||
|
};
|
||||||
|
|
||||||
|
private void ComputeSelfviewPipSizeStatus()
|
||||||
|
{
|
||||||
|
_currentSelfviewPipSize =
|
||||||
|
SelfviewPipSizes.FirstOrDefault(
|
||||||
|
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Size.ToString().ToLower()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Implementation of IHasPhoneDialing
|
#region Implementation of IHasPhoneDialing
|
||||||
@@ -2240,9 +2368,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void ComputeAvailableLayouts()
|
private void ComputeAvailableLayouts()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "Computing available layouts...");
|
||||||
zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None;
|
zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None;
|
||||||
// TODO: #697 [X] Compute the avaialble layouts and set the value of AvailableLayouts
|
|
||||||
// Will need to test and confirm that this logic evaluates correctly
|
|
||||||
if (Status.Layout.can_Switch_Wall_View)
|
if (Status.Layout.can_Switch_Wall_View)
|
||||||
{
|
{
|
||||||
availableLayouts |= zConfiguration.eLayoutStyle.Gallery;
|
availableLayouts |= zConfiguration.eLayoutStyle.Gallery;
|
||||||
@@ -2265,6 +2392,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
availableLayouts |= zConfiguration.eLayoutStyle.Strip;
|
availableLayouts |= zConfiguration.eLayoutStyle.Strip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(1, this, "availablelayouts: {0}", availableLayouts);
|
||||||
|
|
||||||
var handler = AvailableLayoutsChanged;
|
var handler = AvailableLayoutsChanged;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
|
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
|
||||||
{
|
{
|
||||||
// TODO: #697 [X] Set join numbers
|
|
||||||
|
|
||||||
#region Digital
|
#region Digital
|
||||||
|
|
||||||
[JoinName("CanSwapContentWithThumbnail")]
|
[JoinName("CanSwapContentWithThumbnail")]
|
||||||
@@ -164,6 +162,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
JoinType = eJoinType.DigitalSerial
|
JoinType = eJoinType.DigitalSerial
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle
|
||||||
|
[JoinName("SelfviewPipSizeToggle")]
|
||||||
|
public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 231,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Toggles the selfview pip size, (aka layout size)",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
//[JoinName("ParticipantAudioMuteToggleStart")]
|
//[JoinName("ParticipantAudioMuteToggleStart")]
|
||||||
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
||||||
// new JoinData
|
// new JoinData
|
||||||
@@ -258,6 +271,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
JoinType = eJoinType.Serial
|
JoinType = eJoinType.Serial
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize
|
||||||
|
[JoinName("GetSetSelfviewPipSize")]
|
||||||
|
public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 230,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Sets and reports the selfview pip size, (aka layout size).",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.DigitalSerial
|
||||||
|
});
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ZoomRoomJoinMap(uint joinStart)
|
public ZoomRoomJoinMap(uint joinStart)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.0.45" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user