# Showing youtube video

**URL:** <https://www.ruby-forum.com/t/showing-youtube-video/189932>\
**Category:** Rails\
**Created:** [June 10, 2010, 5:53am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932 "2010-06-10T05:53:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 10, 2010, 5:53am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932/1 "2010-06-10T05:53:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 10, 2010, 7:12am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932/2 "2010-06-10T07:12:27Z")

</div>

Tushar G. 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:

Might Help.

Ragards,

Saurabh

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 10, 2010, 7:17am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932/3 "2010-06-10T07:17:52Z")

</div>

Thanks Saurabh.  
It is working fine.

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 10, 2010, 7:47am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932/4 "2010-06-10T07:47:21Z")

</div>

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 G. wrote:

> Thanks Saurabh.  
> It is working fine.

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [June 10, 2010, 9:03am UTC](https://www.ruby-forum.com/t/showing-youtube-video/189932/5 "2010-06-10T09:03:40Z")

</div>

Tushar G. 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 G. wrote:
> 
> > Thanks Saurabh.  
> > It is working fine.

Hi Tushar,

I have tried something like this:

if the youtube url is like  
[- YouTube](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](http://i4.ytimg.com/vi/sM-wckCGIEE/default.jpg) you will  
get the thumb image.

No idea how to show time.

Regards

Saurabh
