thibaudgg / video_info

Get video info from Dailymotion, Vimeo, Wistia, and YouTube URLs.
https://rubygems.org/gems/video_info
MIT License
428 stars 132 forks source link

How do you access the width of youtube thumbnails? #182

Closed abrambailey closed 1 year ago

abrambailey commented 6 years ago

The width per video thumbnail is returned in the hash as follows:

          "thumbnails"=>
           {"default"=>
             {"url"=>"https://i.ytimg.com/vi/b4ZnvU3QkRM/default.jpg",
              "width"=>120,
              "height"=>90},

However, these seems to be no method to get the width, say for example video.thumbnail_small.width

vheuken commented 6 years ago

@abrambailey That currently is not supported by the API. I can add this as a feature request, though I don't know when I'll have time to implement it.

abrambailey commented 6 years ago

Unfortunately we had to move to using the youtube api directly so we could get the proportions out, but definitely would be a great thing to have for your gem :)