视频返回宽高有误
发布于 5 年前 作者 hyin 9325 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

由于压缩视频分辨率太低,故此采用不压缩的方式,设置compressed:false,但是产生了新的问题,无论是横屏还是竖屏,返回的宽高都是1920*1080,这是我的手机的原始宽高,也就是说设置不压缩视频后,返回的宽高出现问题,不能判断是竖屏还是横屏

  • 预期表现

根据宽高的比较判断横竖屏

  • 复现路径
  • 提供一个最简复现 Demo

wx.chooseVideo({

sourceType: [‘camera’],

maxDuration: 10,

compressed: false, //不压缩视频

success: (res) => {

console.log(res)

// duration,height,tempFilePath,width

if (res.duration > 10) {

showToast(‘text’, ‘建议10秒左右的视频’)

this.calculateHeight();

return

}

this.sendVideoToNos(res)

console.log(res.width,res.height)

},

})

5 回复

问题已记录,后续修复。

楼楼这个问题解决了吗

https://api.act-u.cn/sv/26ed9e0b-1673ec4c604/26ed9e0b-1673ec4c604.mp4


视频链接

遇到了同样的问题

回到顶部