收藏
回答

录音示例代码无效

const recorderManager = wx.getRecorderManager()

recorderManager.onStart(() => {  console.log('recorder start')
})
recorderManager.onResume(() => {  console.log('recorder resume')
})
recorderManager.onPause(() => {  console.log('recorder pause')
})
recorderManager.onStop((res) => {  console.log('recorder stop', res)  const { tempFilePath } = res
})
recorderManager.onFrameRecorded((res) => {  const { frameBuffer } = res  console.log('frameBuffer.byteLength', frameBuffer.byteLength)
})const options = {
  duration: 10000,
  sampleRate: 44100,
  numberOfChannels: 1,
  encodeBitRate: 192000,
  format: 'aac',
  frameSize: 50}

recorderManager.start(options)

以上是官方示例代码,不想应,也不报错。

急用!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

回答关注问题邀请回答
收藏

1 个回答

  • 2018-04-10
    wx.getRecorderManager() 真机上输出空对象


    2018-04-10
    有用
    回复 1
    • Jessica
      Jessica
      2018-05-28

      请问问题解决了吗,我也遇到了同样的问题

      2018-05-28
      回复
登录 后发表内容