javascript download audio/mpeg content from different server with different origin
Is it possible to download audio/mpeg content from different server with different ori开发者_Go百科gin(like my server is www.a.com and the file is in www.b.com) with javascript on the browser. ps: like download and get 3rd byte of the file
JS doesn't really have any file-based operators, and you'd be running up against the same-origin security policies. You might be able to get the browser to download it by inserting an <object>
or similar tag into the DOM and have its source be the other server. But then you'd be stuck with a DOM object that wouldn't give you access to the raw bytes of the audio.
精彩评论