提交 9364c299 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 修复部分情况下,视频封面获取失败的问题

上级 be19bd1f
......@@ -2,17 +2,17 @@ export default {
// 云存储服务商
cloudFile:{
// 云存储服务商,支持:aliyun、tencent、qiniu
provider: 'qiniu',
provider: 'aliyun',
},
uniPush: {
// 消息渠道设置,避免被限量推送、静默推送(静音且需下拉系统通知栏才可见通知内容)详情文档:https://doc.dcloud.net.cn/uniCloud/uni-cloud-push/api.html#channel
channel:{
// 渠道id
id: "114240",
id: "",
// 消息渠道描述,会显示在手机系统关于当前应用的通知设置中
desc: "客服消息"
desc: ""
}
},
// web端绑定的域名,用于生成二维码等
domain: 'https://im.dcloud.net.cn',
domain: 'http://localhost:8080/',
}
\ No newline at end of file
......@@ -58,21 +58,16 @@
this.videoPoster = '/uni_modules/uni-im/static/msg/video-uploading.gif'
// #endif
}else{
// 文件存储的服务商
const {provider} = config.cloudFile
switch (provider){
case 'aliyun':
this.videoPoster = this.videoUrl + '?x-oss-process=video/snapshot,t_1000,f_jpg,w_200,m_fast,ar_auto'
break;
case 'tencent':
this.videoPoster = this.videoUrl + '?imageView2/0/w/200'
break;
case 'qiniu':
this.videoPoster = this.videoUrl + '?vframe/jpg/offset/1/w/200'
break;
default:
break;
// 如果链接带?号则加&否则加?
this.videoPoster = this.videoUrl + (this.videoUrl.indexOf('?') > -1 ? '&' : '?')
// 根据文件存储的服务商,传不同的参数获取视频封面
const paramObj = {
aliyun: 'x-oss-process=video/snapshot,t_0,f_jpg,w_200,m_fast,ar_auto',
tencent: 'imageView2/0/w/200',
qiniu: 'vframe/jpg/offset/0/w/200'
}
this.videoPoster += paramObj[config.cloudFile.provider]
console.log('this.videoPoster',this.videoPoster);
}
},
deep: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册