Class MrpClient
- Namespace
- AppleTvControlLibrary.Mrp.PlayerState
- Assembly
- AppleTvControlLibrary.Mrp.dll
Represents a single MRP media player client (identified by bundle identifier).
public sealed class MrpClient
- Inheritance
-
MrpClient
- Inherited Members
Constructors
MrpClient(NowPlayingClient)
Initializes a new instance of the MrpClient class.
public MrpClient(NowPlayingClient client)
Parameters
clientNowPlayingClientThe client identity to initialize from.
Properties
ActivePlayer
Gets or sets the currently active player for this client.
public MrpPlayerState ActivePlayer { get; set; }
Property Value
BundleIdentifier
Gets the client's bundle identifier.
public string? BundleIdentifier { get; }
Property Value
DisplayName
Gets the client's display name.
public string? DisplayName { get; }
Property Value
Players
Gets the players known for this client, keyed by player identifier.
public Dictionary<string, MrpPlayerState> Players { get; }
Property Value
SupportedCommands
Gets the default supported commands for this client.
public List<CommandInfo> SupportedCommands { get; }
Property Value
Methods
GetPlayer(NowPlayingPlayer)
Gets state for a player, creating it if it does not already exist.
public MrpPlayerState GetPlayer(NowPlayingPlayer player)
Parameters
playerNowPlayingPlayerThe player identity to look up.
Returns
HandleSetDefaultSupportedCommands(SetDefaultSupportedCommandsMessage)
Updates the default supported commands for this client.
public void HandleSetDefaultSupportedCommands(SetDefaultSupportedCommandsMessage supportedCommands)
Parameters
supportedCommandsSetDefaultSupportedCommandsMessageThe decoded SetDefaultSupportedCommandsMessage.
HandleSetNowPlayingPlayer(NowPlayingPlayer)
Handles a change of now-playing player for this client.
public void HandleSetNowPlayingPlayer(NowPlayingPlayer player)
Parameters
playerNowPlayingPlayerThe player identity that is now active.
Update(NowPlayingClient)
Updates client metadata from a NowPlayingClient payload.
public void Update(NowPlayingClient client)
Parameters
clientNowPlayingClientThe client identity to update from.