在 IE11 中加载声音文件时遇到了一个奇怪的问题。我有大约十几个图像的清单,然后是大约 8 个声音文件。正在发生的情况是,在尝试加载声音文件时,即使对安全设置进行了最轻微修改的 IE11 版本也会挂起。没有错误,它只是挂起。有任何想法吗?
代码如下。在 Chrome、Safari、FireFox 和大多数 IE 中运行良好。只是在某些情况下,它会加载所有内容,直到发出声音,然后才停止。
var imagePath = "Game/images/";
var audioPath = "Game/sounds/";
manifest = [
{ src: imagePath + "BG.png", id: "bgImg" },
{ src: imagePath + "Game-Sign.png", id: "gameSign" },
{ src: imagePath + "Start-Title.png", id: "startTitle" },
{ src: imagePath + "Start-Button-Sprite.png", id: "btnStart" },
{ src: imagePath + "Continue-Button-Sprite.png", id: "btnContinue" },
{ src: audioPath + "clunk01.mp3", id: "sndClunk01" },
{ src: audioPath + "clunk02.mp3", id: "sndClunk02" },
{ src: audioPath + "clunk03.mp3", id: "sndClunk03" }
];
var queue;
queue = new createjs.LoadQueue(true);
queue.installPlugin(createjs.Sound);
createjs.Sound.alternateExtensions = ["ogg"];
queue.addEventListener("complete", handleComplete);
queue.loadManifest(manifest);