GithubHelp home page GithubHelp logo

yii2-jplayer-widget's Introduction

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
    ],
]);
?>

yii2-jplayer-widget's People

Contributors

xjflyttp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.