Class MrpServiceInfo
- Namespace
- AppleTvControlLibrary.Discovery.Mrp
- Assembly
- AppleTvControlLibrary.Discovery.dll
MRP (Media Remote Protocol) specific constants and parsing helpers for mDNS discovery.
public static class MrpServiceInfo
- Inheritance
-
MrpServiceInfo
- Inherited Members
Fields
SERVICE_TYPE
The MRP mDNS service type.
public const string SERVICE_TYPE = "_mediaremotetv._tcp.local"
Field Value
Methods
GetPairingRequirement(bool, IReadOnlyDictionary<string, string>)
Derives the pairing requirement for an MRP service from its enabled state and "allowpairing" TXT record.
public static MrpPairingRequirement GetPairingRequirement(bool isEnabled, IReadOnlyDictionary<string, string> properties)
Parameters
isEnabledboolWhether MRP is considered enabled for this service, from IsEnabled(IReadOnlyDictionary<string, string>).
propertiesIReadOnlyDictionary<string, string>The service's decoded TXT record properties.
Returns
- MrpPairingRequirement
The derived pairing requirement.
GetUniqueId(IReadOnlyDictionary<string, string>)
Returns the stable unique identifier for an MRP service, from the "UniqueIdentifier" TXT record, or null if not present.
public static string? GetUniqueId(IReadOnlyDictionary<string, string> properties)
Parameters
propertiesIReadOnlyDictionary<string, string>The service's decoded TXT record properties.
Returns
IsEnabled(IReadOnlyDictionary<string, string>)
Returns whether MRP is considered enabled for the given service's properties. pyatv disables MRP once the "SystemBuildVersion" leading numeric build component is 19 or higher (tvOS 15+). A missing or unparseable "SystemBuildVersion" is treated as enabled, matching pyatv's behavior when its regex match fails.
public static bool IsEnabled(IReadOnlyDictionary<string, string> properties)
Parameters
propertiesIReadOnlyDictionary<string, string>The service's decoded TXT record properties.
Returns
ToDiscoveryResult(Service)
Converts a parsed mDNS Service into an MrpDiscoveryResult.
public static MrpDiscoveryResult ToDiscoveryResult(Service service)
Parameters
serviceServiceThe parsed mDNS service.
Returns
- MrpDiscoveryResult
The MRP-specific discovery result.