Skip to content

Commit

Permalink
fix(quality-selector): avoid set video quality selector when is recor…
Browse files Browse the repository at this point in the history
…ding
  • Loading branch information
ujizin committed Oct 16, 2024
1 parent 587a6e0 commit 4aada1d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public class CameraState(context: Context) {
internal var videoQualitySelector: QualitySelector
get() = controller.videoCaptureQualitySelector
set(value) {
if (controller.isRecording) return
controller.videoCaptureQualitySelector = value
}

Expand Down Expand Up @@ -254,6 +255,7 @@ public class CameraState(context: Context) {
* */
internal var isImageAnalysisEnabled: Boolean = isImageAnalysisSupported
set(value) {
if (field == value) return
if (!isImageAnalysisSupported) {
Log.e(TAG, "Image analysis is not supported")
return
Expand Down Expand Up @@ -304,6 +306,7 @@ public class CameraState(context: Context) {
internal var isFocusOnTapEnabled: Boolean
get() = controller.isTapToFocusEnabled
set(value) {
if (value == controller.isTapToFocusEnabled) return
controller.isTapToFocusEnabled = value
}

Expand Down

0 comments on commit 4aada1d

Please sign in to comment.