Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: medium-media-player #156

Closed
rdehuyss opened this issue Aug 1, 2019 · 10 comments
Closed

Feature request: medium-media-player #156

rdehuyss opened this issue Aug 1, 2019 · 10 comments
Labels
enhancement New feature or request

Comments

@rdehuyss
Copy link

rdehuyss commented Aug 1, 2019

Hi,

First of all: thanks for this excellent card which we use daily.

Some minor annoyance that we have is that the mini-media-player is sometimes too mini :-). We use it on a wall mounted tablet and we often press the wrong button. The only buttons we really use are play, pause and the volume.
Would there be a way to have the play/pause buttons a little bit bigger? So they can be easily controlled by finger?

Thanks again,
Ronald

@kalkih kalkih added the enhancement New feature or request label Aug 11, 2019
@kalkih
Copy link
Owner

kalkih commented Aug 11, 2019

Hello, thanks!

Yes, I see your point.
We could possibly add some sort of scaling option for the UI in the future, would require some work though as most of the UI is based on set pixel values.

Another alternative would be to use button-cards for play/pause and +/-.

@trankillity
Copy link

I've just come up against something similar, but slightly different in this vein.

I'm trying to use mini-media-player as a conditionally-displayed "background" for another card. I've got it working fine, however when the artwork is in "cover" mode, the height is fixed. And "full-cover" is too tall for my liking.

Would be fantastic if there was an optional "height" parameter that we could specify to get MMP to display how we prefer it.

@kalkih
Copy link
Owner

kalkih commented Aug 21, 2019

@trankillity
Adding a static height is a bit problematic since the card scales differently depending on config, on/off state, horizontal space available, expanded menus etc.

A good solution if you really want a static height would be to use card-mod, with which you should be able to achieve it easily.
Just add the desired height to the ha-card element.

# card-mod example, should work?
...
type: custom:mini-media-player
style: |
  ha-card {
    height: 200px;
  }

@kalkih
Copy link
Owner

kalkih commented Sep 24, 2019

Example of what a scaling option would/could look like:

Scaled 150%
hyperion_8123_lovelace_2

Regular
hyperion_8123_lovelace_2 copy

@rdehuyss
Copy link
Author

Exactly what I want!

How did you do that? Using card-mod or?

@kalkih
Copy link
Owner

kalkih commented Sep 24, 2019

That was just to test the idea of a scalable option, achieved by applying/changing some styles through Google Chrome dev-tools.
But yes, should be achievable with card-mod, but would require quite a bit of CSS, especially in more complex card configs.

I like the idea, should def add a some sort of scaling option in the future.

@rdehuyss
Copy link
Author

🎉 👍

Glad you consider this feature request... thanks again!

@xydix
Copy link

xydix commented Oct 4, 2019

+1 👏👍
Maybe give us the option to set height of the card? Like, I want 50 pixels high. Like the lovelace-gap-card.
Could be useful on a wall mounted tablet to make the views look nice and fill the screen.

@kalkih
Copy link
Owner

kalkih commented Oct 5, 2019

Maybe give us the option to set height of the card? Like, I want 50 pixels high. Like the lovelace-gap-card.

This card is 40px/row, same as the core entity row dimensions which I try to follow as much as possible..
Plus 16px card padding (when not using the group option) which also seems to be the standard in Lovelace.

But you can customize the height/paddings manually by utilizing card-mod.

kalkih added a commit that referenced this issue Nov 27, 2019
* Initial scalable ui

* Add config option for scale

* add readme
@kalkih
Copy link
Owner

kalkih commented Dec 12, 2019

UI scaling is now supported in the latest release and there's two ways you can set it.

  • In the card config with the new scale option.
  • With the theme variable mini-media-player-scale.

The parameter is basically the multiplier, e.g. 0.5 will scale the UI to half of the original size, 1.5 will scale it to 150% of the original size.

The card option has priority and will override the theme variable mini-media-player-scale if it's set.

Let me know if you notice anything strange when scaling the card, thanks!

@kalkih kalkih closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants