Script to Download a video, and convert it to gif, with Phonegap