微信小程序如何把ArrayBuffer 转为字符串啊

发布于 7 年前作者 183553526393801 次浏览最后编辑 7 年前来自 ask

recorderManager.onFrameRecorded((res) => { console.log(res) const { frameBuffer } = res console.log(frameBuffer) console.log(‘frameBuffer.byteLength’, frameBuffer.byteLength)

  //frameBuffer转换成字符串
  let unit8Arr = new Uint8Array(frameBuffer)
  let encodedString = String.fromCharCode.apply(null, unit8Arr)
  console.log(encodedString)
})
0 回复
暂无回复