haptic-feedback

How can I play a haptic feedback while AvCapture Session is running?

别来无恙 提交于 2021-02-09 11:13:36
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

How can I play a haptic feedback while AvCapture Session is running?

孤街醉人 提交于 2021-02-09 11:12:24
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

How can I play a haptic feedback while AvCapture Session is running?

末鹿安然 提交于 2021-02-09 11:09:55
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

UIImpactFeedbackGenerator Not Working When Audio Device Added to AVCaptureSession

左心房为你撑大大i 提交于 2020-12-29 03:02:04
问题 Adding microphone audio input to AVCaptureSession seems to disable UIImpactFeedbackGenerator . let audioDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeAudio) let audioDeviceInput = try AVCaptureDeviceInput(device: audioDevice) if self.session.canAddInput(audioDeviceInput) { self.session.addInput(audioDeviceInput) } Once the audio device is removed, feedback resumes. Is this normal behavior? Is there a way around this? I notice stock iOS Camera app in video mode and long

UIImpactFeedbackGenerator Not Working When Audio Device Added to AVCaptureSession

怎甘沉沦 提交于 2020-12-29 03:01:06
问题 Adding microphone audio input to AVCaptureSession seems to disable UIImpactFeedbackGenerator . let audioDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeAudio) let audioDeviceInput = try AVCaptureDeviceInput(device: audioDevice) if self.session.canAddInput(audioDeviceInput) { self.session.addInput(audioDeviceInput) } Once the audio device is removed, feedback resumes. Is this normal behavior? Is there a way around this? I notice stock iOS Camera app in video mode and long

Is it possible to trigger a haptic feedback without the accompanying sound on apple Watch OS 2

陌路散爱 提交于 2019-12-21 14:38:26
问题 Assuming the user has not muted their watch sounds. Is it possible for an apple watch app to trigger a haptic feedback (i.e vibrate) without the accompanying sound. This is different than receiving a notification which is handled automatically by the watch. In this case I'm invoking the haptic feedback using a watch app. like this: [[WKInterfaceDevice currentDevice] playHaptic:WKHapticTypeClick]; 回答1: There is a hacky way to do so. You can start to play WKAudioFilePlayer right before haptic

Is it possible to trigger a haptic feedback without the accompanying sound on apple Watch OS 2

旧街凉风 提交于 2019-12-21 14:37:21
问题 Assuming the user has not muted their watch sounds. Is it possible for an apple watch app to trigger a haptic feedback (i.e vibrate) without the accompanying sound. This is different than receiving a notification which is handled automatically by the watch. In this case I'm invoking the haptic feedback using a watch app. like this: [[WKInterfaceDevice currentDevice] playHaptic:WKHapticTypeClick]; 回答1: There is a hacky way to do so. You can start to play WKAudioFilePlayer right before haptic

Haptic feedback not playing nice with AVFoundation? (UIImpactFeedbackGenerator, etc)

 ̄綄美尐妖づ 提交于 2019-12-08 01:42:05
问题 I'm trying to have a video / camera view in the background while I also allow for haptic feedback in my app for various actions, but it seems that AVFoundation is not playing nice with any of the calls I am making that involve the haptic calls: if #available(iOS 10.0, *) { let generator = UIImpactFeedbackGenerator(style: .light) generator.prepare() generator.impactOccurred() // More: let feedbackGenerator = UISelectionFeedbackGenerator() feedbackGenerator.selectionChanged() } Haptic feedback

Set Logitech Steering Wheel position/angle from SDL?

馋奶兔 提交于 2019-12-08 00:44:37
问题 I'm writing C code that controls a Logitech gaming wheel using SDL. So far I have successfully implemented the code that sets the steering wheel in autocenter mode with: SDL_HapticSetAutocenter(haptic, STRENGTH); //set autocenter I would like to be able to use the motor of the steering wheel to rotate it as desired to particular angle positions. After checking in the documentation of the API, I did not find a simple way to do it. I wonder if anyone has some advice on this. 来源: https:/

Set Logitech Steering Wheel position/angle from SDL?

偶尔善良 提交于 2019-12-06 11:00:35
I'm writing C code that controls a Logitech gaming wheel using SDL. So far I have successfully implemented the code that sets the steering wheel in autocenter mode with: SDL_HapticSetAutocenter(haptic, STRENGTH); //set autocenter I would like to be able to use the motor of the steering wheel to rotate it as desired to particular angle positions. After checking in the documentation of the API , I did not find a simple way to do it. I wonder if anyone has some advice on this. 来源: https://stackoverflow.com/questions/50665809/set-logitech-steering-wheel-position-angle-from-sdl