Yii 1.1: jw-player

JW Player is the most popular video player on the web, live on over 2 million sites.
4 followers

JW Player is the most popular video player on the web, live on over 2 million sites.

Requirements

Yii 1.1 or above

Usage

<?php
$this->widget('ext.jwplayer.Jwplayer',array(
    'width'=>'auto',
    'height'=>360,
    'file'=>'the file of the demo.mp4', // the file of the player, if null we use demo file of jwplayer
    'image'=>'the image of the demo.jpg', // the thumbnail image of the player, if null we use demo image of jwplayer
    'options'=>array(
        'controlbar'=>'bottom'
    )
));
?>

Resources

...external resources for this extension...

Total 1 comment

#17937 report it
martijnjonkers at 2014/08/13 06:26am
bug

I noticed a bug in the player, the file and image do no not get applied to the options.

i changed the following code:

if ($this->file===null){
   $this->options['file']=$this->_assetsUrl.'/video.mp4';
}
if ($this->file===null && $this->image===null){
   $this->options['image']=$this->_assetsUrl.'/preview.jpg';
}

to

if ($this->file===null){
   $this->options['file']=$this->_assetsUrl.'/video.mp4';
} else {
   $this->options['file']=$this->file;
}
if ($this->file===null && $this->image===null){
   $this->options['image']=$this->_assetsUrl.'/preview.jpg';
} else {
   $this->options['image']=$this->image;
}

Leave a comment

Please to leave your comment.

Create extension
Downloads