add fix for sharing status not updating

add fix for clearing participants list on meeting end
This commit is contained in:
Andrew Welker
2020-10-07 12:45:05 -06:00
parent ad4a6e9383
commit f4fb9cd173
2 changed files with 46 additions and 6 deletions

View File

@@ -484,6 +484,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
codec.Participants.ParticipantsListHasChanged += (sender, args) => codec.Participants.ParticipantsListHasChanged += (sender, args) =>
{ {
string participantsXSig; string participantsXSig;
if (codec.Participants.CurrentParticipants.Count == 0) if (codec.Participants.CurrentParticipants.Count == 0)
{ {
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length); participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
@@ -492,10 +493,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
return; return;
} }
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants); participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
@@ -518,7 +515,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
foreach (var participant in currentParticipants) foreach (var participant in currentParticipants)
{ {
if (meetingIndex > maxParticipants * offset) break; if (meetingIndex >= maxParticipants * offset) break;
//digitals //digitals
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb); tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb);
@@ -534,6 +531,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
meetingIndex += offset; meetingIndex += offset;
stringIndex += maxStrings; stringIndex += maxStrings;
} }
while (meetingIndex < maxParticipants*offset)
{
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false);
tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, false);
tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, false);
tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, false);
//serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty);
digitalIndex += maxDigitals;
meetingIndex += offset;
stringIndex += maxStrings;
}
return GetXSigString(tokenArray); return GetXSigString(tokenArray);
} }

View File

@@ -399,6 +399,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SetIsReady(); SetIsReady();
} }
private void SetUpCallFeedbackActions()
{
Status.Call.Sharing.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "State")
{
SharingContentIsOnFeedback.FireUpdate();
ReceivingContent.FireUpdate();
}
};
Status.Call.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "Info")
{
Debug.Console(1, this, "Updating Call Status");
UpdateCallStatus();
}
};
}
/// <summary> /// <summary>
/// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks. /// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks.
@@ -1324,6 +1344,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (callStatus != zStatus.eCallStatus.IN_MEETING || callStatus != zStatus.eCallStatus.CONNECTING_MEETING) if (callStatus != zStatus.eCallStatus.IN_MEETING || callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
{ {
Status.Call = new zStatus.Call {Status = callStatus}; Status.Call = new zStatus.Call {Status = callStatus};
SetUpCallFeedbackActions();
} }
if (ActiveCalls.Count == 0) if (ActiveCalls.Count == 0)
@@ -1387,8 +1409,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
ActiveCalls.Remove(call); ActiveCalls.Remove(call);
} }
} }
Debug.Console(1, this, "**************************************************************************"); Debug.Console(1, this, "**************************************************************************");
//clear participants list after call cleanup
if (ActiveCalls.Count == 0)
{
Participants.CurrentParticipants = new List<Participant>();
}
} }
protected override void OnCallStatusChange(CodecActiveCallItem item) protected override void OnCallStatusChange(CodecActiveCallItem item)