question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Howto use lozad with videos?

See original GitHub issue

Hey! I’ve included lozad.js with the cdn <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script> and I use this code for inserting my video:

<video class="lozad" autoplay muted loop playsinline poster="488x488.png">
    <source data-src="files/videos/test.mp4" type="video/mp4">
</video>

If I then paste

const observer = lozad();
observer.observe();

in the console it adds the data-loaded="true" to the <video> but nothing happens. Am I doing something wrong? I thought it would convert data-src to src

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
ApoorvSaxenacommented, Sep 3, 2018

@obendev this should be fixed in Lozad.js

1reaction
ApoorvSaxenacommented, Jan 31, 2019

this has been fixed in v1.8.0, thanks to @Levdbas

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learning About Lizards | Educational Videos for Kids - YouTube
Today we explore the interesting world of lizards by learning more about the Western Fence Lizard. Do you want to know how lizards...
Read more >
Catching a Lizard Using NOTHING but WATER! - YouTube
Your browser can't play this video. Learn more.
Read more >
How to Operate a CR-Scan Lizard? - YouTube
In this video, we will show you how to operate our new scanner CR-Scan Lizard.Buy now: Standard Combo: ...
Read more >
You'll NEVER guess how I caught this lizard! - YouTube
Your browser can't play this video. ... Monitor lizards are far and away the largest lizards on earth and a variety of their...
Read more >
Lizards For Kids! Learn All About Lizards With Diggy Dog!
Kids learn all about Lizards with Diggy Dog. In this fun and educational video children learn about lizards, where they live and what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found