Lovelace: Mini Media Player

Ok, I would guess that TuneIn probably is responsible for that metadata, and not the actual raw stream.

Haha, thank you! Not that I’ve heard of :wink:

Thanks a lot for such a quick response! I will check a bit later and report.

1 Like

Thanks a lot once more! Works perfectly!

1 Like

Perfect, thanks for the feedback!

New version: v0.9.0

  • Added: bundle version, to avoid externally loaded dependency #21

  • Updated: instructions to include bundle instead of source #21

  • Updated: tracker.json with bundle version #21

I recommend everyone to go through the install instructions again. You don’t have to, BUT if you don’t, you’ll continue loading the external dependency.

Bundling the dependencies instead of loading them externally will both make the card load faster and available offline.

2 Likes

Amazing work @kalkih this is really taking shape!

I’ve been playing with TileBoard to setup on a few tablets / phones around the house and this media player being so much better it has made be reconsider at least for the controllers I will largely use for audio!

https://community.home-assistant.io/t/tileboard-new-dashboard-for-homeassistant

Great work on this!

1 Like

Love this and works great! Thanks a lot!

One question - is it possible to hide media information alone? My use case is that I have three Sonos speakers that always are grouped and playing the same thing. Would love to list them with only entity name, mute and volume.

03

1 Like

Sure, will add this next update :+1:

Thanks a lot :slight_smile:

Is it correct that when using: max_volume - it works like a charm, but when clicking the media and the pop up appears, the the max_volume is no longer “set”.

Yes, the more-info dialog is nothing I have control over, it’s part of HA core.

Makes sense…
Just wanted to make sure that I wasn’t implementing it wrong.

Thanks for quick response.

1 Like

Can you explain a bit more about the consider_idle_after option?

I use my sonos playbar to listen to radio, and because it never turns off, the volume bar is always visible.

Even after enabling the consider_idle_after option in my lovelace ui yaml, after one minute, the volume bar % prev-play-next buttons stays visible.

Sure.
consider_idle_after checks the media_position_updated_at attribute reported by the media player. It then compares that time with current time and if the time difference is larger than what’s specified in consider_idle_after, the card will render as “idle”.

  • When player is considered idle, progress/artwork/volume & media controls are hidden
  • When player is considered idle, media information (if available) is faded and restricted to one row
  • When player is considered idle and media is available/paused a play button is visible

The following example would render the player idle after 0.5 minutes (30 sec) if media_position_updated_at isn’t updated, given the media player has media_position_updated_at set.

- type: "custom:mini-media-player"
  entity: ...
  consider_idle_after: 0.5

Here is what it should look like (sped up).

1 Like

Thanks for explaining it a bit more. Now I understand why this is not working for me. When playing Tunein radio trough my Sonos speaker, there is no “media_position_updated_at:” available. Same goes for selecting TV as a source.

Would love an option “consider paused as idle”

When playing some random mp3, this is working as intended.

Okay I see, that’s unfortunate.
I could really only try this option with my Chromecasts and they seem to report media_position_updated_at for all types of playback.
Unfortunately the backend components differ quite a bit in their implementations.

I will add a consider_pause_idle option in the next release

2 Likes

New version: v0.9.1

  • Added: hide_media_info option #23

  • Added: consider_pause_idle option, to render the player idle while it’s paused

  • Added: parameter full for show_source, to display full source name

  • Added: (scroll_info) dynamic scroll speed, based on media information length

  • Changed: made shuffle button slightly larger

  • Fixed: alignment issue when group was set to true and artwork cover was present

@Patrick_HA @jacoblo

5 Likes

Works like a charm! Thanks!

1 Like

Works great! Thanks a lot :slight_smile:

1 Like

One thing is still not clear to me: can i delete mini-media-player.js or it must be still used in conjunction with mini-media-player-bundle.js. And in the ui-lovelace which one of the two i must use?

And why this difference between the two screenshots: The card says the audio cast in inactive while the more infos says playing?