# recordVideo ^4.4.0
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
param | Object | Y | {}属性: limitCount:{Type: Number, Default: 1Description: 视频数量 } limitSize:{Type: Number, Default: 1Description: 视频大小 } type:{Type: String, Default: MP4Description: 视频格式 } videoDuration:{Type: Number, Default: 60Description: 视频时长 } | 请求参数 |
# 接口调用示例
const params ={
limitCount: 2,
limitSize: 40960,
type: 'mp4',
}
this.$bridge
.recordVideo(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
// v0.3.5 支持回调函数,可重复触发执行
this.$bridge
.recordVideo(
params,
res => {
this.$alert(res)
},
err => {
this.$toast(err)
}
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 返回参数
- 成功时返回
| Prop | Type | Default | Description |
|---|---|---|---|
code | Number | N/A | 0 |
data | String | N/A |
- 失败时返回
| Prop | Type | Default | Description |
|---|---|---|---|
errorCode | Number | N/A |