Вопрос

I made this project http://tinyurl.com/nowimlisteningto . This is a website that plays Youtube videos as a playlist. one after the other. I want to make my site visually nicer and was thinking of changing the background image of the site to a sample frame from the Youtube video that is currently playing.

Is it possible to do such a thing? Im use a java server and jsp files in my project, some html, javascript, css.

Edit: Here some usefull link i found.

Player Background Thumbnail (480x360 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/0.jpg
Normal Quality Thumbnail (120x90 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/default.jpg
Medium Quality Thumbnail (320x180 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/mqdefault.jpg
High Quality Thumbnail (480x360 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/hqdefault.jpg
Start Thumbnail (120x90 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/1.jpg
Middle Thumbnail (120x90 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/2.jpg
End Thumbnail (120x90 pixels):   http://i1.ytimg.com/vi/HIrMIeN5ttE/3.jpg
And additionally, the next two thumbnails may or may not exist. For HQ videos they exist.

Standard Definition Thumbnail (640x480 pixels):     http://i1.ytimg.com/vi/HIrMIeN5ttE/sddefault.jpg
Maximum Resolution Thumbnail (1920x1080 pixels):     http://i1.ytimg.com/vi/HIrMIeN5ttE/maxresdefault.jpg
Это было полезно?

Решение

You can create img url based on its id

for video

https://www.youtube.com/watch?v=XXXXXXXXXX

it will be like

https://i2.ytimg.com/vi/XXXXXXXXXX/mqdefault.jpg
https://i2.ytimg.com/vi/XXXXXXXXXX/hqdefault.jpg

first part can be i1, i2 ... you can use i1 (several servers so use any) last part declare img resolution. Better to save images to your own server

the best variant will be http://img.youtube.com/vi/XXXXXXXXXX/maxresdefault.jpg

check this question and this link

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top