mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
Interrupt callback when _src changes.
This commit is contained in:
@@ -114,7 +114,7 @@ Audio.State = {
|
||||
// If the resource does not exist
|
||||
if (!item || !item.complete) {
|
||||
return cc.loader.load(src, function (error) {
|
||||
if (!error) {
|
||||
if (!error && src === audio._src) {
|
||||
var item = cc.loader.getItem(src);
|
||||
audio.mount(item.element || item.buffer);
|
||||
audio.emit('load');
|
||||
|
||||
Reference in New Issue
Block a user