dev-master
9999999-devSimple widget you tube for yii2
MIT
The Requires
by Petrenko Aleksandr
yii2 you tube widgwt simple
Simple widget you tube for yii2
Simple widget you tube for yii2, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist vision/yii2-you-tube-widget "dev-master"
or add, (*4)
"vision/yii2-you-tube-widget": "dev-master"
to the require section of your composer.json
file., (*5)
Options: "https://developers.google.com/youtube/player_parameters?playerVersion=HTML5&hl=ru#playerapiid", (*6)
Events: "https://developers.google.com/youtube/js_api_reference?hl=ru#EventHandlers", (*7)
Once the extension is installed, simply use it in your code by :, (*8)
Minimum:, (*9)
= \vision\ytbwidget\YouTube::widget([ 'videoId' => 'OQQpukc_IM4' ]) ?> = \vision\ytbwidget\YouTube::widget([ 'videoId' => 'MA6tk7u44mM', 'divId' => 'myDiv', //if set this option in js Globals you player is var player_myDiv, else player_{random val} 'playerVars'=>[ 'modestbranding'=>1 ], 'events' => [ 'onStateChange' => 'function (event) { if (event.data == YT.PlayerState.PLAYING) { console.log("Playing.."); }else if (event.data == YT.PlayerState.PAUSED){ console.log("Paused.."); }else{ console.log("Buffering/Video Ended"); } }' ] ]) ?>
Simple widget you tube for yii2
MIT
yii2 you tube widgwt simple