Class MulticastAirPlayDiscovery
- Namespace
- AppleTvControlLibrary.Discovery.AirPlay
- Assembly
- AppleTvControlLibrary.Discovery.dll
Discovers AirPlay devices by sending DNS-SD PTR queries to the mDNS multicast group and collecting responses.
public sealed class MulticastAirPlayDiscovery : IAirPlayDiscovery
- Inheritance
-
MulticastAirPlayDiscovery
- Implements
- Inherited Members
Methods
DiscoveryAsync(string, TimeSpan, CancellationToken)
Discovers an AirPlay device by its mDNS service instance name and completes as soon as that service has been fully resolved.
public static Task<AirPlayDiscoveryResult?> DiscoveryAsync(string appleTvName, TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
appleTvNamestringThe exact mDNS service instance name to locate.
timeoutTimeSpanThe maximum time to wait for the named device.
cancellationTokenCancellationTokenA token to cancel the lookup.
Returns
- Task<AirPlayDiscoveryResult>
The matching device, or null when it is not discovered before the timeout.
ScanAsync(TimeSpan, CancellationToken)
Scans the network for AirPlay devices.
public Task<IReadOnlyList<AirPlayDiscoveryResult>> ScanAsync(TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
timeoutTimeSpanHow long to wait for responses.
cancellationTokenCancellationTokenA token to cancel the scan.
Returns
- Task<IReadOnlyList<AirPlayDiscoveryResult>>
The discovered AirPlay devices.