mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Merge pull request #1285 from PepperDash/feature/add-isMic-support
feat: Update .gitignore and enhance routing-related classes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -394,3 +394,4 @@ essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Pepp
|
|||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
_site/
|
_site/
|
||||||
api/
|
api/
|
||||||
|
*.DS_Store
|
||||||
|
|||||||
@@ -9,10 +9,15 @@ using PepperDash.Essentials.Core.Devices;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a level control item in a list, which can be used to control volume or mute functionality.
|
||||||
|
/// </summary>
|
||||||
public class LevelControlListItem : AudioControlListItemBase
|
public class LevelControlListItem : AudioControlListItemBase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A reference to the IBasicVolumeWithFeedback device for control.
|
||||||
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public IBasicVolumeWithFeedback LevelControl
|
public IBasicVolumeWithFeedback LevelControl
|
||||||
{
|
{
|
||||||
@@ -70,13 +75,39 @@ namespace PepperDash.Essentials.Core
|
|||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||||
public eLevelControlType Type { get; set; }
|
public eLevelControlType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the item is a mic or not.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("isMic", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
public bool? IsMic { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the item should show the raw level in the UI.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("showRawLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
public bool? ShowRawLevel { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates the type of level control item.
|
||||||
|
/// </summary>
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum eLevelControlType
|
public enum eLevelControlType
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the item is a level control only
|
||||||
|
/// </summary>
|
||||||
Level = 1,
|
Level = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the item is a mute control only
|
||||||
|
/// </summary>
|
||||||
Mute = 2,
|
Mute = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the item is both a level and mute control
|
||||||
|
/// </summary>
|
||||||
LevelAndMute = Level | Mute,
|
LevelAndMute = Level | Mute,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,18 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum eSourceListItemType
|
public enum eSourceListItemType
|
||||||
{
|
{
|
||||||
Route, Off, Other, SomethingAwesomerThanThese
|
/// <summary>
|
||||||
|
/// Represents a typical route.
|
||||||
|
/// </summary>
|
||||||
|
Route,
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an off route.
|
||||||
|
/// </summary>
|
||||||
|
Off,
|
||||||
|
/// <summary>
|
||||||
|
/// Represents some other type of route
|
||||||
|
/// </summary>
|
||||||
|
Other,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -18,6 +29,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SourceListItem
|
public class SourceListItem
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the source item, which is used to identify it in the DeviceManager
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("sourceKey")]
|
[JsonProperty("sourceKey")]
|
||||||
public string SourceKey { get; set; }
|
public string SourceKey { get; set; }
|
||||||
|
|
||||||
@@ -117,6 +131,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
[JsonProperty("disableRoutedSharing")]
|
[JsonProperty("disableRoutedSharing")]
|
||||||
public bool DisableRoutedSharing { get; set; }
|
public bool DisableRoutedSharing { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("destinations")]
|
[JsonProperty("destinations")]
|
||||||
public List<eSourceListItemDestinationTypes> Destinations { get; set; }
|
public List<eSourceListItemDestinationTypes> Destinations { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -149,31 +166,56 @@ namespace PepperDash.Essentials.Core
|
|||||||
[JsonProperty("disableSimpleRouting")]
|
[JsonProperty("disableSimpleRouting")]
|
||||||
public bool DisableSimpleRouting { get; set; }
|
public bool DisableSimpleRouting { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default constructor for SourceListItem, initializes the Icon to "Blank"
|
||||||
|
/// </summary>
|
||||||
public SourceListItem()
|
public SourceListItem()
|
||||||
{
|
{
|
||||||
Icon = "Blank";
|
Icon = "Blank";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a string representation of the SourceListItem, including the SourceKey and Name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{SourceKey}:{Name}";
|
return $"{SourceKey}:{Name}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a route in a source list item, which defines the source and destination keys and the type of signal being routed
|
||||||
|
/// </summary>
|
||||||
public class SourceRouteListItem
|
public class SourceRouteListItem
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the source device to route from
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("sourceKey")]
|
[JsonProperty("sourceKey")]
|
||||||
public string SourceKey { get; set; }
|
public string SourceKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the source port to route from
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("sourcePortKey")]
|
[JsonProperty("sourcePortKey")]
|
||||||
public string SourcePortKey { get; set; }
|
public string SourcePortKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the destination device to route to
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("destinationKey")]
|
[JsonProperty("destinationKey")]
|
||||||
public string DestinationKey { get; set; }
|
public string DestinationKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the destination port to route to
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("destinationPortKey")]
|
[JsonProperty("destinationPortKey")]
|
||||||
public string DestinationPortKey { get; set; }
|
public string DestinationPortKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The type of signal being routed, such as audio or video
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public eRoutingSignalType Type { get; set; }
|
public eRoutingSignalType Type { get; set; }
|
||||||
}
|
}
|
||||||
@@ -183,15 +225,85 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum eSourceListItemDestinationTypes
|
public enum eSourceListItemDestinationTypes
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default display, used for the main video output in a room
|
||||||
|
/// </summary>
|
||||||
defaultDisplay,
|
defaultDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Left display
|
||||||
|
/// </summary>
|
||||||
leftDisplay,
|
leftDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Right display
|
||||||
|
/// </summary>
|
||||||
rightDisplay,
|
rightDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Center display
|
||||||
|
/// </summary>
|
||||||
centerDisplay,
|
centerDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Program audio, used for the main audio output in a room
|
||||||
|
/// </summary>
|
||||||
programAudio,
|
programAudio,
|
||||||
|
/// <summary>
|
||||||
|
/// Codec content, used for sharing content to the far end in a video call
|
||||||
|
/// </summary>
|
||||||
codecContent,
|
codecContent,
|
||||||
|
/// <summary>
|
||||||
|
/// Front left display, used for rooms with multiple displays
|
||||||
|
/// </summary>
|
||||||
frontLeftDisplay,
|
frontLeftDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Front right display, used for rooms with multiple displays
|
||||||
|
/// </summary>
|
||||||
frontRightDisplay,
|
frontRightDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Rear left display, used for rooms with multiple displays
|
||||||
|
/// </summary>
|
||||||
rearLeftDisplay,
|
rearLeftDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Rear right display, used for rooms with multiple displays
|
||||||
|
/// </summary>
|
||||||
rearRightDisplay,
|
rearRightDisplay,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 1, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay1,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 2, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay2,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 3, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay3,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 4, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay4,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 5, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay5,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 6, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay6,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 7, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay7,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 8, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay8,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 9, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay9,
|
||||||
|
/// <summary>
|
||||||
|
/// Auxiliary display 10, used for additional displays in a room
|
||||||
|
/// </summary>
|
||||||
|
auxDisplay10,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,8 +7,14 @@
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// For fixed-source endpoint devices with an input port
|
||||||
|
/// </summary>
|
||||||
public interface IRoutingSinkWithInputPort :IRoutingSink
|
public interface IRoutingSinkWithInputPort :IRoutingSink
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current input port for this routing sink.
|
||||||
|
/// </summary>
|
||||||
RoutingInputPort CurrentInputPort { get; }
|
RoutingInputPort CurrentInputPort { get; }
|
||||||
}
|
}
|
||||||
/*/// <summary>
|
/*/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user