wx.chooseVideo 上传视频压缩问题 | 您所在的位置:网站首页 › h5视频压缩上传不了 › wx.chooseVideo 上传视频压缩问题 |
小程序项目中 使用wx.chooseVideo上传用户相册视频,视频大小不限,本地限制了时长15分钟. 使用中出现以下问题:1. 苹果手机上传700M视频时压缩为120M视频, 小米手机上传1.8G 视频时 压缩后还是1.8G (是否视频过大无法压缩?还是个别安卓手机问题?) 测试机型苹果X 和 小米mix 2s 2.低微信版本会提示:"压缩视频大于25M,无法上传" 文档中未写明最低版本号,希望告知,方便在发布时设置. ----------------------以下为选择视频代码---------------------------- wx.chooseVideo({ sourceType: ['album'], compressed: true, success: function (res) { console.log(res) if (res.duration > 960){ wx.showModal({ title: '抱歉', content: '视频长度超过15分钟,无法上传!', showCancel: false,// Boolean 否 是否显示取消按钮,默认为 true success: function (res) { if (res.confirm) { console.log('用户点击确定') } } }) return false; } videosrc = res.tempFilePath }, fail: function (res) { console.log(res) } }) |
CopyRight 2018-2019 实验室设备网 版权所有 |