# 为什么媒体音量下，设置录制时允许震动不生效？ (/zh-CN/reference/faq/integration/allow_haptics)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

## 问题现象 [#问题现象]

媒体音量下，调用苹果 API `setAllowHapticsAndSystemSoundsDuringRecording` 设置录制音频时允许震动不生效。

## 问题原因 [#问题原因]

这个问题是由于集成声网 SDK 后，未调用震动相关的私有参数设置导致的。

## 解决方案 [#解决方案]

你可以参考如下步骤解决该问题：

1. 加入频道前，调用 `setParameters` 方法，并设置 `che.audio.allow_haptics_during_recording` 参数：

   ```objc
   agoraKit.setParameters("{\"che.audio.allow_haptics_during_record\":true}")
   ```

2. 调用苹果原生的 API `setAllowHapticsAndSystemSoundsDuringRecording`：

   ```objc
   [[AVAudioSession sharedInstance] setAllowHapticsAndSystemSoundsDuringRecording:YES error:nil];
   ```

3. 加入频道。

4. 调用实现震动相关逻辑的代码。
