maksyutin/yii2-mediaelement

A complete HTML/CSS audio/video player built on top MediaElement.js and jQuery. For Yii2.

Installs: 577

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 1

Forks: 1

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2015-06-30 11:49 UTC

This package is not auto-updated.

Last update: 2024-11-23 18:55:00 UTC


README

A complete HTML/CSS audio/video player built on top MediaElement.js and jQuery. For Yii2.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist maksyutin/yii2-mediaelement "*"

or add

"maksyutin/yii2-mediaelement": "*"

to the require section of your composer.json file.

Usage

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

<?= maksyutin\mediaelement\AutoloadWidget::widget([
        'mediafile' => BaseYii::getAlias('@web').'/video/emailcap.mp4',
        'width' => 849,
        'height' => 478,
        'title' => 'Title',
        'modal' => true,
        'playerOptions' => [
            'defaultVideoWidth' => 480,
            'defaultVideoHeight' => 270,
            'keyActions' => '[]',
            'enableKeyboard' => true,
        ]
    ]);
    ?>