I'm trying to vibrate the phone while recording video, but I'm finding that AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
doesn't play nicely with AVCaptureSession
. Is there any other way to vibrate the phone or am I stuck with losing the vibrate function while recording video?
You probably need to set the audio to mix with other, I found this useful:
- (void)setupAudio {
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil];
UInt32 doSetProperty = 1;
AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof(doSetProperty), &doSetProperty);
[[AVAudioSession sharedInstance] setActive: YES error: nil];
}
from here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With