fix replay audio after audio stop on alipay platform #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
changeLog:
原因是 audio.seek(0) 之后底层又让他重新播放了。这里直接就调用 audio.stop() 接口吧
之前用
pause() + seek(0)
主要是因为在微信百度上,调 stop 之后,currentTime 是不会设置为 0 的但是这个问题本身就不应该是我们来做处理的,stop 之后的 currentTime 是什么,取决于平台方的底层实现。引擎适配层不做处理
以后类似这样的 issue,我们都不应该处理 cocos/2d-tasks#1447
如果真的要解决应该反馈给平台方处理