Currently there is only support for play/pause service calls for the mediaplayers. This is great for local files or files provided by third parties like Spotify or Tidal.
But when streaming an url-stream on a mediaplayer play/pause is not supported. So for now to control both files and streams you need at least 3 buttons on your dasboard-card to control the mediaplayer.
Two options to tackle this:
- add a service call media_player.media_play_stop to have a similar function for url-streams as for other files
- Adapt media_player.media_play_pause to recognize the media type and switch dynamically between play/pause and play/stop to support all types of media-files