wx.saveVideoToPhotosAlbum(Object object)基础库 1.2.0 开始支持,低版本需做兼容处理。 调用前需要 用户授权 scope.writePhotosAlbum 保存视频到系统相册。支持mp4视频格式。 参数Object object属性 | 类型 | 默认值 | 必填 | 说明 |
---|
filePath | string | | 是 | 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) | success | function | | 否 | 接口调用成功的回调函数 | fail | function | | 否 | 接口调用失败的回调函数 | complete | function | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
示例代码wx.saveVideoToPhotosAlbum({
filePath: 'wxfile://xxx',
success (res) {
console.log(res.errMsg)
}
})
|
请发表评论