if( source == 'vimeo' )
url: 'http://www.vimeo.com/api/v2/video/' + videoid + '.json',
thumbnail = data.thumbnail_medium;
if( source == 'youtube')
thumbnail = 'http://i4.ytimg.com/vi/' + videoid + '/mqdefault.jpg';
// test result
For some reason, the "thumbnail" value is not preserved outside the ajax call, I suspect it's because I'm defining it wrongly. How would I go about doing it properly so that I could actually use the thumbnail value, please?
The success function is not run right away, so anything that you want done will need to be triggered from that success function itself.
This topic is now closed. New replies are no longer allowed.