fix: Multiple fixes

Update to poll meetings every 60 seconds
Add property to allow for adjusting when Join button appears
Refactor call connected event handler
Adjust text for header for sharing-only meeting
Add logic to handle waiting for host state
This commit is contained in:
Andrew Welker
2021-09-16 07:15:26 -06:00
parent 4ffea1c98f
commit fe01842523
8 changed files with 249 additions and 116 deletions

View File

@@ -195,22 +195,11 @@ namespace PepperDash.Essentials
var meetingInfoCodec = codec as IHasMeetingInfo; var meetingInfoCodec = codec as IHasMeetingInfo;
// Set mode of header button // Set mode of header button
if (!codec.IsInCall) SetHeaderCallIcon(codec);
{
HeaderCallButtonIconSig.StringValue = "DND";
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
}
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
else
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
// Set the call status text // Set the call status text
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count); Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
if (codec.ActiveCalls.Count > 0) if (codec.ActiveCalls.Count > 0)
{ {
if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null) if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null)
@@ -218,8 +207,13 @@ namespace PepperDash.Essentials
else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null) else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null)
{ {
var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting
? "Sharing Active" ? "Sharing-Only Meeting"
: "Active Meeting"; : "Active Meeting";
headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost
? "Waiting For Host"
: headerCallStatusLabel;
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel); TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel);
} }
else if (codec.ActiveCalls.Count > 1) else if (codec.ActiveCalls.Count > 1)
@@ -229,6 +223,27 @@ namespace PepperDash.Essentials
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls"); TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls");
} }
private void SetHeaderCallIcon(VideoCodecBase codec)
{
if (!codec.IsInCall)
{
HeaderCallButtonIconSig.StringValue = "DND";
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
}
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
{
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
}
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
else
{
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
}
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
}
/// <summary> /// <summary>
/// Sets up Header Buttons for the EssentialsHuddleVtc1Room type /// Sets up Header Buttons for the EssentialsHuddleVtc1Room type
/// </summary> /// </summary>

View File

