SoundJS サウンド登録を介してサウンドを読み込もうとすると、次のエラーが発生します。
createjs.js:15 Uncaught Error: Type not recognized.
私は、soundjs ライブラリにファイルの検索またはファイル拡張子に問題があると考えていますが、私が見たすべての例にインラインである .ogg を使用しています。
これが私のコードです:
createjs.Sound.alternateExtensions = ["mp3", "ogg"];
createjs.Sound.on("fileload", function(event) {
console.log(event);
}, this);
for (var i = 0; i < soundManifest.length; i++) {
soundManifest[i].loaded = false;
console.log("loading " + soundManifest[i].src);
createjs.Sound.registerSound(soundManifest[i].src, soundManifest[i].id)
}
soundManifest は、.ogg ファイルへのパスを指定するソース項目と ID を持つオブジェクトの配列です。パス名を 2 回、3 回チェックしたので、そうではないことは確かです。何か案は?私はChromeで開発しています。