We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b158fdc + 7282584 commit 1c8ec50Copy full SHA for 1c8ec50
cocos2d/audio/CCAudio.js
@@ -315,7 +315,10 @@ cc.Audio = cc.Class.extend({
315
if(self._ignoreEnded){
316
self._ignoreEnded = false;
317
}else{
318
- self._playing = false;
+ if(!self._pause)
319
+ self.stop();
320
+ else
321
+ self._playing = false;
322
}
323
};
324
},
@@ -671,13 +674,6 @@ cc.Audio = cc.Class.extend({
671
674
672
675
audio.play(0, loop);
673
676
audio.setVolume(this._musicVolume);
- function cbEnd(){
- if (!this._currMusic._pause) {
- this.stopMusic();
677
- }
678
679
- var cbEndWithContext = cbEnd.bind(this);
680
- audio._currentSource.onended = cbEndWithContext;
681
682
this._currMusic = audio;
683
0 commit comments