Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mute Audio Default Setting #268

Merged
merged 27 commits into from
Jan 21, 2025
Merged

Mute Audio Default Setting #268

merged 27 commits into from
Jan 21, 2025

Conversation

Kimblebee
Copy link
Collaborator

@Kimblebee Kimblebee commented Sep 30, 2024

Persistent setting to start video recordings muted or with audio.

notable changes:

  • The permission to record audio is used as a constraint for the Mute Audio setting -- It will be disabled if the permission is not granted

  • Same process of adding a new setting...

@temcguir
Copy link
Collaborator

temcguir commented Oct 8, 2024

In the currently used version of CameraX, you can now start a recording muted with PendingRecording.withAudioEnabled(initialMuted = true). Maybe you can add that to this PR?

https://developer.android.com/reference/androidx/camera/video/PendingRecording#withAudioEnabled(kotlin.Boolean)

Kimblebee and others added 3 commits October 8, 2024 14:10
Co-authored-by: Jaehwa Noh <shwoghk14@gmail.com>
@Kimblebee Kimblebee force-pushed the kim/feature/mute_audio_setting branch from 2f1d4de to 8a0569d Compare November 1, 2024 16:44
constraintsRepository: ConstraintsRepository
) : ViewModel() {
private var grantedPermissions = mutableSetOf<String>()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make this a MutableStateFlow<Set<String>> so that it can be combined into the below flow. Otherwise you have a race between this being set and the settings/constraints being updated.

# Conflicts:
#	core/camera/src/main/java/com/google/jetpackcamera/core/camera/CameraXCameraUseCase.kt
#	feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsScreen.kt
#	feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsUiState.kt
#	feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsViewModel.kt
#	feature/settings/src/main/java/com/google/jetpackcamera/settings/ui/SettingsComponents.kt
#	feature/settings/src/main/res/values/strings.xml
#	settings.gradle.kts
@Kimblebee Kimblebee force-pushed the kim/feature/mute_audio_setting branch from 9ca2dbc to 4fe4239 Compare January 21, 2025 16:49
@Kimblebee Kimblebee merged commit ebddf33 into main Jan 21, 2025
6 checks passed
@Kimblebee Kimblebee deleted the kim/feature/mute_audio_setting branch January 21, 2025 17:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants