Jeevan Dongre
Jeevan Dongre

Reputation: 4649

Displaying thumbnail of the video

Hello all In my application, the user will copy and paste the video link of youtube in a text box and once he clicks on the add button I have to display the thumbnail of the video.

How do you render the video thumbnail from the YouTube page?

I am using Jquery and HTML5 at the front end

Upvotes: 3

Views: 1565

Answers (2)

Omiod
Omiod

Reputation: 11623

It is very easy to get a YouTube thumbnail.

Consider a typical YouTube URL: http://www.youtube.com/watch?v=VIDEOCODE

Extract the VIDEOCODE part, and use one of the following URLs for different flavours:

http://img.youtube.com/vi/VIDEOCODE/0.jpg

http://img.youtube.com/vi/VIDEOCODE/1.jpg

http://img.youtube.com/vi/VIDEOCODE/2.jpg

Upvotes: 2

Chris
Chris

Reputation: 3795

There is a jQuery plugin for grabbing a YouTube thumbnail from the url you provide.

Take a look at: http://custom-drupal.com/jquery-demo/jyoutube/

http://plugins.jquery.com/project/jyoutube

Upvotes: 1

Related Questions