# wx.getVideoInfo(Object object)
Start from base library version 2.11.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Support
Get video details.
# parameter
# Object object
| attribute | type | Default values | Required | Introductions |
|---|---|---|---|---|
| src | string | yes | Video file path, can be temporary file path or permanent file 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) |
# object.success callback
# parameter
# Object res
| attribute | type | Introductions |
|---|---|---|
| orientation | string | Picture direction |
| type | string | Video formats |
| duration | number | Video Length |
| size | number | Video Size, Unit kb |
| height | number | Video length, unit px |
| width | number | Video width, unit px |
| fps | number | Video frame rate |
| bitrate | number | Video Rate, Unit kbps |
res.orientation Legal value
| value | Introductions | Minimum version |
|---|---|---|
| up | default | |
| down | 180 degrees rotation | |
| left | Rotate 90 degrees counterclockwise | |
| right | Rotate 90 degrees clockwise | |
| up-mirrored | Same as up, but horizontal flip | |
| down-mirrored | Same as down, but horizontal flip | |
| left-mirrored | Same as left, but vertical flip | |
| right-mirrored | Same as right, but vertical flip |