Showing youtube video

Hi, I want to build an functionality by which user will add the youtube video link into my app. After that he/she should be able to see the video in my application. Like in facebook you can add the video link and that video will be shown into facebook with the video's image and name.

Can anyone tell me how to do this? Is there any plugin/gem avaliable for this?

Thanks, Tushar

Tushar Gandhi wrote:

Hi, I want to build an functionality by which user will add the youtube video link into my app. After that he/she should be able to see the video in my application. Like in facebook you can add the video link and that video will be shown into facebook with the video's image and name.

Can anyone tell me how to do this? Is there any plugin/gem avaliable for this?

Thanks, Tushar

Hi Tushar,

Have to tried this:

<object width="480" height="385"><param name="movie" value="#{link you want to show for e.g. http://www.youtube.com/v/sM-wckCGIEE&hl=en_US&fs=1&\}"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="#{link you want to show for e.g. http://www.youtube.com/v/sM-wckCGIEE&hl=en_US&fs=1&\}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

Might Help.

Ragards,

Saurabh

Thanks Saurabh. It is working fine.

Hi, I have one problem. How can I get the video thumbnails like what we will see on youtube on right side? Thanks, Tushar Tushar Gandhi wrote:

Tushar Gandhi wrote:

Hi, I have one problem. How can I get the video thumbnails like what we will see on youtube on right side? Thanks, Tushar Tushar Gandhi wrote:

Thanks Saurabh. It is working fine.

Hi Tushar,

I have tried something like this:

if the youtube url is like http://www.youtube.com/v/sM-wckCGIEE&hl=en_US&fs=1& then split the code between v/ and &hl i.e try to fetch sM-wckCGIEE from above url then paste it in http://i4.ytimg.com/vi/sM-wckCGIEE/default.jpg you will get the thumb image.

No idea how to show time.

Regards

Saurabh