2017 © Pedro Peláez
 

yii2-extension yii2-videojs

VideoJs Player for Yii2

image

perminder-klair/yii2-videojs

VideoJs Player for Yii2

  • Tuesday, May 26, 2015
  • by perminder-klair
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,144 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

VideoJs Player for Yii2

VideoJs Player for Yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist perminder-klair/yii2-videojs "dev-master"

or add, (*4)

"perminder-klair/yii2-videojs": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

<?= \kato\VideojsWidget::widget([
    'options' => [
        'class' => 'video-js vjs-default-skin vjs-big-play-centered',
        'poster' => 'http://video-js.zencoder.com/oceans-clip.png',
        'controls' => true,
        'preload' => 'auto',
        'width' => '970',
        'height' => '400',
        'data-setup' => '{ "plugins" : { "resolutionSelector" : { "default_res" : "720" } } }',
    ],
    'tags' => [
        'source' => [
            ['src' => 'http://video-js.zencoder.com/oceans-clip.mp4', 'type' => 'video/mp4', 'data-res' => '360'],
            ['src' => 'http://video-js.zencoder.com/oceans-clip.mp4', 'type' => 'video/mp4', 'data-res' => '720'],
        ],
    ],
    'multipleResolutions' => true,
]); ?>

The Versions

26/05 2015

dev-master

9999999-dev

VideoJs Player for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 videojs