Interface ISdk
Main interface for interacting with the Huddly SDK.
Intended to run for the lifetime of an application. Only one instance should run at a time. Derived resources should be disposed before disposing the sdk instance.
public interface ISdk : IDisposable
- Inherited Members
Methods
GetMonitoredDevices()
IImmutableDictionary<string, IDevice> GetMonitoredDevices()
Returns
- IImmutableDictionary<string, IDevice>
A collection of all currently monitored devices
IsMonitoring()
bool IsMonitoring()
Returns
StartMonitoring(int, CancellationToken)
Starts monitoring and discovery of devices.
Consumers should subscribe to the DeviceConnected and DeviceDisconnected events before calling this method
Task StartMonitoring(int timeout_ms = -1, CancellationToken ct = default)
Parameters
timeout_ms
intct
CancellationToken
Returns
StopMonitoring()
Stops monitoring and discovery of devices
[Obsolete("Use Dispose() and create a new SDK instance instead. Method will be removed in SDK version 3.")]
void StopMonitoring()
Events
DeviceAccessDenied
This event is triggered when a connected device is inaccessible, e.g., when it is claimed by another process or when permission is denied.
event EventHandler<DeviceAccessDeniedEventArgs>? DeviceAccessDenied
Event Type
- EventHandler<DeviceAccessDeniedEventArgs>
DeviceConnected
This event is triggered when a device is connected. It will also trigger for all currently connected devices when device discovery starts.
event EventHandler<DeviceConnectionChangeEventArgs>? DeviceConnected
Event Type
DeviceDisconnected
This event is triggered when a device is disconnected. It will only occur for devices that have previously triggered the DeviceConnected event.
In order to reconnect to the device, listen for a DeviceConnected event containing an IDevice with a matching Id.
event EventHandler<DeviceConnectionChangeEventArgs>? DeviceDisconnected