tuyakhov/yii2-youtube Yii2 youtube extension

extension

Yii2 youtube extension

Yii2 youtube extension

Scrutinizer Code Quality Build Status Code Climate

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"tuyakhov/yii2-youtube": "*"

to the require section of your composer.json file.

Usage

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

Widget

    \tuyakhov\youtube\EmbedWidget::widget([
        'code' => 'vs5ZF9fRDzA',
        'playerParameters' => [
            'controls' => 2
        ],
        'iframeOptions' => [
            'width' => '600',
            'height' => '450'
        ]
    ]);

Validator

    public function rules()
    {
        return [
            ['youtube_code', CodeValidator::className()],
        ];
    }

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.0.0 is the latest of one release



MIT license
Stats
12 github stars & 4 github forks
0 downloads in the last day
14 downloads in the last 30 days
6322 total downloads