wx.chooseVideo api compressed参数
在Android上好像没有效果呢,我选择了基础库版本1.6.0.
手机是vivo
录完视频,点使用视频,还是有压缩的提示
在Android上好像没有效果呢,我选择了基础库版本1.6.0.
手机是vivo
录完视频,点使用视频,还是有压缩的提示
安卓部分机型存在设置了
compressed: false |
仍然会弹出压缩,且压缩时间很长。
已知的机型有:
华为荣耀8,操作系统版本号7.0;
OPPO R9,操作系统版本号7.1.1;
微信App版本号均为截止11.28最新版本
Page({
/**
* 页面的初始数据
*/
data: {
isShow: “none”,
tempPath: “”,
duration: 0,
dataSize: 0,
videoWidth: 0,
videoHeight: 0
},
/**
* 加入视频
*/
addVideoTap: function (e) {
var that = this;
wx.chooseVideo({
sourceType: [‘album’, ‘camera’],
maxDuration: 60,
camera: ‘back’,
compressed: false,
success: function (res) {
that.setData({
isShow: “block”,
tempPath: res.tempFilePath,
duration: res.duration,
dataSize: res.size/1024,
videoWidth: res.width,
videoHeight: res.height,
});
}
});
},
/**
* 保存视频
*/
saveVideoTap: function () {
// 保存视频
var path = this.data.tempPath;
console.log(“路径:”, path);
wx.saveVideoToPhotosAlbum({
filePath: path,
success: function (res) {
console.log(“保存成功:”, res.errMsg);
wx.showToast({
title: “保存成功”,
icon: ‘success’,
duration: 5000
});
}
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})