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...
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; }
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.