javascript
var audioContext = new window.AudioContext(); var x = new XMLHttpRequest(); x.open('GET','http://vsco.qiniudn.com/1771178738.m4a',true); x.responseType='arraybuffer'; /*...???...*/ x.onload = function() { audioContext.decodeAudioData(x.response, function(buffer) { /*...???...*/ } } x.send();
我尝试了好多方法 好像都不可以!
audiocontext需要拿到整个文件才能解码 我记得是这样子