---
title: silenceSecondaryAudioHintNotification
framework: avfaudio
role: symbol
role_heading: Type Property
path: avfaudio/avaudiosession/silencesecondaryaudiohintnotification
---

# silenceSecondaryAudioHintNotification

A notification the system posts when the primary audio from other apps starts and stops.

## Declaration

```swift
class let silenceSecondaryAudioHintNotification: NSNotification.Name
```

## Discussion

Discussion Subscribe to this notification to ensure that the system notifies your app when optional secondary audio muting should begin or end. The system sends this notification only to registered listeners who are currently in the foreground and have an active audio session. This notification’s userInfo dictionary contains a AVAudioSession.SilenceSecondaryAudioHintType value for the AVAudioSessionSilenceSecondaryAudioHintTypeKey. Use the audio hint type to determine if your secondary audio muting should begin or end. func handleSecondaryAudio(notification: Notification) {     // Determine hint type     guard let userInfo = notification.userInfo,         let typeValue = userInfo[AVAudioSessionSilenceSecondaryAudioHintTypeKey] as? UInt,         let type = AVAudioSession.SilenceSecondaryAudioHintType(rawValue: typeValue) else {             return     }          if type == .begin {         // Other app audio started playing - mute secondary audio.     } else {         // Other app audio stopped playing - restart secondary audio.     } } The system posts this notification on the main thread.

## Topics

### User Info Keys

- [AVAudioSessionSilenceSecondaryAudioHintTypeKey](avfaudio/avaudiosessionsilencesecondaryaudiohinttypekey.md)

### User Info Values

- [AVAudioSession.SilenceSecondaryAudioHintType](avfaudio/avaudiosession/silencesecondaryaudiohinttype.md)

## See Also

### Mixing with other audio

- [isOtherAudioPlaying](avfaudio/avaudiosession/isotheraudioplaying.md)
- [secondaryAudioShouldBeSilencedHint](avfaudio/avaudiosession/secondaryaudioshouldbesilencedhint.md)
- [allowHapticsAndSystemSoundsDuringRecording](avfaudio/avaudiosession/allowhapticsandsystemsoundsduringrecording.md)
- [setAllowHapticsAndSystemSoundsDuringRecording(_:)](avfaudio/avaudiosession/setallowhapticsandsystemsoundsduringrecording(_:).md)
