I tried to take a video with CameraX. For that I have read the SO posts here and here .
But when I copy paste the code and adjust it a little bit, there is an unresolved reference with the setLensFacing()
method:
videoCapture = VideoCaptureConfig.Builder().apply {
setTargetRotation(binding.viewFinder.display.rotation)
setLensFacing(lensFacing)
}.build()
I adjust the code little bit since you do not need to pass a config object to a VideoCapture
anymore. You can build it directly.
At this point, Android Studio is telling me that setLensFacing(lensFacing)
is unresolved.
I am a little bit confused because on this page , there is a nice documentation and VideoCaptureConfig.Builder()
contains setLensFacing()
I hope someone can help.