mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
The problem that the audio in load cannot play
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user