mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19: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
|
// Return formatted when dialing, straight digits when in call
|
||||||
DialStringFeedback = new StringFeedback(() =>
|
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))
|
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
||||||
return GetFormattedDialString(DialStringBuilder.ToString());
|
return GetFormattedDialString(DialStringBuilder.ToString());
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -34,14 +34,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
public string Password { get; private set; }
|
public string Password { get; private set; }
|
||||||
[JsonProperty("shareStatus")]
|
[JsonProperty("shareStatus")]
|
||||||
public string ShareStatus { get; private set; }
|
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;
|
Id = id;
|
||||||
Name = name;
|
Name = name;
|
||||||
Host = host;
|
Host = host;
|
||||||
Password = password;
|
Password = password;
|
||||||
ShareStatus = shareStatus;
|
ShareStatus = shareStatus;
|
||||||
|
IsHost = IsHost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
{
|
{
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public bool IsHost { get; set; }
|
public bool IsHost { get; set; }
|
||||||
|
public bool IsMyself { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool CanMuteVideo { get; set; }
|
public bool CanMuteVideo { get; set; }
|
||||||
public bool CanUnmuteVideo { get; set; }
|
public bool CanUnmuteVideo { get; set; }
|
||||||
|
|||||||
@@ -1489,6 +1489,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
UserId = p.UserId,
|
UserId = p.UserId,
|
||||||
Name = p.UserName,
|
Name = p.UserName,
|
||||||
IsHost = p.IsHost,
|
IsHost = p.IsHost,
|
||||||
|
IsMyself = p.IsMyself,
|
||||||
CanMuteVideo = p.IsVideoCanMuteByHost,
|
CanMuteVideo = p.IsVideoCanMuteByHost,
|
||||||
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
||||||
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
ReceivingContent.FireUpdate();
|
ReceivingContent.FireUpdate();
|
||||||
|
|
||||||
// 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, GetSharingStatus());
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself());
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -627,7 +627,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
case "isSharingBlackMagic":
|
case "isSharingBlackMagic":
|
||||||
{
|
{
|
||||||
// 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());
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself());
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1199,7 +1199,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);
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus, GetIsHostMyself());
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
|
|
||||||
PrintCurrentCallParticipants();
|
PrintCurrentCallParticipants();
|
||||||
@@ -1784,7 +1784,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Status.Call.Info.meeting_list_item.meetingName,
|
Status.Call.Info.meeting_list_item.meetingName,
|
||||||
host,
|
host,
|
||||||
Status.Call.Info.meeting_password,
|
Status.Call.Info.meeting_password,
|
||||||
GetSharingStatus()
|
GetSharingStatus(),
|
||||||
|
GetIsHostMyself()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1821,6 +1822,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
return sharingState;
|
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()
|
public override void StartSharing()
|
||||||
{
|
{
|
||||||
SendText("zCommand Call Sharing HDMI Start");
|
SendText("zCommand Call Sharing HDMI Start");
|
||||||
|
|||||||
Reference in New Issue
Block a user