Skip to content
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

Mute Audio Default Setting #268

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants