跳到主要内容
新架构实战课 实操 + 基建 + 原理全维度包揽,抢先掌握 React Native 新架构精髓 立即查看 >Version: 0.74

Deprecated. Use one of the community packages instead.

文档

方法

canRecordVideos()

static canRecordVideos(callback)

canUseCamera()

static canUseCamera(callback)

openCameraDialog()

static openCameraDialog(config, successCallback, cancelCallback)

参数:

名称类型Required说明
configobjectNoSee below.
successCallbackfunctionNoSee below.
cancelCallbackfunctionNoSee below.

config is an object containing:

  • videoMode : An optional boolean value that defaults to false.

successCallback is an optional callback function that's invoked when the select dialog is opened successfully. It will include the following data:

  • [string, number, number]

cancelCallback is an optional callback function that's invoked when the camera dialog is canceled.


openSelectDialog()

static openSelectDialog(config, successCallback, cancelCallback)

参数:

名称类型Required说明
configobjectNoSee below.
successCallbackfunctionNoSee below.
cancelCallbackfunctionNoSee below.

config is an object containing:

  • showImages : An optional boolean value that defaults to false.
  • showVideos: An optional boolean value that defaults to false.

successCallback is an optional callback function that's invoked when the select dialog is opened successfully. It will include the following data:

  • [string, number, number]

cancelCallback is an optional callback function that's invoked when the select dialog is canceled.