# wx.saveVideoToPhotosAlbum(Object object)
Start from base library version 1.2.0. Please remaining backward compatible.
with Promise style call: Supported
User authorization: Need scope.writePhotosAlbum
Mini Program plugin: Support, need to Mini Program base library version no less than 1.9.6
Save the video to the system album. Support mp4 video format.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
filePath | string | yes | Video file path, can be temporary file path or permanent file path (Local path) | |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# sample code
wx.saveVideoToPhotosAlbum({
filePath: 'wxfile://xxx',
success (res) {
console.log(res.errMsg)
}
})