mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-30 21:04:48 +00:00
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:
@@ -195,22 +195,11 @@ namespace PepperDash.Essentials
|
||||
var meetingInfoCodec = codec as IHasMeetingInfo;
|
||||
|
||||
// Set mode of header button
|
||||
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);
|
||||
SetHeaderCallIcon(codec);
|
||||
|
||||
// Set the call status text
|
||||
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
|
||||
|
||||
if (codec.ActiveCalls.Count > 0)
|
||||
{
|
||||
if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null)
|
||||
@@ -218,8 +207,13 @@ namespace PepperDash.Essentials
|
||||
else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null)
|
||||
{
|
||||
var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting
|
||||
? "Sharing Active"
|
||||
? "Sharing-Only Meeting"
|
||||
: "Active Meeting";
|
||||
|
||||
headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost
|
||||
? "Waiting For Host"
|
||||
: headerCallStatusLabel;
|
||||
|
||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel);
|
||||
}
|
||||
else if (codec.ActiveCalls.Count > 1)
|
||||
@@ -229,6 +223,27 @@ namespace PepperDash.Essentials
|
||||
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>
|
||||
/// Sets up Header Buttons for the EssentialsHuddleVtc1Room type
|
||||
/// </summary>
|
||||
|
||||
@@ -471,85 +471,92 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
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
|
||||
RefreshMeetingsList();
|
||||
// check meetings list for the closest, joinable meeting
|
||||
var ss = CurrentRoom.ScheduleSource;
|
||||
var meetings = ss.CodecSchedule.Meetings;
|
||||
|
||||
if (meetings.Count > 0)
|
||||
{
|
||||
// If the room is off pester the user
|
||||
// If the room is on, and the meeting is joinable
|
||||
// and the LastMeetingDismissed != this meeting
|
||||
if (meetings.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 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);
|
||||
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
||||
CurrentRoom.OnFeedback.BoolValue,
|
||||
LastMeetingDismissedId,
|
||||
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
||||
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
||||
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
||||
CurrentRoom.OnFeedback.BoolValue,
|
||||
LastMeetingDismissedId,
|
||||
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
||||
|
||||
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
||||
if (CurrentRoom.OnFeedback.BoolValue
|
||||
&& lastMeetingDismissed == meeting)
|
||||
{
|
||||
// meeting no longer joinable, hide popup
|
||||
if(meeting == null)
|
||||
HideNextMeetingPopup();
|
||||
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
||||
if (CurrentRoom.OnFeedback.BoolValue
|
||||
&& lastMeetingDismissed == meeting)
|
||||
{
|
||||
// meeting no longer joinable, hide popup
|
||||
if(meeting == null)
|
||||
HideNextMeetingPopup();
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LastMeetingDismissedId = null;
|
||||
// Clear the popup when we run out of meetings
|
||||
if (meeting == null)
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
}
|
||||
else
|
||||
{
|
||||
LastMeetingDismissedId = null;
|
||||
// Clear the popup when we run out of meetings
|
||||
if (meeting == null)
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
|
||||
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
|
||||
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
||||
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
||||
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
PopupInterlock.Hide();
|
||||
RoomOnAndDialMeeting(meeting);
|
||||
});
|
||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
//CalendarPress();
|
||||
RefreshMeetingsList();
|
||||
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||
});
|
||||
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
|
||||
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
|
||||
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
||||
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
||||
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
PopupInterlock.Hide();
|
||||
RoomOnAndDialMeeting(meeting);
|
||||
});
|
||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
//CalendarPress();
|
||||
RefreshMeetingsList();
|
||||
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||
});
|
||||
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
||||
|
||||
// indexOf = 3, 4 meetings :
|
||||
if (indexOfNext < meetings.Count)
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||
meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
|
||||
else
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
||||
// indexOf = 3, 4 meetings :
|
||||
if (indexOfNext < meetings.Count)
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||
meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
|
||||
else
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
||||
{
|
||||
// Mark the meeting to not re-harass the user
|
||||
if(CurrentRoom.OnFeedback.BoolValue)
|
||||
LastMeetingDismissedId = meeting.Id;
|
||||
HideNextMeetingPopup();
|
||||
});
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
||||
{
|
||||
// Mark the meeting to not re-harass the user
|
||||
if(CurrentRoom.OnFeedback.BoolValue)
|
||||
LastMeetingDismissedId = meeting.Id;
|
||||
HideNextMeetingPopup();
|
||||
});
|
||||
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||
}
|
||||
}
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -575,19 +582,26 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void RoomOnAndDialMeeting(Meeting meeting)
|
||||
{
|
||||
Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting);
|
||||
Action dialAction = () =>
|
||||
{
|
||||
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
||||
if (d != null)
|
||||
{
|
||||
Debug.Console(1,
|
||||
"[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting);
|
||||
d.Dial(meeting);
|
||||
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
||||
}
|
||||
};
|
||||
if (CurrentRoom.OnFeedback.BoolValue)
|
||||
dialAction();
|
||||
if (CurrentRoom.OnFeedback.BoolValue)
|
||||
{
|
||||
Debug.Console(1, "[RoomOnAndDialMeeting] Room is on.");
|
||||
dialAction();
|
||||
}
|
||||
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
|
||||
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
||||
oneTimeHandler = (o, a) =>
|
||||
@@ -1086,13 +1100,18 @@ namespace PepperDash.Essentials
|
||||
|
||||
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
|
||||
{
|
||||
if (e.Info == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
|
||||
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
|
||||
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
|
||||
|
||||
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
|
||||
// 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);
|
||||
|
||||
@@ -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?
|
||||
// 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");
|
||||
|
||||
ushort i = 0;
|
||||
|
||||
@@ -327,20 +327,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
case eCodecCallStatus.Connected:
|
||||
// fire at SRL item
|
||||
HidePasswordPrompt();
|
||||
KeypadMode = eKeypadMode.DTMF;
|
||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||
DialStringFeedback.FireUpdate();
|
||||
DialStringTextCheckEnables();
|
||||
Parent.ShowNotificationRibbon("Connected", 2000);
|
||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
||||
ShowKeypad();
|
||||
((Parent.CurrentRoom as IHasCurrentVolumeControls).CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff();
|
||||
OnCallConnected();
|
||||
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
||||
break;
|
||||
case eCodecCallStatus.Connecting:
|
||||
// fire at SRL item
|
||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||
OnCallConnected();
|
||||
break;
|
||||
case eCodecCallStatus.Dialing:
|
||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||
@@ -417,6 +411,36 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
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>
|
||||
/// Redraws the calls list on the header
|
||||
/// </summary>
|
||||
|
||||
@@ -235,6 +235,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
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
|
||||
|
||||
@@ -38,8 +38,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
public Boolean IsHost { get; private set; }
|
||||
[JsonProperty("isSharingMeeting")]
|
||||
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;
|
||||
Name = name;
|
||||
@@ -48,6 +50,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
ShareStatus = shareStatus;
|
||||
IsHost = isHost;
|
||||
IsSharingMeeting = isSharingMeeting;
|
||||
WaitingForHost = waitingForHost;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
||||
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
||||
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
||||
public zEvent.NeedWaitForHost NeedWaitForHost { get; set; }
|
||||
|
||||
public ZoomRoomStatus()
|
||||
{
|
||||
@@ -76,6 +77,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||
PhoneCall = new zEvent.PhoneCallStatus();
|
||||
NeedWaitForHost = new zEvent.NeedWaitForHost();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1475,6 +1477,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public static List<Participant> GetGenericParticipantListFromParticipantsResult(
|
||||
List<ListParticipant> participants)
|
||||
{
|
||||
if (participants.Count == 0)
|
||||
{
|
||||
return new List<Participant>();
|
||||
}
|
||||
//return participants.Select(p => new Participant
|
||||
// {
|
||||
// UserId = p.UserId,
|
||||
|
||||
@@ -112,6 +112,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
|
||||
|
||||
if (_props.MinutesBeforeMeetingStart > 0)
|
||||
{
|
||||
CodecSchedule.MeetingWarningMinutes = _props.MinutesBeforeMeetingStart;
|
||||
}
|
||||
|
||||
ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
||||
|
||||
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
|
||||
@@ -494,19 +499,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
{
|
||||
var sharingStatus = GetSharingStatus();
|
||||
|
||||
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true);
|
||||
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false);
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
|
||||
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;
|
||||
}
|
||||
// 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;
|
||||
break;
|
||||
}
|
||||
@@ -1229,7 +1234,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
Participants.CurrentParticipants = participants;
|
||||
|
||||
// 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;
|
||||
|
||||
PrintCurrentCallParticipants();
|
||||
@@ -1424,15 +1429,40 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
case "needwaitforhost":
|
||||
{
|
||||
var needWait =
|
||||
JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
|
||||
Status.NeedWaitForHost = JsonConvert.DeserializeObject<zEvent.NeedWaitForHost>(responseObj.ToString());
|
||||
|
||||
if (needWait.Wait)
|
||||
{
|
||||
// TODO: notify user to wait for host
|
||||
}
|
||||
Debug.Console(1, this, "NeedWaitForHost: {0}", Status.NeedWaitForHost.Wait);
|
||||
|
||||
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":
|
||||
{
|
||||
@@ -1514,7 +1544,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
if (result.Success)
|
||||
{
|
||||
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true);
|
||||
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1704,8 +1734,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
/// </summary>
|
||||
private void UpdateCallStatus()
|
||||
{
|
||||
Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
|
||||
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
||||
Debug.Console(1, this,
|
||||
"[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)
|
||||
{
|
||||
@@ -1750,17 +1781,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
Type = eCodecCallType.Video,
|
||||
};
|
||||
|
||||
if (!String.IsNullOrEmpty(_lastDialedMeetingNumber))
|
||||
{
|
||||
_lastDialedMeetingNumber = String.Empty;
|
||||
}
|
||||
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);
|
||||
}
|
||||
else
|
||||
} else if (String.IsNullOrEmpty(Status.Call.Info.meeting_id) && Status.NeedWaitForHost.Wait)
|
||||
{
|
||||
//Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
||||
//Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
||||
var newCall = new CodecActiveCallItem
|
||||
{
|
||||
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,15 +1817,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
switch (callStatus)
|
||||
{
|
||||
case zStatus.eCallStatus.IN_MEETING:
|
||||
if (Status.NeedWaitForHost.Wait)
|
||||
{
|
||||
Status.NeedWaitForHost.Wait = false;
|
||||
}
|
||||
existingCall.Status = eCodecCallStatus.Connected;
|
||||
break;
|
||||
case zStatus.eCallStatus.NOT_IN_MEETING:
|
||||
if (Status.NeedWaitForHost.Wait)
|
||||
{
|
||||
Status.NeedWaitForHost.Wait = false;
|
||||
}
|
||||
existingCall.Status = eCodecCallStatus.Disconnected;
|
||||
break;
|
||||
}
|
||||
|
||||
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
|
||||
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
||||
|
||||
|
||||
OnCallStatusChange(existingCall);
|
||||
}
|
||||
@@ -1833,7 +1888,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
Status.Call.Info.meeting_password,
|
||||
GetSharingStatus(),
|
||||
GetIsHostMyself(),
|
||||
!String.Equals(Status.Call.Info.meeting_type,"NORMAL")
|
||||
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
public string DefaultCallLayout { get; set; }
|
||||
|
||||
public int MinutesBeforeMeetingStart { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user