feat:调整特权卡-视频选择限制提醒方式
This commit is contained in:
@@ -205,8 +205,8 @@ class CreatePrivilegeCardDialog : BaseDialog<DialogCreatePrivilegeCardBinding>()
|
||||
this,
|
||||
canChooseGif = true,
|
||||
resultCode = REQUEST_CODE_OPEN_PHOTO_PROVIDER,
|
||||
maxFileSize = 1024 * 1024 * 20,
|
||||
videoMaxSecond = 15,
|
||||
// maxFileSize = 1024 * 1024 * 20,
|
||||
// videoMaxSecond = 15,
|
||||
showVideoType = "mp4"
|
||||
)
|
||||
}
|
||||
@@ -484,6 +484,14 @@ class CreatePrivilegeCardDialog : BaseDialog<DialogCreatePrivilegeCardBinding>()
|
||||
val path = photo.path
|
||||
Log.d(TAG, "onPhotoResult path:$path")
|
||||
if (path.endsWith("mp4") || photo.type.endsWith(Type.VIDEO)) {
|
||||
if (photo.duration > 15 * 1000) {
|
||||
SingleToastUtil.showToast("视频时长不能超过15秒")
|
||||
return
|
||||
}
|
||||
if (photo.size > (1024 * 1024 * 20)) {
|
||||
SingleToastUtil.showToast("上传文件最大不能超过20M")
|
||||
return
|
||||
}
|
||||
uploadVideo(photo)
|
||||
} else if (photo.path.endsWith(Type.GIF) || photo.type.endsWith(Type.GIF)) {
|
||||
uploadGif(path)
|
||||
|
Reference in New Issue
Block a user