微信小程序如何把ArrayBuffer 转为字符串啊
发布于 3 个月前 作者 18355352639 571 次浏览 来自 问答

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)
})
回到顶部