The problem that the audio in load cannot play

This commit is contained in:
VisualSJ
2018-01-23 11:49:54 +08:00
parent c229ca8a82
commit 8c0a7a013c
+2 -2
View File
@@ -104,7 +104,7 @@ Audio.State = {
}
// If the resource does not exist
if (!item) {
if (!item || !item.complete) {
return cc.loader.load(src, function (error) {
if (!error) {
var item = cc.loader.getItem(src);
@@ -112,7 +112,7 @@ Audio.State = {
audio.emit('load');
}
});
} else if (item.complete) {
} else {
audio.mount(item.element || item.buffer);
audio.emit('load');
}