chooseAlbumVideo 选择视频

chooseAlbumVideo ^6.8

选择视频

#请求参数

Prop Type Required Default Comment
limitCount Number Y N/A 可选视频数量,可选值范围:1-3
limitSize String Y N/A 限制的视频大小,单位为 kb
type String N 'mp4' 视频格式, 可选值: 'mp4'
videoDuration String Y N/A 限制视频时长

#引入接口模块

import bridge from '@minix-iot/etsbridge-sdk'

#接口调用示例

const params = {
  limitCount: 1,
  limitSize: '40960',
  type: 'mp4',
  videoDuration: 60,
}

bridge
  .chooseAlbumVideo(params)
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })

#返回参数

  • 成功时返回
Prop Type Value
tempFilePaths Array -
code Number 0
  • 失败时返回
Prop Type Value Comment
code Number -11 用户取消操作
msg String

#返回示例

{
    "tempFilePaths": [
        "localVideos/VID_20200724_164028.mp4",
        "localVideos/VID_20200724_164028.mp4"
    ]
}

#FAQ

ios 端一次只能选择一个视频

{
    "tempFilePaths": "localVideos/IMG_0003.MOV",
    "code":0
}
posted on 2024-12-27 09:34  AtlasLapetos  阅读(7)  评论(0)    收藏  举报