# uni.saveVideoToPhotosAlbum(options)

保存视频到系统相册

# saveVideoToPhotosAlbum 兼容性

Web Android iOS
x 4.18 4.18

# 参数

名称 类型 必填 默认值 兼容性 描述
options SaveVideoToPhotosAlbumOptions - - -
名称 类型 必备 默认值 兼容性 描述
filePath string.VideoURIString - - 视频文件路径,可以是临时文件路径也可以是永久文件路径
success (callback: SaveVideoToPhotosAlbumSuccess) => void | null - - 接口调用成功的回调函数
fail (callback: IMediaError) => void | null - - 接口调用失败的回调函数
complete (callback: any) => void | null - - 接口调用结束的回调函数(调用成功、失败都会执行)
# IMediaError 的属性值
名称 类型 必备 默认值 兼容性 描述
errCode 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010 - - 错误码
- 1101001 用户取消
- 1101002 urls至少包含一张图片地址
- 1101003 文件不存在
- 1101004 图片加载失败
- 1101005 未获取权限
- 1101006 图片或视频保存失败
- 1101007 图片裁剪失败
- 1101008 拍照或录像失败
- 1101009 图片压缩失败
- 1101010 其他错误
errSubject string - - 统一错误主题(模块)名称
data any | null - - 错误信息中包含的数据
cause Error | null - - 源错误信息,可以包含多个错误,详见SourceError
errMsg string - - -

# 通用类型

# GeneralCallbackResult

名称 类型 必备 默认值 兼容性 描述
errMsg string - - 错误信息