Thanks @Steve, that also worked for me. I also wanted to show my
solution for thumbnails and images since something with the way
google sets up their objects in the API also changed. This makes
sure that if the video is hd that it will include the highest
resolution image in the viewer.
Tyler
June 8, 2015 at 5:53 pmThanks @Steve, that also worked for me. I also wanted to show my
solution for thumbnails and images since something with the way
google sets up their objects in the API also changed. This makes
sure that if the video is hd that it will include the highest
resolution image in the viewer.
In the _video object:
get_thumb: function(data) {
return PROT + ‘//img.youtube.com/vi/’+this.id+’/default.jpg’; },
get_image: function(data) {
if ( data.items[0].contentDetails.definition === ‘hd’ ) { return
PROT + ‘//img.youtube.com/vi/’+this.id+’/maxresdefault.jpg’; }
return PROT + ‘//img.youtube.com/vi/’+this.id+’/hqdefault.jpg’;
}