getVideoDetails ^6.8
获取视频原始数据
#请求参数
| Prop |
Type |
Comment |
src |
String |
视频文件路径(相对路径) |
#参数代码示例
let params = {
src: 'localImages/IMG_003.MOV'
}
#接口调用示例
let params = { src: this.src}
this.$bridge
.getVideoDetails(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| Prop |
Type |
Value |
code |
Number |
0 |
width |
Number |
图片原始宽度 |
height |
Number |
图片原始高度 |
fps |
Number |
帧率 |
type |
String |
格式 |
orientation |
String |
视频角度, 默认up |
duration |
Number |
时常 单位秒 |
bitrate |
Number |
比特率 |
| Prop |
Type |
Value |
Comment |
code |
Number |
-7 |
|
msg |
String |
文件不存在 |
|
#返回示例
{
"code": 0,
"width": 224,
"height": 128,
"type": "vide/avc1",
"fps": 15,
"orientation": "up",
"duration": 8,
"bitrate": 131984.609375
}