@@ -471,85 +471,92 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void ShowNextMeetingTimerCallback() void ShowNextMeetingTimerCallback()
{ {
//Update calendar for Zoom. Zoom doesn't automatically update when meetings are in the past
if (_isZoomRoomWithNoExternalSources)
{
CurrentRoom.ScheduleSource.GetSchedule();
}
// Every 60 seconds, refresh the calendar // Every 60 seconds, refresh the calendar
RefreshMeetingsList(); RefreshMeetingsList();
// check meetings list for the closest, joinable meeting // check meetings list for the closest, joinable meeting
var ss = CurrentRoom.ScheduleSource; var ss = CurrentRoom.ScheduleSource;
var meetings = ss.CodecSchedule.Meetings; var meetings = ss.CodecSchedule.Meetings;
if (meetings.Count > 0) if (meetings.Count <= 0)
{ {
// If the room is off pester the user return;
// If the room is on, and the meeting is joinable }
// and the LastMeetingDismissed != this meeting // If the room is off pester the user
// If the room is on, and the meeting is joinable
// and the LastMeetingDismissed != this meeting
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId); var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*", Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
CurrentRoom.OnFeedback.BoolValue, CurrentRoom.OnFeedback.BoolValue,
LastMeetingDismissedId, LastMeetingDismissedId,
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : ""); lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
var meeting = meetings.LastOrDefault(m => m.Joinable); var meeting = meetings.LastOrDefault(m => m.Joinable);
if (CurrentRoom.OnFeedback.BoolValue if (CurrentRoom.OnFeedback.BoolValue
&& lastMeetingDismissed == meeting) && lastMeetingDismissed == meeting)
{ {
// meeting no longer joinable, hide popup // meeting no longer joinable, hide popup
if(meeting == null) if(meeting == null)
HideNextMeetingPopup(); HideNextMeetingPopup();
return; return;
} }
LastMeetingDismissedId = null; LastMeetingDismissedId = null;
// Clear the popup when we run out of meetings // Clear the popup when we run out of meetings
if (meeting == null) if (meeting == null)
{ {
HideNextMeetingPopup(); HideNextMeetingPopup();
} }
else else
{ {
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting"); TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture)); TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture)); TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title); TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer); TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join"); TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () => TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
{ {
HideNextMeetingPopup(); HideNextMeetingPopup();
PopupInterlock.Hide(); PopupInterlock.Hide();
RoomOnAndDialMeeting(meeting); RoomOnAndDialMeeting(meeting);
}); });
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule"); TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () => TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
{ {
HideNextMeetingPopup(); HideNextMeetingPopup();
//CalendarPress(); //CalendarPress();
RefreshMeetingsList(); RefreshMeetingsList();
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible); PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
}); });
var indexOfNext = meetings.IndexOf(meeting) + 1; var indexOfNext = meetings.IndexOf(meeting) + 1;
// indexOf = 3, 4 meetings : // indexOf = 3, 4 meetings :
if (indexOfNext < meetings.Count) if (indexOfNext < meetings.Count)
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
meetings[indexOfNext].StartTime.ToString("t", Global.Culture)); meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
else else
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today"); TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () => TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
{ {
// Mark the meeting to not re-harass the user // Mark the meeting to not re-harass the user
if(CurrentRoom.OnFeedback.BoolValue) if(CurrentRoom.OnFeedback.BoolValue)
LastMeetingDismissedId = meeting.Id; LastMeetingDismissedId = meeting.Id;
HideNextMeetingPopup(); HideNextMeetingPopup();
}); });
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true); TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
} }
}
} }
/// <summary> /// <summary>
@@ -575,19 +582,26 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void RoomOnAndDialMeeting(Meeting meeting) void RoomOnAndDialMeeting(Meeting meeting)
{ {
Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting);
Action dialAction = () => Action dialAction = () =>
{ {
var d = CurrentRoom.ScheduleSource as VideoCodecBase; var d = CurrentRoom.ScheduleSource as VideoCodecBase;
if (d != null) if (d != null)
{ {
Debug.Console(1,
"[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting);
d.Dial(meeting); d.Dial(meeting);
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
} }
}; };
if (CurrentRoom.OnFeedback.BoolValue) if (CurrentRoom.OnFeedback.BoolValue)
dialAction(); {
Debug.Console(1, "[RoomOnAndDialMeeting] Room is on.");
dialAction();
}
else else
{ {
Debug.Console(1, "RoomOnAndDialMeeting] Room is off or warming. Registering for Warming Feedback");
// Rig a one-time handler to catch when the room is warmed and then dial call // Rig a one-time handler to catch when the room is warmed and then dial call
EventHandler<FeedbackEventArgs> oneTimeHandler = null; EventHandler<FeedbackEventArgs> oneTimeHandler = null;
oneTimeHandler = (o, a) => oneTimeHandler = (o, a) =>
@@ -1086,13 +1100,18 @@ namespace PepperDash.Essentials
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e) void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
{ {
if (e.Info == null)
{
return;
}
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id); TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host); TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name); TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password); TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
// Show the password fields if one is present // Show the password fields if one is present
TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, string.IsNullOrEmpty(e.Info.Password) ? false : true); TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, !string.IsNullOrEmpty(e.Info.Password));
TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus); TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus);
@@ -1302,9 +1321,8 @@ namespace PepperDash.Essentials
{ {
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time? // See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
// Let's build list from event // Let's build list from event
// CurrentRoom.ScheduleSource.GetSchedule();
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar"); TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings"); TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
ushort i = 0; ushort i = 0;

View File

@@ -327,20 +327,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
{ {
case eCodecCallStatus.Connected: case eCodecCallStatus.Connected:
// fire at SRL item // fire at SRL item
HidePasswordPrompt();
KeypadMode = eKeypadMode.DTMF;
DialStringBuilder.Remove(0, DialStringBuilder.Length);
DialStringFeedback.FireUpdate();
DialStringTextCheckEnables();
Parent.ShowNotificationRibbon("Connected", 2000); Parent.ShowNotificationRibbon("Connected", 2000);
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); OnCallConnected();
ShowKeypad();
((Parent.CurrentRoom as IHasCurrentVolumeControls).CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff();
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); //VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
break; break;
case eCodecCallStatus.Connecting: case eCodecCallStatus.Connecting:
// fire at SRL item // fire at SRL item
Parent.ShowNotificationRibbon("Connecting", 0); Parent.ShowNotificationRibbon("Connecting", 0);
OnCallConnected();
break; break;
case eCodecCallStatus.Dialing: case eCodecCallStatus.Dialing:
Parent.ShowNotificationRibbon("Connecting", 0); Parent.ShowNotificationRibbon("Connecting", 0);
@@ -417,6 +411,36 @@ namespace PepperDash.Essentials.UIDrivers.VC
UpdateHeaderActiveCallList(); UpdateHeaderActiveCallList();
} }
private void OnCallConnected()
{
HidePasswordPrompt();
KeypadMode = eKeypadMode.DTMF;
DialStringBuilder.Remove(0, DialStringBuilder.Length);
DialStringFeedback.FireUpdate();
DialStringTextCheckEnables();
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
ShowKeypad();
UnmuteRoomOnCallConnect();
}
private void UnmuteRoomOnCallConnect()
{
var volControl = Parent.CurrentRoom as IHasCurrentVolumeControls;
if (volControl == null)
{
return;
}
var currentVolControls = volControl.CurrentVolumeControls as IBasicVolumeWithFeedback;
if (currentVolControls != null)
{
currentVolControls.MuteOff();
}
}
/// <summary> /// <summary>
/// Redraws the calls list on the header /// Redraws the calls list on the header
/// </summary> /// </summary>

