https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html
我进入游戏后用createInnerAudioContext创建了一个背景音乐,切到后台再回前台就没声音了,但是点一下屏幕随便一个地方就能继续播
框架类型 | 问题类型 | 操作系统 | 操作系统版本 | 手机型号 | 微信版本 |
---|---|---|---|---|---|
小游戏 | Bug | Android | 安卓10 | 都有 | 7.0.16 |
https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html
我进入游戏后用createInnerAudioContext创建了一个背景音乐,切到后台再回前台就没声音了,但是点一下屏幕随便一个地方就能继续播
Framework type problem type operating system operating system version mobile phone model wechat version small game bug Android Android 10 all have 7.0.16 https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html After I entered the game, I created a background music with the createinnereaudiocontext. After switching to the background and returning to the foreground, there was no sound, but clicking on the screen could continue playing anywhere
回答:
回到前台,要不要播放,开发者自己控制的,可以参考官方的小游戏api调用demo(https://github.com/wechat-miniprogram/minigame-demo)