Cameraview: How to start recording without initial user input

Created on 15 Mar 2019  路  2Comments  路  Source: natario1/CameraView

How can start a video recording when a Fragment/Activity loads; without having to implement the takeVideo() and stopVideo() methods in a button click listener for example?

I'am finding it difficult to locate where in a Fragment life-cycle to start a video recording with the takeVideo() method. The Fragment onResume() method seemed the most obvious place to do so but I've not had success.

I had a look at this question I thought was related
Any suggestions would be great, thanks :smile:

Version used

CameraView V2 (2.0.0-beta04)

question

Most helpful comment

Take the video when the camera opens - that is, in the onCameraOpened callback.

All 2 comments

Take the video when the camera opens - that is, in the onCameraOpened callback.

Take the video when the camera opens - that is, in the onCameraOpened callback.

Thanks, that fixed things.

Was this page helpful?
0 / 5 - 0 ratings