I am trying to perform a hack, what my primary goal is to get the mp4 links of youtube videos. In past, I have been downloading the text file from http://www.youtube.com/get_video_info?video_id=videoid
and extracting the links from there, this works in the apps but in browser its not possible because its a cross site request and browsers do not allow it.
To counter this I used easyXDM, now the problem is the file is being downloaded on the user's machine instead of opening in Javascript. Here's the easyXDM code
$(document).ready(function(){ var socket = new easyXDM.Socket({
remote: "http://www.youtube.com/get_video_info?video_id=PBOBJRto728", // the path to the provider
onMessage: getVideo
});
});
Here's the page http://www.voltsoft.com/default.html, you can go there and see what's happening.
How can I read the data from the file in javascript?