remove setTimeout when stop audio (#2639)

This commit is contained in:
PP
2018-05-08 10:23:19 +08:00
committed by pandamicro
parent f4568fada0
commit fbaf432017
+3 -11
View File
@@ -204,17 +204,9 @@ Audio.State = {
proto.stop = function () {
if (!this._element) return;
if (CC_WECHATGAME) {
setTimeout(function () {
try {
this._element.currentTime = 0;
} catch (error) {}
}.bind(this), 0);
} else {
try {
this._element.currentTime = 0;
} catch (error) {}
}
try {
this._element.currentTime = 0;
} catch (error) {}
this._element.pause();
// remove touchPlayList
for (var i=0; i<touchPlayList.length; i++) {