kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.47k stars 206 forks source link

Pause no longer shows up when it's not supported; now shows both pause and stop by default #844

Open mjustian opened 3 weeks ago

mjustian commented 3 weeks ago

Hi, I was using this while writing an integration for a home audio controller. The controller supports internet radio, which does not support a pause button, leading to errors when the default pause button was clicked. Internet radio does, however, support a stop button. Furthermore, I would like to be able to change the source of the audio from internet radio to something else, such as Spotify, which does support pause, without needing to modify the mini media player's configuration.

This change makes both play/pause and play/stop enabled by default, as opposed to only play/pause being enabled. Furthermore, this change will hide pause and stop if those commands are not supported by the source device.