Issue
I writing an app where i want to display a list of YouTube videos. But I want the list to display the video title with some other info but also show a thumbnail of the video like it does when we go www.youtube.com
Can someone help me please on How to display the thumbnail for a video URL?
Solution
Try this:
Parse video ID from the URL: this is the 'v' parameter in URL. I.e. 'xAiiwSXVRiw' in http://www.youtube.com/watch?v=xAiiwSXVRiw
Get the video metadata via Youtube Gdata URL: http://gdata.youtube.com/feeds/api/videos/xAiiwSXVRiw
Parse the XML that you get back and look for
<media:thumbnail url='..'>
. The 'url' attribute contains to the thumbnail url.
Answered By - Peter Knego
Answer Checked By - Terry (JavaFixing Volunteer)