【发布时间】:2019-01-21 07:12:12
【问题描述】:
takePicture = async function() {
if (this.camera) {
const options = { quality: 0.5, base64: true, };
const data = await this.camera.takePictureAsync(options);
this.setState({path: data.uri})
}
}
只要我调用我的takePicture 函数来捕获图像,相机仍然会继续移动并且不会暂停。我希望相机暂停,然后显示图像。
这里有处理Promise 的问题吗?如果是,我不知道在哪里以及如何做。
我也尝试过使用pauseAfterCapture:true,但捕获图像仍需要 1 或 2 秒。
我知道这是一个老问题,但还没有解决方案可以帮助我。请帮忙。
【问题讨论】:
标签: reactjs react-native react-native-camera