- 小程序转为多端应用可以在息屏状态保持websocket链接吗?
息屏状态如何保持websocket链接,息屏状态可以唤起wx.createInnerAudioContext播放音频吗?我在息屏状态下播放音频报错{"errMsg": "operateAudio:fail:App is paused or background", "errCode": -1}
01-05 - 多端应用模式调用微信同声传译插件的textToSpeech方法报错?
代码如下 const plugin = requirePlugin('WechatSI'); const sayTips = text => { const innerAudioContext = wx.createInnerAudioContext({ useWebAudioImplement: false }); plugin.textToSpeech({ lang: 'zh_CN', content: text, success: function (res) { innerAudioContext.src = res.filename; innerAudioContext.play(); }, fail: function (err) { console.error("sayTips fail", err); } }); } 小程序正常调用,多端应用模式报错{"retcode": -20003, "msg": "text to speech inner server failed."},似乎是插件内请求服务端的时候没有携带请求头X-WECHAT-HOSTSIGN
01-03