Skip to content

Commit abfcf2f

Browse files
authored
Merge pull request #775 from Marssssssss/v2.1.4-realeasfor1727
let audio normally download when audio is playing
2 parents 400626f + 8f1ec4b commit abfcf2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

assets/cases/05_scripting/11_network/downloader-native/DownloaderCtrl.js

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ cc.Class({
128128
this.sprite.node.active = false;
129129
this.label.node.active = true;
130130
this.label.string = 'Downloading Audio';
131+
if (this._audioID !== -1) {
132+
cc.audioEngine.stop(this._audioID);
133+
}
131134
this._downloading = true;
132135
this._audioTask = this._downloader.createDownloadFileTask(this.audioUrl, this._storagePath + 'audioTest.mp3');
133136
},

0 commit comments

Comments
 (0)