I am building a camera app (android target) with expo. My problem is during recording a video. I look forward after pause and resume a video It should record continue but it’s freezed after I save my record video.
This is my code:
if (!this.state.isStartRecordVideo) {
this.props.pauseRecordVideo();
}
else {
this.props.resumeRecordVideo();
}
startRecordVideo
method to start a record video:
async startRecordVideo() {
let video = await this.camera.recordAsync({ quality: '1080' });
await CameraRoll.saveToCameraRoll(video.uri, 'video');
}
stopRecordVideo
method to stop and save a record video (return a promise in startRecordVideo
method)
async stopRecordVideo() {
await this.camera.stopRecording();
}
FooterCamera
is a component which contain pausePreview
and resumePreview
<FooterCamera
ref={(footer) => this.footer_camera = footer}
imageUri={this.state.imageUri}
takePicture={(timer, quality) => this.takePicture(timer, quality)}
startRecordVideo={() => this.startRecordVideo()}
stopRecordVideo={() => this.stopRecordVideo()}
pauseRecordVideo={() => this.camera.pausePreview()}
resumeRecordVideo={() => this.camera.resumePreview()}
stopCountDownAnimate={() => this.stopCountDownAnimate()}
/>
- expo version: 2.1.3
- Device: android