PHP code example of cacko / yii2-widget-video

1. Go to this page and download the library: Download cacko/yii2-widget-video library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cacko / yii2-widget-video example snippets


VideoWidget::widget([
  'url' => 'https://www.youtube.com/watch?v=N4q2kBe82-o',
])
  

Yii::$container->set('Cacko\Yii2\Widgets\Video\Models\ScreenshotInterface', MyJunkPersistanceCrap::class);

    'components' => [

        'youtubeApi' => [
            'class' => 'Cacko\Yii2\Widgets\Video\Components\YouTube\Api',
            'youtubeKey' => 'xxxx',
        ],
        'twitchApi' => [
            'class' => 'Cacko\Yii2\Widgets\Video\Components\Twitch\Api',
            'clientId' => 'xxx',
            'secretId' => 'xxx',
        ]