效果展示
wx.createCameraContext()
创建 camera 上下文 CameraContext 对象。
返回值
CameraContext
CameraContext
CameraContext 实例,可通过 wx.createCameraContext 获取。
cameraContext 与页面内唯一的 组件绑定,操作对应的 组件。
方法
CameraContext.takePhoto(Object object)
拍摄照片
参数Object object
object.quality 的合法值
object.success 回调函数参数Object res
CameraContext.startRecord(Object object)
开始录像
参数Object object
object.timeoutCallback 回调函数参数Object res
CameraContext.stopRecord()
结束录像
参数Object object