wx.compressVideo组件在安卓手机中可以压缩挺多的。但是在iPhone手机中压缩视频前后的大小基本不变。微信版本:7.0.12。基础库2.12.2,测试手机iphone8。
wx.compressVideo({
bitrate: 720,
fps: 60,
quality: 'medium',
resolution: 1,
src: videoList[0].tempFilePath,
success(comRes) {
console.log("comRes=-==", comRes)
if (comRes.size / 1024 > 45) {
that.setUpload(2)
} else {
console.log("压缩完成", new Date())
videoList[0] = comRes;
that.uploading(imgList, videoList, data)
}
},
fail(comErr) {
that.setUpload(2)
console.log("comErr=-==", comErr)
}
})