xj/yii2-jplayer-widget yii2-jplayer-widget

yii2-jplayer-widget

composer.json

"require": {
        "xj/yii2-jplayer-widget": "*"
},

example

<?php
//CircleAudio Player
echo xj\jplayer\CircleAudioWidget::widget([
    'mediaOptions' => [
        'm4a' => yii\helpers\Url::base() . '/upload/jplayer-example/Miaow-07-Bubble.m4a',
        'oga' => yii\helpers\Url::base() . '/upload/jplayer-example/Miaow-07-Bubble.ogg',
    ],
]);

//Audio Player
echo xj\jplayer\AudioWidget::widget([
    'mediaOptions' => [
        'title' => "Bubble",
        'm4a' => yii\helpers\Url::base() . '/upload/jplayer-example/Miaow-07-Bubble.m4a',
        'oga' => yii\helpers\Url::base() . '/upload/jplayer-example/Miaow-07-Bubble.ogg',
    ],
    'jsOptions' => [
        'supplied' => "m4a, oga",
        'wmode' => "window",
        'smoothPlayBar' => true,
        'keyEnabled' => true,
        'remainingDuration' => true,
        'toggleDuration' => true
    ],
]);

//Video Player
echo xj\jplayer\VideoWidget::widget([
    'tagClass' => 'jp-video jp-video-360p',
    'skinAsset' => 'xj\jplayer\skins\PinkAssets', //OR xj\jplayer\skins\BlueAssets
    'mediaOptions' => [
        'title' => "Big Buck Bunny",
        'poster' => yii\helpers\Url::base() . '/upload/jplayer-example/Big_Buck_Bunny_Trailer_480x270.png',
        'm4v' => yii\helpers\Url::base() . '/upload/jplayer-example/Big_Buck_Bunny_Trailer.m4v',
        'ogv' => yii\helpers\Url::base() . '/upload/jplayer-example/Big_Buck_Bunny_Trailer.ogv',
        'webmv' => yii\helpers\Url::base() . '/upload/jplayer-example/Big_Buck_Bunny_Trailer.webm',
    ],
    'jsOptions' => [
        'supplied' => "webmv, ogv, m4v",
        'size' => [
            'width' => "640px",
            'height' => "360px",
            'cssClass' => "jp-video-360p"
        ],
        'smoothPlayBar' => true,
        'keyEnabled' => true,
        'remainingDuration' => true,
        'toggleDuration' => true
    ],
]);
?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



2.9.0.1 is the latest of 4 releases



BSD-3-Clause license
Stats
4 github stars & 4 github forks
343 downloads in the last day
4143 downloads in the last 30 days
138120 total downloads