uni.chooseVideo({
count: 1,//只录制一个视频
sourceType: ['camera'],//开启视频相机
maxDuration: 10,//时长30s
mediaType: ['video'],//类型为视频
success: res => {
//录制成功
that.videoRecordingPath = res.tempFilePath;
uni.compressVideo({
src: res.tempFilePath,
quality: 'low', //'low':低,'medium':中,'high':高
success: function (res){
console.log('压缩后',res)
// that.videoUpload(res.tempFilePath);
},
fail: function (err) {
uni.showToast({
title:'视频压缩失败',
icon:'none'
},2000)
}
})
//存储到本地
},
fail: (err) => {
//提示
uni.showToast({
title: '视频录制失败!',
duration: 2000
});
}
})
网友回复
阿里云oss前端获取policy签名直传oss上传文件回调如何传?
如何将根据三维物体通过提示词变成可交互的4d场景动画?
浏览器中实时摄像头离线视觉ai模型有吗?
如何让ai基于Chromium内核开发自己的windows浏览器?
如何将自己从小生活的农村村庄做成3d可漫游的高斯泼溅?
同一个iframe多次write包含three的html为啥报错不显示Failed to execute 'write' on 'Document': Identifier 'scene' has a
软件工程师的工作内容将由敲代码转变成使用ai来解决现实世界的问题?
claude skills如何本地自动剪辑生成视频?
物理ai是2026年的趋势吗?
ai能对老相机拍摄的底片进行修复成彩色照片吗?


