feat(essentials): Adds IsHost property to MeetingInfo to determine if the room is the host

This commit is contained in:
Neil Dorin
2021-08-30 17:48:37 -06:00
parent 3edb0145d0
commit 8af7b4b1db
5 changed files with 29 additions and 5 deletions

View File

@@ -1489,6 +1489,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
UserId = p.UserId,
Name = p.UserName,
IsHost = p.IsHost,
IsMyself = p.IsMyself,
CanMuteVideo = p.IsVideoCanMuteByHost,
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",

View File

@@ -472,7 +472,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
ReceivingContent.FireUpdate();
// Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, GetSharingStatus());
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself());
MeetingInfo = meetingInfo;
}
};
@@ -627,7 +627,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
case "isSharingBlackMagic":
{
// Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus());
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself());
MeetingInfo = meetingInfo;
break;
}
@@ -1199,7 +1199,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);
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus, GetIsHostMyself());
MeetingInfo = meetingInfo;
PrintCurrentCallParticipants();
@@ -1784,7 +1784,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Status.Call.Info.meeting_list_item.meetingName,
host,
Status.Call.Info.meeting_password,
GetSharingStatus()
GetSharingStatus(),
GetIsHostMyself()
);
}
@@ -1821,6 +1822,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
return sharingState;
}
/// <summary>
/// Will return true if the host is myself (this zoom room)
/// </summary>
/// <returns></returns>
private bool GetIsHostMyself()
{
var host = Participants.Host;
if(host == null)
{
Debug.Console(2, this, "Host is currently null");
return false;
}
Debug.Console(2, this, "Host is: {0} myself?: {1}", host.Name, host.IsMyself);
return host.IsMyself;
}
public override void StartSharing()
{
SendText("zCommand Call Sharing HDMI Start");