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

Enabling/Disabling Audio #134

Closed
darnfish opened this issue Jul 5, 2018 · 7 comments
Closed

Enabling/Disabling Audio #134

darnfish opened this issue Jul 5, 2018 · 7 comments
Assignees

Comments

@darnfish
Copy link

darnfish commented Jul 5, 2018

Hey there,

Is there any way microphone input can be disabled and then re-enabled using this framework? I'm trying to create haptic feedback when the user taps on a button on the screen when the user is not recording. As playing haptics is disabled when an AVCaptureSession is active with an audio input, I'm thinking of disabling audio input while the user is not recording, and then enabling it just before they start recording.

Thanks for the help!

-William

@piemonte
Copy link
Contributor

piemonte commented Jul 6, 2018

hey @williamsthing great idea, i've needed this as well.

@darnfish
Copy link
Author

Is there an ETA on this? Thanks!

@Kaspik
Copy link

Kaspik commented Mar 30, 2020

Implemented and merged in! :)

@jeremyschoenherr
Copy link

amazing! i would love to use this as well. any idea when the next cocoapod release will happen? right now, i'm just swapping captureMode, and it's not all that performant :)

@piemonte
Copy link
Contributor

0.16.3 has been released

@naturalui
Copy link

naturalui commented Jun 6, 2020

@neoncloth did using this work for you to enable haptics?

I tried something like this on a buttonPress with no luck, it seems to reset the full capture.

@piemonte is there a way to mute audio temporary for these haptics? (without reseting the feed)

    NextLevel.shared.disableAudioInputDevice()
    HapticFeedback.impact(.light).generate()
    NextLevel.shared.enableAudioInputDevice()

@darnfish
Copy link
Author

darnfish commented Jun 6, 2020

@naturalui I honestly can’t remember what I did but feel free to look over my awful code here:
https://github.com/flipwtf/app/blob/master/flip/Views/Camera%20View/FLCameraView.swift

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

No branches or pull requests

5 participants