Table of Contents

Class MediaPlayerSnapshot

Namespace
HaMqttDiscoverable.Entities
Assembly
HaMqttDiscoverable.dll

A partial snapshot of media player state, for use with PublishStateAsync(MediaPlayerSnapshot, CancellationToken). Only the non-null fields are published, so you can report just what changed.

public sealed class MediaPlayerSnapshot
Inheritance
MediaPlayerSnapshot
Inherited Members

Properties

Artist

The artist of the currently playing media.

public string? Artist { get; set; }

Property Value

string

IsMuted

Whether the player is muted. Ignored if the MediaPlayer wasn't created with SupportsMute.

public bool? IsMuted { get; set; }

Property Value

bool?

IsOn

Whether the player is powered on.

public bool? IsOn { get; set; }

Property Value

bool?

PlaybackState

The playback state - one of the MediaPlayerPlaybackState constants.

public string? PlaybackState { get; set; }

Property Value

string

Source

The currently active source. Ignored if the MediaPlayer has no configured Sources.

public string? Source { get; set; }

Property Value

string

Title

The title of the currently playing media.

public string? Title { get; set; }

Property Value

string

Volume

Volume level, from VolumeMin to VolumeMax (0.0-1.0 by default).

public double? Volume { get; set; }

Property Value

double?