this.recorderManager.onStop((res) => {
this.getLocalFileBuffer(res)
.then(buffer => {
// uni.sendSocketMessage 似乎无效,服务端没收到消息
uni.sendSocketMessage({
data: buffer
})
})
});
getLocalFileBuffer(res) {
return new Promise((solve) => {
plus.io.resolveLocalFileSystemURL(res.tempFilePath, entry => {
entry.file(file => {
var fileReader = new plus.io.FileReader();
fileReader.readAsDataURL(file, 'utf-8');
fileReader.onloadend = function(evt) {
const buffer = uni.base64ToArrayBuffer(evt.target.result);
solve(buffer);
}
})
})
})
}
怀疑是类似问题 https://ask.dcloud.net.cn/question/161872
3 个回复
DCloud_UNI_WZF
App 安卓端复现该问题,感谢反馈,已加分
liyangDXL100
解决了吗?
DCloud_Android_ST
HX3.6.18+ 云打包机已更新修复该问题。请重新云打包修复该问题