In my android Activity I want to play video from YouTube through YouTube application or some other. For that I want to load thumbnails of the video in my activity.
Is this possible? If so, how?
Thumbnails and other images that violate our Community Guidelines aren't allowed on YouTube. Images include banners, avatars, Community posts, and any other YouTube feature that has images. If you find thumbnails or other images that violate this policy, report them.
YouTube puts the thumbnails of the video at a specific predictable URL. It would be a bit of a pain, but I'm sure you could find a way to display the images from the URL, or to download them and then display them.
Here's information on my blog on what those thumbnail URLs are.
I'll copy and paste what I wrote in the blog post:
Look at the link for the video–for example, http://www.youtube.com/watch?v=GDFUdMvacI0
Take the video ID
… the portion after “v=”
, in this case GDFUdMvacI0
. If the URL is longer than that, only go until the next ampersand. For example, http://www.youtube.com/watch?v=GDFUdMvacI0&feature=youtu.be
is the same, GDFUdMvacI0
.
Then just substitute your video ID for the video ID in the following URLs to these thumbnail images:
0.jpg
is a full-sized image. The other three are very small (120×90) and are taken automatically by YouTube from three certain points in the video.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With