jpsim / JPSVolumeButtonHandler

JPSVolumeButtonHandler provides an easy block interface to hardware volume buttons on iOS devices. Perfect for camera apps!
MIT License
333 stars 90 forks source link

Don't set AVAudioSession category #8

Closed ndbroadbent closed 9 years ago

ndbroadbent commented 9 years ago

This doesn't seem to be necessary, and can screw up AVCaptureSessions - specifically, subsequent calls to AVCaptureMovieFileOutput#startRecordingToOutputFileURL

Fixes #7

jpsim commented 9 years ago

Are you sure it's not needed? I thought it was necessary to not affect the rest of the system's audio (e.g. currently playing music).

ndbroadbent commented 9 years ago

I'm not sure, but I'm already setting it to AVAudioSessionCategoryAmbient in my app. It seems that setting it again screws up my AVCaptureSession, for some reason, and I can no longer record videos. But also, we aren't actually changing the volume here, since it's being set back to the previous value?

Anyway, that's ok, my case is probably a pretty obscure bug, so I'm happy to just use a fork for now. Maybe we can wait until either Apple fixes it, or someone else reports the same issue.