当前位置:网站首页>uniapp 制作手机app程序, 使用uni.chooseVideo录制视频,视频播放模糊分辨率低的原因
uniapp 制作手机app程序, 使用uni.chooseVideo录制视频,视频播放模糊分辨率低的原因
2022-06-25 03:44:00 【gblfy】
原因:compressed参数是true,这个参数的意思是‘是否压缩所选的视频源文件,默认值为 true,需要压缩’。如果不加这个参数默认就是true,就会默认压缩视频播放出来就是模糊的,改为false就可以了
可以参考uniapp API开发文档 uni.chooseVideo
uni.chooseVideo({
maxDuration: 60,
count: 1,
compressed:false,//是否压缩所选的视频源文件,默认值为 true,需要压缩。
// camera: this.cameraList[this.cameraIndex].value,
sourceType: ['camera'],
success: (responent) => {
this.videoPath = responent.tempFilePath;
// this.src = responent.tempFilePath; //头条
}
})
抖音真实需求案例
uni.chooseVideo({
compressed:false,//是否压缩所选的视频源文件,默认值为 true,需要压缩。
sourceType: ['album','camera'],
success(e) {
uni.navigateTo({
url: "/pages/publish/publish?fileObjectEvent=" + JSON.stringify(e)
})
/**
* 或者采用uniCloud,在客户端完成上传,减少链路,因为文件大,通信链路和耗时是双倍的
*/
}
})
边栏推荐
- Deveco studio 3.0 editor configuration tips
- 签到功能完成03《ivx低代码签到系统制作》
- Maintenant, les oreilles vont entrer dans le métacosme.
- China's SkyEye found suspicious signals of extraterrestrial civilization. Musk said that the Starship began its orbital test flight in July. Netinfo office: app should not force users to agree to proc
- redis
- BGP biplane architecture
- Maybe it's the wrong reason
- Lao Ye's blessing
- [rust contribution] implement Message Oriented Middleware (6) -client from zero
- 【Rust投稿】从零实现消息中间件(6)-CLIENT
猜你喜欢

Sun Wu plays Warcraft? There is a picture and a truth

多睡觉,能减肥,芝加哥大学最新研究:每天多睡1小时,等于少吃一根炸鸡腿...

What is an SSL certificate and what are the benefits of having an SSL certificate?

发布功能完成02《ivx低代码签到系统制作》

Maintenant, les oreilles vont entrer dans le métacosme.

Redis related-01

香蕉为什么能做随机数生成器?因为,它是水果界的“辐射之王”

吴恩达机器学习新课程又来了!旁听免费,小白友好

Peking University has a new president! Gongqihuang, academician of the Chinese Academy of Sciences, took over and was admitted to the Physics Department of Peking University at the age of 15

Xidian AI ranked higher than Qingbei in terms of AI majors, and Nantah ranked the first in China in 2022 in terms of soft science majors
随机推荐
X86 CPU, critical! The latest vulnerability has caused heated discussion. Hackers can remotely steal keys. Intel "all processors" are affected
Redis related-03
Tianshu night reading notes - 8.4 diskperf disassembly
Sun Wu plays Warcraft? There is a picture and a truth
【Rust投稿】从零实现消息中间件(6)-CLIENT
TensorFlow,危!抛弃者正是谷歌自己
Why can banana be a random number generator? Because it is the "king of radiation" in the fruit industry
Huawei failed to appeal and was prohibited from selling 5g equipment in Sweden; Apple regained the first place in the world in terms of market value; DeNO completes round a financing of USD 21million
Preparedstatement principle of preventing SQL injection
马斯克:推特要学习微信,让10亿人「活在上面」成为超级APP
亚马逊在中国的另一面
服乔布斯不服库克,苹果传奇设计团队解散内幕曝光
Is it safe to open an account on the compass? Is it reliable?
ASP. Net conference room booking applet source code booking applet source code
你真的需要自动化测试吗?
現在,耳朵也要進入元宇宙了
Do you really need automated testing?
MySQL modifies and deletes tables in batches according to the table prefix
Standing at the center of the storm: how to change the engine of Tencent
Comprehensive operation of financial risk management X of Dongcai