ilis/yii2-lazy-youtube

Accelerates the pages loadings with youtube videos using lazy load method

Installs: 34

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:CSS

Type:yii2-extension

v1.0.2 2016-11-29 13:18 UTC

This package is not auto-updated.

Last update: 2024-05-20 11:40:53 UTC


README

YouTube lazy load. Accelerate page loading with youtube video.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist ilis/yii2-lazy-youtube "*"

or add

"ilis/yii2-lazy-youtube": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \ilis\lazyyt\LazyYT::widget([
    'url' => 'https://www.youtube.com/watch?v=S5S9LIT-hdc'
]); ?>

or by short link to :

<?= \ilis\lazyyt\LazyYT::widget([
    'url' => 'https://youtu.be/S5S9LIT-hdc'
]); ?>