mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
cc.Audio.stop logic fix, pause should be invoked before set currentTime = 0 (#3121)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user