camera-samples icon indicating copy to clipboard operation
camera-samples copied to clipboard

How to pause/resume video recording using CameraX VideoCapture

Open khushhalblulabs opened this issue 2 years ago • 1 comments

I couldn't find any resume() or pause() function to pause/resume video recording in my Android app. Any help would be appreciated. There is stopRecording() function only that I used to stop and save the video recording as given below.

videoCapture.stopRecording()

khushhalblulabs avatar Nov 25 '22 11:11 khushhalblulabs

It looks like you may be using the legacy/hidden androidx.camera.core.VideoCapture code. You should switch to using the dedicated androidx.camera.video.VideoCapture APIs which are part of the androidx.camera:camera-video artifact.

Here is a guide for using the new APIs, which includes pause/resume: https://developer.android.com/training/camerax/video-capture#using-videocapture-api

temcguir avatar Nov 28 '22 23:11 temcguir