-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use CameraXViewfinder from new camerax-compose artifact #107
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat, thanks!
.build() | ||
.build().apply { | ||
setSurfaceProvider { newSurfaceRequest -> | ||
Log.d("JOLO", "New surface request") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a temporary log statement.
.build().apply { | ||
setSurfaceProvider { newSurfaceRequest -> | ||
Log.d("JOLO", "New surface request") | ||
_surfaceRequest.value = newSurfaceRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use a MutableStateFlow.update()
?
https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/update.html
…y assigning a value.
1.5.0-alpha03 of the camerax library suite contains a new camerax-compose artifact, which does a lot of the heavy lifting for you when creating a viewfinder in Compose. This pull request implements the new artifact.
Note: The 1.5.0-alpha03 release of camerax depends on compileSdk 35, so I had to update that as well.