how to get video thumbnail of youtube video in android list in android [duplicate]

烈酒焚心 提交于 2019-12-02 23:17:47
Hiren Dabhi

It is not possible to get a direct thumbnail of YouTube video, because actually it redirects the URL. If your URL is direct video URL then only you can get the thumbnail of that video.

You can get a thumbnail of your YouTube video using http://img.youtube.com/vi/VIDEO_ID/default.jpg by replacing VIDEO_ID with your own video's ID. This is fixed link for any YouTube video.

Hope this helps.... :)

How are you getting the list of URLs ?

Read the Google Data API reference : http://code.google.com/apis/youtube/2.0/reference.html#Overview

You can post further queries with the video-id to get the thumbnail image directly which you could display. thumbnail metadata looks like this : [media:thumbnail url='http://img.youtube.com/vi/8aYQ_wjmriQ/2.jpg' height='90' width='120' time='00:01:23' yt:name='default'/]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!