if (isPause) { //在暂停状态
console.log('在暂停状态')
if (previousSrc == src) {
console.log('一样')
audioCtx.play()
} else {
console.log('不一样')
audioCtx.src = src
audioCtx.title = title //
audioCtx.singer = singer //
previousSrc = src
audioCtx.play()
}
} else { //不在暂停状态
console.log('不在暂停状态')
if (previousSrc == src) {
console.log('一样')
if (isIOS) {
console.log('ios')
// audioCtx.pause()
audioCtx.src = src
audioCtx.title = title //
audioCtx.singer = singer //
}
audioCtx.play()
} else {
console.log('不一样')
audioCtx.src = src
audioCtx.title = title //
audioCtx.singer = singer //
previousSrc = src
audioCtx.play()
}
}
播放暂停按钮绑定事件,在开发工具上运行正常。在手机上切换别的音频文件paly事件不生效
开发工具和真机调试是正常的,发布体验版部分机型异常 需要点击两次才能播放
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)