This library provides an CameraX integration for use with the Android LiveKit SDK. This provides access to more camera functionality such as custom zoom and torch control.
This library provides an CameraX integration for use with the Android LiveKit SDK. This provides access to more camera functionality such as custom zoom, torch control and taking a picture.
Your activity can act as your `LifecycleOwner` for the camera provider. If you wish to use the camera beyond the lifecycle of a single activity, consider using
Your activity can act as your `LifecycleOwner` for the camera provider. If you wish to use the camera beyond the lifecycle of a single activity, consider using
[viewmodel-lifecycle](https://github.com/skydoves/viewmodel-lifecycle) for use within a view model (useful if your activity wants to handle rotation or other configuration changes),
or `LifecycleService` from `androidx.lifecycle:lifecycle-service` to use in a service for backgrounded camera usage.
Once registered, LiveKit will default to using CameraX when creating a camera video track.
### Accessing the camera controls
```
...
...
@@ -51,3 +52,42 @@ fun zoom(factor: Float) {
```
We provide a convenience `ScaleZoomHelper` class that can handle pinch-to-zoom functionality as well.
### Taking a high quality picture
This allows you to take a high picture without interrupting the video stream.
```
// Pass in the imageCapture use case when creating the camera provider