This widget encapsulates the jQuery youtube plugin for loading and handling Youtube videos and images in an easy an simple way.
Requirements ¶
Yii 1.1.6 or above...
Usage ¶
- extract the file under .../protected/extensions
- put in a view a code blocks like the following...
<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',
)); ?>
Change log ¶
Version 1.0 ¶
- initial release
Version 1.1 ¶
- added demo application
- added minified javascript
i don't get it o.o
why use javascript for something like this?
i don't get it o.o
I like javascript - this solution and build enterprise apps in intranets. So I can demant browser with javascript.
Yiitube VS JYouTube
Both of them are easy to use. I used both of them, but like jyoutube more. Sometimes I need use video image (The 3rd example above).
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.