mini-media-player
mini-media-player copied to clipboard
[Enhancement] material background style
When having multiple players eg Sonos it would be handy to have one more display mode which only renders the background according the 'material' style but without the artwork displayed.
That way the main player could show the material style including artwork and the satellites only the material background/foreground.
Mostly copy/paste of current styles with just a slight omission and adding an artwork style.
I'm getting some luck with card-mod to hide the cover artwork. I'm not finished but ill write it up and send you the link once I'm happy with it. It would be better if child cards could inherit the first background colour though.
I think i've nailed this for my use case. I have a chromecast group media player with the volume control hidden. I then use stack-in-card to show the individual players under it. Using card-mod i'm able to hide the cover gradient and remove the background image and stretch the remaining background colour full width. artwork type is set to material on all of them. This leaves me with the following card.
card-mod:
style: |
ha-card .cover-gradient {
display: none;
}
ha-card .cover {
background-image: none !important;
width: 100% !important;
}
Bit hacky but seems to work.
Hi folks, sorry to bump an old topic but I wanted to share an extra rule I added to Chris' styles (thank you!) to remove the long transition time that was bugging me:
ha-card *, ha-card :before, ha-card :after, ha-card ha-icon * {
animation-duration: 0s !important;
transition-duration: 0s !important;
}
I'm going to try to put together a PR to add a new artwork style but in the meantime, hope this helps save someone some time!
Thanks Kris. That was bugging me too, but hadn't found time to address. I'll give this a go.
It wouldn't stop bugging me so PR is in (#603), have also added a gist with my edited version if you want to give that a try. It still has some transitions but they seem to be in line with the default ones in HA, and much less obtrusive than the previous 4 second one.