lazy-load-youtube-videos

Optimizing the performance while loading multiple YouTube videos on the same page

Usage no npm install needed!

<script type="module">
  import lazyLoadYoutubeVideos from 'https://cdn.skypack.dev/lazy-load-youtube-videos';
</script>

README

lazy-load-youtube-videos

Optimizing the performance while loading multiple YouTube videos on the same page

Synopsis

Loading a number of iframe requires a great deal of time fetching resources. Under this situation, only thumbnails are loaded and the video is triggered only when its thumbnail is being clicked.

CDN

Download the compressed, production version

https://cdn.rawgit.com/wingkwong/lazy-load-youtube-videos/master/src/llyv.min.js

https://cdn.rawgit.com/wingkwong/lazy-load-youtube-videos/master/src/llyv.min.css

Download the uncompressed, development version

https://cdn.rawgit.com/wingkwong/lazy-load-youtube-videos/master/src/llyv.js

https://cdn.rawgit.com/wingkwong/lazy-load-youtube-videos/master/src/llyv.css

Demonstration

Demo is available at https://wingkwong.github.io/lazy-load-youtube-videos/index.html

Authors

WONG, Wing Kam - @wingkwong

License

This project is licensed under the MIT License - see the LICENSE file for details