Lovelace: Mini Media Player

You need to empty your browser cache after making changes to the js file.

Awesome! thanks for the push in the right direction, I’ll mess around with it later on tonight

1 Like

I did it… Can you please send me the js with the updated code?

How to avoid this?

43

Here is a direct link.

It’s a specific issue when unavailable is translated into two or more words,
I have a fix for this here and it will be included in the next release

For now you’ll have to either give the chromecast a shorter name with the name: option or copy the code from the dev branch where the fix is available

@kalkih: Thank you very much for your very nice ‘Mini Media Player’.

Would you like to consider to integrate or provide the functionality from this add-on: Community Hass.io Add-on: Google Assistant Webserver (broadcast messages without interrupting music)

Right now when we use the tts option it will stop the previous acton like playing music from radio or Spotify. It would be great if we can use tts without interrupting the music.
Even more handy would be if the volume can be changed temporary during the tts action.

Maybe more users like this functionality?

2 Likes

I’m not running hass.io myself but if anyone is running this add-on and want to implement support for this please make a PR on github and I would be happy to merge it in.

Thanks for your reply!
Wished I could do it by myself, but there is for me still a very long way to go :wink:

Hope someone else is willing to implement support for it.

Thanks anyway!!!

1 Like

New version v0.8.2

  • Added: max_volume option to set a max volume value (between 1 & 100) for the volume slider
  • Added: tracker.json file and instructions for custom_updater
  • Fixed: issue where text would wrap outside the card
3 Likes

Hi Kalkih

I was wondering, is there a maximum number of letters for sources in the source picker? Not all my sources are showing after being selected, and I then reload the page. Music is still playing, but the source is empty. I still see them all in the list, when I press the source picker. I have noticed, that the sources with short names are visible even after reloading the page, but longer sources seem to disappear.

Alright, I need a bit more info to try to re-create this.
Roughly, how many characters are the sources that doesn’t show?
Which browser are you having this issue in?

I see it both on pc (chrome, edge) and from the Ios app.

I have a source with 10 letters, which is not visible

1 Like

Hmm, I can’t reproduce this issue.

Are you on the latest version v0.8.2?
Does it show up in the regular source select (more info dialog)?
Is it just this particular source that doesn’t show up?

Is it still saying “Afslapning” if you refresh the site?
Yes, I have tried with the newest, same result.

It is only Skala FM and DR P3 that works. The rest results in not being visible, if I refresh the site, eventhough the source is correctly playing. And no, they do not show up in the regular source select either :confused:

1 Like

Oooh wait! It seems that only the sources connected to a tunein station works. The rest are playlists marked as Sonos Favourites. I think that could be the issue. Just tried adding a new radio station, and that one workes just as the other stations DR P3 and Skala FM.

1 Like

Ok, it’s possible that this is a bug in the sonos component where the source attribute is not reported to the entities state properly. That’s probably also why it’s gone after a refresh since I use the entities source attribute to display the current source.

New version v0.8.3

2 Likes

I have this in my lovelace:

  - title: Media Mini
    icon: mdi:boombox
    cards:
      - type: entities
        title: Google Devices
        entities:
        - entity: media_player.all_speakers
          type: "custom:mini-media-player"
          group: true
          show_tts: google
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.living_areas
          type: "custom:mini-media-player"
          group: true
          show_tts: google
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.bedroom_speaker
          type: "custom:mini-media-player"
          group: true
          show_tts: google
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.office_speaker
          type: "custom:mini-media-player"
          group: true
          show_tts: google
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.lounge_speaker
          type: "custom:mini-media-player"
          group: true
          show_tts: google
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.lounge_room_tv
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
      - type: entities
        title: Other Media Players
        entities:
        - entity: media_player.roku_5x46aj056306
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.foxtel_7587
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.kodi
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.osmc_vero4
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          scroll_info: true
        - entity: media_player.txnr1009
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          scroll_info: true
          show_source: true
        - entity: media_player.samsung_tv
          type: "custom:mini-media-player"
          group: true
          artwork: cover
          power_color: true
          show_source: true

Which seems to work fine. But I am getting this error:

2018-10-02 10:23:57 ERROR (MainThread) [frontend.js.latest.201809270] https://domain.duckdns.org:30443/local/mini-media-player.js?ver=0.8.3:680:22 NotSupportedError: Cannot define multiple custom elements with the same tag name

Maybe it’s the colons in your JS include “mini-media-player.js?0.8.3:680:22”
Replace the colons with something else, dashes maybe?

the colons are not in the JS include. Only in the error.