1***@qq.com
1***@qq.com
  • 发布:2024-01-10 14:42
  • 更新:2024-01-10 14:42
  • 阅读:66

【报Bug】uni.chooseVideo录制视频确认之后页面白屏(小米14)

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 64

HBuilderX类型: 正式

HBuilderX版本号: 3.8.12

浏览器平台: 微信内置浏览器

浏览器版本: V8.9.15.9425

项目创建方式: HBuilderX

示例代码:

videoAdd() {
this.successResult = '';
this.failResult = '';
uni.chooseVideo({
maxDuration: 3, // 最大为10秒
count: 1,
compressed: true,
camera: 'front',
sourceType: ['camera'],
success: (res) => {
console.log('视频', res)
// let resSize = res.size / 1024 / 1024;
// console.log('视频大小', resSize)
// if (resSize > 6) {} else {
this.videoToBase64(res.tempFilePath);
// }
}
})
},
videoToBase64(url) {
var xhr = new XMLHttpRequest()
xhr.responseType = 'blob';
xhr.onload = () => {
let reader = new FileReader()
reader.onload = (e) => {
// console.log(e.target.result) //这里就是转好的Base64了
var data = e.target.result
var index = data.indexOf(',');
var base64 = data.substring(index + 1, data.length);
this.getTokenEvent(base64)
}
let rs = reader.readAsDataURL(xhr.response)
}
xhr.open('get', url)
xhr.send()
},

操作步骤:

使用小米14录制视频返回页面白屏

预期结果:

录制完视频会把视屏转成base64,把base64传给接口

实际结果:

页面空白

bug描述:

点击录制视频,录制两三秒确定,然后页面直接白屏

2024-01-10 14:42 负责人:无 分享
已邀请:

要回复问题请先登录注册