View File

@@ -235,6 +235,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{ {
Calls = new List<Call>(); Calls = new List<Call>();
} }
#region Overrides of Object
public override string ToString()
{
return String.Format("{0}:{1}: {2}-{3}", Title, Agenda, StartTime, EndTime);
}
#endregion
} }
public class Call public class Call

View File

@@ -38,8 +38,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
public Boolean IsHost { get; private set; } public Boolean IsHost { get; private set; }
[JsonProperty("isSharingMeeting")] [JsonProperty("isSharingMeeting")]
public Boolean IsSharingMeeting { get; private set; } public Boolean IsSharingMeeting { get; private set; }
[JsonProperty("waitingForHost")]
public Boolean WaitingForHost { get; private set; }
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting) public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost)
{ {
Id = id; Id = id;
Name = name; Name = name;
@@ -48,6 +50,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
ShareStatus = shareStatus; ShareStatus = shareStatus;
IsHost = isHost; IsHost = isHost;
IsSharingMeeting = isSharingMeeting; IsSharingMeeting = isSharingMeeting;
WaitingForHost = waitingForHost;
} }
} }

View File

@@ -59,6 +59,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; } public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; } public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
public zEvent.PhoneCallStatus PhoneCall { get; set; } public zEvent.PhoneCallStatus PhoneCall { get; set; }
public zEvent.NeedWaitForHost NeedWaitForHost { get; set; }
public ZoomRoomStatus() public ZoomRoomStatus()
{ {
@@ -76,6 +77,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>(); AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>(); Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
PhoneCall = new zEvent.PhoneCallStatus(); PhoneCall = new zEvent.PhoneCallStatus();
NeedWaitForHost = new zEvent.NeedWaitForHost();
} }
} }
@@ -1475,6 +1477,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public static List<Participant> GetGenericParticipantListFromParticipantsResult( public static List<Participant> GetGenericParticipantListFromParticipantsResult(
List<ListParticipant> participants) List<ListParticipant> participants)
{ {
if (participants.Count == 0)
{
return new List<Participant>();
}
//return participants.Select(p => new Participant //return participants.Select(p => new Participant
// { // {
// UserId = p.UserId, // UserId = p.UserId,

View File

@@ -112,6 +112,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer); CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
if (_props.MinutesBeforeMeetingStart > 0)
{
CodecSchedule.MeetingWarningMinutes = _props.MinutesBeforeMeetingStart;
}
ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
@@ -494,19 +499,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
var sharingStatus = GetSharingStatus(); var sharingStatus = GetSharingStatus();
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true); MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false);
return; return;
} }
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None", var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting); MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
MeetingInfo = meetingInfo; MeetingInfo = meetingInfo;
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Console(1, this, "Error processing state property update. {0}", e.Message); Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
Debug.Console(2, this, e.StackTrace); Debug.Console(2, this, e.StackTrace);
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false); MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false);
} }
} }
@@ -657,7 +662,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
return; return;
} }
// Update the share status of the meeting info // Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting); var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
MeetingInfo = meetingInfo; MeetingInfo = meetingInfo;
break; break;
} }
@@ -1229,7 +1234,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Participants.CurrentParticipants = participants; Participants.CurrentParticipants = participants;
// Update the share status of the meeting info // Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus, GetIsHostMyself(), MeetingInfo.IsSharingMeeting); var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus, GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost);
MeetingInfo = meetingInfo; MeetingInfo = meetingInfo;
PrintCurrentCallParticipants(); PrintCurrentCallParticipants();
@@ -1424,15 +1429,40 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
case "needwaitforhost": case "needwaitforhost":
{ {
var needWait = Status.NeedWaitForHost = JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
if (needWait.Wait) Debug.Console(1, this, "NeedWaitForHost: {0}", Status.NeedWaitForHost.Wait);
{
// TODO: notify user to wait for host
}
break; if (Status.NeedWaitForHost.Wait)
{
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true);
UpdateCallStatus();
break;
}
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true);
UpdateCallStatus();
break;
}
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, false);
break;
}
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
GetSharingStatus(), GetIsHostMyself(), false, false);
break;
} }
case "openvideofailforhoststop": case "openvideofailforhoststop":
{ {
@@ -1514,7 +1544,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (result.Success) if (result.Success)
{ {
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true); MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost);
break; break;
} }
@@ -1704,8 +1734,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary> /// </summary>
private void UpdateCallStatus() private void UpdateCallStatus()
{ {
Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}", Debug.Console(1, this,
Status.Call != null ? Status.Call.Status.ToString() : "no call"); "[UpdateCallStatus] Current Call Status: {0} Active Call Count: {1} Need Wait For Host: {2}",
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count, Status.NeedWaitForHost.Wait);
if (Status.Call != null) if (Status.Call != null)
{ {
@@ -1750,17 +1781,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Type = eCodecCallType.Video, Type = eCodecCallType.Video,
}; };
if (!String.IsNullOrEmpty(_lastDialedMeetingNumber))
{
_lastDialedMeetingNumber = String.Empty;
}
ActiveCalls.Add(newCall); ActiveCalls.Add(newCall);
//Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
//Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
OnCallStatusChange(newCall); OnCallStatusChange(newCall);
} } else if (String.IsNullOrEmpty(Status.Call.Info.meeting_id) && Status.NeedWaitForHost.Wait)
else
{ {
//Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}", var newCall = new CodecActiveCallItem
//Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); {
Name = "Waiting For Host",
Number = "Waiting For Host",
Id = "Waiting For Host",
Status = newStatus,
Type = eCodecCallType.Video,
};
if (!String.IsNullOrEmpty(_lastDialedMeetingNumber))
{
_lastDialedMeetingNumber = String.Empty;
}
ActiveCalls.Add(newCall);
OnCallStatusChange(newCall);
} }
} }
} }
@@ -1771,9 +1817,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
switch (callStatus) switch (callStatus)
{ {
case zStatus.eCallStatus.IN_MEETING: case zStatus.eCallStatus.IN_MEETING:
if (Status.NeedWaitForHost.Wait)
{
Status.NeedWaitForHost.Wait = false;
}
existingCall.Status = eCodecCallStatus.Connected; existingCall.Status = eCodecCallStatus.Connected;
break; break;
case zStatus.eCallStatus.NOT_IN_MEETING: case zStatus.eCallStatus.NOT_IN_MEETING:
if (Status.NeedWaitForHost.Wait)
{
Status.NeedWaitForHost.Wait = false;
}
existingCall.Status = eCodecCallStatus.Disconnected; existingCall.Status = eCodecCallStatus.Disconnected;
break; break;
} }
@@ -1781,6 +1835,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}", Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
OnCallStatusChange(existingCall); OnCallStatusChange(existingCall);
} }
} }
@@ -1833,7 +1888,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Status.Call.Info.meeting_password, Status.Call.Info.meeting_password,
GetSharingStatus(), GetSharingStatus(),
GetIsHostMyself(), GetIsHostMyself(),
!String.Equals(Status.Call.Info.meeting_type,"NORMAL") !String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
false
); );
} }

View File

@@ -25,5 +25,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
//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
public string DefaultCallLayout { get; set; } public string DefaultCallLayout { get; set; }
public int MinutesBeforeMeetingStart { get; set; }
} }
} }