mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-26 10:54:59 +00:00
feat(essentials): Adds IsHost property to MeetingInfo to determine if the room is the host
This commit is contained in:
@@ -152,6 +152,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
// Return formatted when dialing, straight digits when in call
|
||||
DialStringFeedback = new StringFeedback(() =>
|
||||
{
|
||||
// Format the number feedback if in dial mode and the codec is not IHasStartMeeting (ZoomRoom)
|
||||
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
||||
return GetFormattedDialString(DialStringBuilder.ToString());
|
||||
else
|
||||
|
||||
@@ -34,14 +34,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
public string Password { get; private set; }
|
||||
[JsonProperty("shareStatus")]
|
||||
public string ShareStatus { get; private set; }
|
||||
[JsonProperty("isHost")]
|
||||
public Boolean IsHost { get; private set; }
|
||||
|
||||
public MeetingInfo(string id, string name, string host, string password, string shareStatus)
|
||||
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Host = host;
|
||||
Password = password;
|
||||
ShareStatus = shareStatus;
|
||||
IsHost = IsHost;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
{
|
||||
public int UserId { get; set; }
|
||||
public bool IsHost { get; set; }
|
||||
public bool IsMyself { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool CanMuteVideo { get; set; }
|
||||
public bool CanUnmuteVideo { get; set; }
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user