This widget encapsulates the jQuery youtube plugin for loading and handling Youtube videos and images in an easy an simple way.
Yii 1.1.6 or above...
<h2>Youtoube Example - video</h2> <?php $this->widget('ext.youtube.JYoutube', array( 'youtubeId'=>'otIJRaxaknc', )); <!-- youtoube --> <h2>Youtoube Example - clickable image</h2> <?php $this->widget('ext.youtube.JYoutube', array( 'type'=>'image', 'width'=>'400', 'height'=>'300', 'enableImageClickEvent'=>true, 'youtubeId'=>'kXD6Gtinvbc', 'options'=>array( 'autohide'=>TRUE, 'autoplay'=>TRUE, 'showinfo'=>TRUE, ) )); <!-- youtoube --> <h2>Youtoube Example - only image</h2> <?php $this->widget('ext.youtube.JYoutube', array( 'id'=>'youtube_1', 'type'=>'image', 'width'=>'300', 'height'=>'200', 'youtubeId'=>'DX1iplQQJTo', ));
Total 2 comments
I like javascript - this solution and build enterprise apps in intranets. So I can demant browser with javascript.
why use javascript for something like this?
Leave a comment
Please login to leave your comment.