Villhellm / lovelace-animated-background

Animated backgrounds for lovelace
195 stars 61 forks source link

Make Removing Existing Background a Configurable Option #29

Closed flexage closed 4 years ago

flexage commented 4 years ago

Love your work on this.

I see you've done some good code around setting any existing css background to transparent.

My setup has a scenario where I'm using a background image, and a semi-transparent background colour on it, to give it a glassy/opaque look that matches my theme, and helps mute the background image so it doesn't interfere with the ui.

The CSS I'm using is essentially this one liner:

background: linear-gradient(#241b2fdd, #241b2fdd), center / cover no-repeat  url("/local/backgrounds/synthwave-2.jpg") fixed;

The effect can be seen in this screenshot:

Screenshot 2020-05-20 at 2 38 32 am

It would be great to be able to replicate this effect whilst using your video background plugin.

Describe the solution you'd like It would be great if we could add a config setting, that allows us to disable setting the background to transparent (in the removeDefaultBackground() function.

I guess you would probably still default to removing any default background (as this is probably the most common expectation when using this), but having the ability to disable that would allow me to modify the CSS I used above, to something like the following, which only sets the partially transparent background, and not also the background image as before:

background: linear-gradient(#241b2fdd, #241b2fdd);

That way, I can still have the purple overlaying the video, as to dull it down on mute it's visiblility, and not interfere with the UI elements on top.

Thanks again for your great work.

Villhellm commented 4 years ago

Added in release v0.6.1

flexage commented 4 years ago

Top man, you have my sincere thanks!