New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lazy-youtube

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazy-youtube

A JavaScript module to lazy load Youtube iframe videos

latest
Source
npmnpm
Version
2.2.0
Version published
Maintainers
1
Created
Source

lazy-youtube.js

Build Status

Description

This is a JavaScript module to lazy load Youtube videos, Browserify/Node.js-style fork of https://github.com/tylerpearson/lazyYT, that does not depend on jQuery. On the initial load, the div will be appended by a preview img of the video. On click of the image, the preview img will be replaced by the autoplaying iframe Youtube video.

Setup

npm install lazy-youtube

HTML:

<div class="lazyYT" data-youtube-id="_oEA18Y8gM0" ></div>

JavaScript:

var lazyYoutube = require('lazy-youtube');

// Init element
lazyYoutube(element);

CSS:

Add lazyyt.css into the page

License

(CC) Creative Commons

Keywords

lazy load

FAQs

Package last updated on 07 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts