iOS下,微信公众号jssdk的接口wx.onVoiceRecordEnd并不生效,导致在iOS录音中,一旦超过1分钟就会录音失败。
另外在iOS下,使用checkJsApi检查onVoiceRecordEnd和onVoicePlayEnd均显示为false。
Android无此故障,怀疑是微信iOS版本的专有bug。
iOS版本:13.6;微信 8.0.18
测试页面:https://z.timedg.com/2022/01weixin-jssdk-demo/audio-wx-share.html
同问,离谱24年也还有这问题
另附上checkJsApi结果:
iOS:
{ "checkResult": { "stopVoice": true, "onVoicePlayEnd": false, "uploadVoice": true, "playVoice": true, "stopRecord": true, "pauseVoice": true, "checkJsApi": true, "onVoiceRecordEnd": false, "startRecord": true, "downloadVoice": true }, "errMsg": "checkJsApi:ok" }
Android:
{ "checkResult": { "checkJsApi": true, "startRecord": true, "stopRecord": true, "onVoiceRecordEnd": true, "playVoice": true, "pauseVoice": true, "stopVoice": true, "onVoicePlayEnd": true, "uploadVoice": true, "downloadVoice": true }, "errMsg": "checkJsApi:ok" }