getVideoInfo(params: Object)
Requires:
BaseKit≥2.5.0@ray-js/ray≥0.5.9
Platforms:
iOSAndroid
Description
Get video information
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
src | string | Yes | Video file path; can be a temporary or permanent file path |
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | BaseKit Since |
|---|---|---|---|
width | number | Original video width in px, ignoring rotation | v3.2.6 |
height | number | Original video height in px, ignoring rotation | v3.2.6 |
orientation | string | Frame orientation Valid values Description up Default orientation (phone held horizontally), corresponds to 1 in Exif; or no orientation info. up-mirrored Same as up, but mirrored; corresponds to 2 in Exif down Rotated 180°, corresponds to 3 in Exif down-mirrored Same as down, but mirrored; corresponds to 4 in Exif left-mirrored Same as left, but mirrored; corresponds to 5 in Exif right Rotated 90° clockwise, corresponds to 6 in Exif right-mirrored Same as right, but mirrored; corresponds to 7 in Exif left Rotated 90° counterclockwise, corresponds to 8 in Exif | v3.2.6 |
type | string | Video format, taken from media parsing results, e.g., mp4 | v3.2.6 |
duration | number | Video duration in seconds | v3.2.6 |
size | number | Video size, in kB | v3.2.6 |
fps | number | Video frame rate | v3.2.6 |
bitrate | number | Video bitrate, in kbps | v3.2.6 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None