cc.Audio.stop logic fix, pause should be invoked before set currentTime = 0 (#3121)

This commit is contained in:
James Chen
2018-08-20 18:38:06 +08:00
committed by pandamicro
parent 0e8b4ec3e1
commit 7c7f3d4e3a
+1 -1
View File
@@ -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) {