Я работаю с RNCamera и не знаю, почему console.log ('logged by phuognn'); не работает, когда я нажимаю takePicture во второй раз. Попытка сделать еще одну кнопку для запуска StopRecording, но все еще не работает
takePicture = async () => {
console.log('logged by phuognn abcdcdcdc');
if (this.state.isRecording) {
console.log('logged by phuognn');
this.camera.stopRecording();
this.setState({ isRecording: false })
return;
}
let data;
if (!this.state.isRecording && this.state.isPicture) {
const options = { quality: 0.5, base64: true };
data = await this.camera.takePictureAsync(options);
} else if (!this.state.isRecording && !this.state.isPicture) {
console.log('logged by phuognn start record');
this.setState({ isRecording: true })
this.video = await this.camera.recordAsync(options);
console.log('logged by phuognn aaaaa');
}
};