svelte-lazy icon indicating copy to clipboard operation
svelte-lazy copied to clipboard

Lazy load breaking videos

Open davidmgrana opened this issue 4 years ago • 1 comments

Doesn't seem to be working for videos. Height is always defaulting to "auto"

davidmgrana avatar Oct 26 '21 21:10 davidmgrana

Hi, there. Thanks for your feedback. I tried videos and it seems to work for me. You can check the demo: https://svelte.dev/repl/6d7714fa3cce4909af6c6d187271e0a1?version=3.6.10 which contains following code snippet

<Lazy height={300}>
  <video controls height={300}>
    <source src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" />
  </video>
</Lazy>

Please note the two height props on <Lazy> and <video>. The former is optional and is mainly for the placeholder.

leafOfTree avatar Oct 28 '21 07:10 leafOfTree