ilis / yii2-lazy-youtube
Accelerates the pages loadings with youtube videos using lazy load method
Package info
github.com/stellio/yii2-lazy-youtube
Language:CSS
Type:yii2-extension
pkg:composer/ilis/yii2-lazy-youtube
v1.0.2
2016-11-29 13:18 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2026-03-09 20:40:13 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' ]); ?>