mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
remove setTimeout when stop audio (#2639)
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user