I have a question about embedding YouTube videos on a new website I'm working on. It is a collection of livesets from different festivals around the world. Each embedded video has its own page, but on the overview pages I use the thumbnails mqdefault.jpg/hqdefault.jpg,etc of the different videos. If you click on them you navigate to the page where the video is embedded. Is embedding the thumbnails this way allowed (directly linking to YouTube)? Embedding the video is ok if embedding is enabled, but I can't find anything about the thumbnails. I can retrieve the url with the YouTube API (or just guess it) so I presume it is not a problem.
Asked
Active
Viewed 1,655 times
1 Answers
0
You are dependent on static url scraping are not supported. They can get changed and you may need to change your application at everytime.
For this you should use Data API v3. You should go with a videos->list request with id=videoId and part=snippet. In the response you will check snippet.thumbnails.['high'].url
Upload Thumbnail example also lists the thumbnails. However, I use static url from google. I use
https://ytimg.googleusercontent.com/vi/<insert-youtube-video-id-here>/default.jpg
It work as same as othet static url. But if you don't want to change url of thumbnail every time static url change you can go with that. I use youtube for example very limited time and only for teaching how its work. But for your site you should use api. Hope it helps you.

Kumar
- 1,187
- 18
- 31