別のドメインのmp3ファイルを必要とするHTML5オーディオAPIを使用してWebアプリケーションを作成しています。
mp3をとしてロードするためにこれを書きましたarraybuffer
が、これは別のドメインからファイルをロードできません。
makeSound.prototype.load = function(callback) {
var request = new XMLHttpRequest();
var that = this;
request.open("GET", this.url, true);
request.responseType = "arraybuffer";
request.onload = function() {
that.buffer = that.context.createBuffer(request.response, true);
that.reload();
callback(request.response);
}
request.send();
}
また、データはバイナリであるため、JSONPとしてリクエストする方法を見つけることができません。
回避策はありますか?