录制视频上传后放在video标签里,H5可以正常播放,在安卓上无法播放,显示黑屏。上传其他下载好的视频,都可以正常播放
previewVideo() {
var _this = this;
_this.addPhotoList = []
uni.chooseVideo({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['camera','album'], //从相册选择
success: async (res) => {
console.log(res)
var tempFilePaths = res.tempFilePath;
console.log(tempFilePaths)
uni.showLoading({
title: tempFilePaths
})
await this.$http.urlFileUpload("/api/resource/upload", {
files: [tempFilePaths],
name: "resource", //默认 file
onEachUpdate: res => {
},
onProgressUpdate: res => {
console.log("上传进度返回:", res);
}
}).then(res => {
console.log("全部上传完返回结果:", res);
this.list.push({
type:'video',
url:res.data.module
})
});
}
});
},
1 个回复
2***@qq.com
请问作者解决好了吗?我也遇到了相同的问题