Table of Contents

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

client NowPlayingClient

The client identity to initialize from.

Properties

ActivePlayer

Gets or sets the currently active player for this client.

public MrpPlayerState ActivePlayer { get; set; }

Property Value

MrpPlayerState

BundleIdentifier

Gets the client's bundle identifier.

public string? BundleIdentifier { get; }

Property Value

string

DisplayName

Gets the client's display name.

public string? DisplayName { get; }

Property Value

string

Players

Gets the players known for this client, keyed by player identifier.

public Dictionary<string, MrpPlayerState> Players { get; }

Property Value

Dictionary<string, MrpPlayerState>

SupportedCommands

Gets the default supported commands for this client.

public List<CommandInfo> SupportedCommands { get; }

Property Value

List<CommandInfo>

Methods

GetPlayer(NowPlayingPlayer)

Gets state for a player, creating it if it does not already exist.

public MrpPlayerState GetPlayer(NowPlayingPlayer player)

Parameters

player NowPlayingPlayer

The player identity to look up.

Returns

MrpPlayerState

HandleSetDefaultSupportedCommands(SetDefaultSupportedCommandsMessage)

Updates the default supported commands for this client.

public void HandleSetDefaultSupportedCommands(SetDefaultSupportedCommandsMessage supportedCommands)

Parameters

supportedCommands SetDefaultSupportedCommandsMessage

The decoded SetDefaultSupportedCommandsMessage.

HandleSetNowPlayingPlayer(NowPlayingPlayer)

Handles a change of now-playing player for this client.

public void HandleSetNowPlayingPlayer(NowPlayingPlayer player)

Parameters

player NowPlayingPlayer

The player identity that is now active.

Update(NowPlayingClient)

Updates client metadata from a NowPlayingClient payload.

public void Update(NowPlayingClient client)

Parameters

client NowPlayingClient

The client identity to update from.