Yii 1.1: ejwplayer

EjwPlayer is a Yii widget for embedding JWPlayer 6.0 into your web applications



EjwPlayer is a Yii widget for embedding JWPlayer 6.0 into your web applications. If you have purchased the licensed player, swap out the files in 'assets' with your copies.

Github Repo: https://github.com/paulsz/EjwPlayer

*NOTE: I have not tested this widget with all possible combinations of JW settings. If you come accross any bugs, please let me know.


Either clone or unzip the directory into protected/extenstions/EjwPlayer (or other relevant folder based on your setup).


Here is an example of embedding a 2-video playlist, with 2 bitrates for each (270p and 720p):

<?php $this->widget('ext.EjwPlayer.EjwPlayer',array(
    'width' => 1280,
    'height' => 720,
    'title' => 'My Test Video',
    'controls' => 'false',
    'playlist' => array(
            'image' => '/sample-preview.jpg',
            'sources' => array(
                array('file' => '/videos/sample-270.mp4', 'height' => 270),
                array('file' => '/videos/sample-720.mp4', 'height' => 720),
            'image' => 'https://eduk-videos.s3.amazonaws.com/sey/2012-09-29/js-speaker5-preview.jpg',
            'sources' => array(
                array('file' => '/videos/sample2-270.mp4', 'height' => 270),
                array('file' => '/videos/sample2-720.mp4', 'height' => 720),
)); ?>


For a full list of JWPlayer configuation, see http://www.longtailvideo.com/support/jw-player/.

//Primary Configuration
$filepath = File destination for the video, if embedding only a single file and format
$streampath = Stream destination. Will be combined with $filepath to produce the source video
$image = Preview image for a single video
$title = Title of the video
$div = (default: 'media') The div id for the video. Make sure this is unique for each player on a page.

//Layout Configuration
$controls = (default: true) Whether to display player controls
$width = Width of the player
$height = Height of the player
$skin = Path to a skin file for this player
$stretching = (default: 'uniform') Options are: none, exactfit, uniform, fill

//Playback Configuration
$autostart = (default: 'false') Whether to start the video automatically
$fallback = (default: 'true') Whether to provide a download link if HTML5 and Flash not supported
$primary = (default: 'html5') The primary video player, either 'html5' or 'flash'
$mute = (default: 'false') Whether to remove audio
$repeat = (default: 'false') Whether to repeat the video after completition

//Advanced Configuration
$plugins = (Array) Optional plugins provided. See www.longtailvideo.com
$playlist = (Array) Playlist options. See example above.
$listbar = (Array) Playlist bar options. See http://www.longtailvideo.com/support/jw-player/28842/working-with-playlists/. $rtmp = (Array) Streaming options. See http://www.longtailvideo.com/support/jw-player/28854/using-rtmp-streaming
$captions (Array) Caption options. See http://www.longtailvideo.com/support/jw-player/28845/adding-video-captions

$logo = (Array) Configure your watermark. (Licensed versions only)
$ga = (Array) Google Analytics settings.
$key = Key for JW Ads

Total 3 comments

#18040 report it
TvdS at 2014/08/31 09:23am
Great extension

This is the best yii extension for jw player (also, the newest version of jw player afaik). Great work! Is it possible to add the option for responsiveness to the extension?


#16476 report it
turi at 2014/02/27 02:12am
Wav file support

Hi, I have been using jwplayer Yii extension and it supports wav file format.

But I tried to use this extension and it seems to be not supporting wav file... but works great with mp3 files.

#10834 report it
robregonm at 2012/11/26 06:20pm
Exactly what I needed

Downloading and testing... Looks great, congrats

Leave a comment

Please to leave your comment.

Create extension