TarheelGrad1998 / gallery-card

A custom card for Home Assistant that will display images and/or videos from a folder in the style of a gallery.
99 stars 33 forks source link

Add option to disable preloading of videos #63

Closed N3rdix closed 1 year ago

N3rdix commented 1 year ago

In some scenarios the bandwidth is limited and preloading all the items in the menu takes a lot of time, for example when using a cellular connection. This might take more time to load the UI and eat up a lot of bandwidth (depending on the size of the videos). The preview might even not be needed at all for some users (as in my case).

With an option 'video_preload: false' a static icon can be displayed instead of the preview image and speed up the page loading. This is not a breaking change as nothing changes if the option is not present in the config.

Example lovelace card: image

N3rdix commented 1 year ago

Feedback, thoughts and improvements are appreciated

TarheelGrad1998 commented 1 year ago

Looks perfectly reasonable to me. Thanks.