This just happened and I’d like someone to confirm it before I go changing all my site code…
Using Zend framework to get YouTube videos and then VideoEntry and later getVideoThumbnails() the original thumbnail size array used to return in size order (smallest to biggest, an example in in this blog: http://www.reelseo.com/youtube-thumbnail-image/)
But testing a site just now, it seems they have put the biggest to the beginning, a dump of getVideoThumbnails() now gives:
array
0 =>
array
'time' => string '00:00:59' (length=8)
'height' => string '240' (length=3)
'width' => string '320' (length=3)
'url' => string '.....' (length=39)
1 =>
array
'time' => string '00:00:29.500' (length=12)
'height' => string '90' (length=2)
'width' => string '120' (length=3)
'url' => string '...' (length=39)
2 =>
array
'time' => string '00:00:59' (length=8)
'height' => string '90' (length=2)
'width' => string '120' (length=3)
'url' => string '...' (length=39)
3 =>
array
'time' => string '00:01:28.500' (length=12)
'height' => string '90' (length=2)
'width' => string '120' (length=3)
'url' => string '...' (length=39)
Can someone confirm this is correct or is my code playing up somewhere? I’ve searched for a notice stating the change but found nothing. If they have changed it, how can I sort this array by ‘height’ value?
Use
usortto sort the array by height.Example: