From 7c7f3d4e3ad27769f1fe18d1285448f4baa6130f Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 20 Aug 2018 18:38:06 +0800 Subject: [PATCH] cc.Audio.stop logic fix, pause should be invoked before set currentTime = 0 (#3121) --- cocos2d/audio/CCAudio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/audio/CCAudio.js b/cocos2d/audio/CCAudio.js index 918815cdca..568120454c 100644 --- a/cocos2d/audio/CCAudio.js +++ b/cocos2d/audio/CCAudio.js @@ -190,10 +190,10 @@ Audio.State = { proto.stop = function () { if (!this._element) return; + this._element.pause(); try { this._element.currentTime = 0; } catch (error) {} - this._element.pause(); // remove touchPlayList for (let i = 0; i < touchPlayList.length; i++) { if (touchPlayList[i].instance === this) {