xj / yii2-jplayer-widget
yii2-jplayer-widget
Installs: 176 013
Dependents: 2
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- bower-asset/circleplayer: *
- bower-asset/jplayer: 2.9.*
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-10-10 20:24:16 UTC
README
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 ], ]); ?>