<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/silenceSecondaryAudioHintNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:@AVAudioSessionSilenceSecondaryAudioHintNotification"
  },
  "title" : "silenceSecondaryAudioHintNotification"
}
-->

# silenceSecondaryAudioHintNotification

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

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

## 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 <doc://com.apple.documentation/documentation/Foundation/NSNotification/userInfo> dictionary contains a [`AVAudioSession.SilenceSecondaryAudioHintType`](/documentation/AVFAudio/AVAudioSession/SilenceSecondaryAudioHintType) value for the [`AVAudioSessionSilenceSecondaryAudioHintTypeKey`](/documentation/AVFAudio/AVAudioSessionSilenceSecondaryAudioHintTypeKey). Use the audio hint type to determine if your secondary audio muting should begin or end.

```swift
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`](/documentation/AVFAudio/AVAudioSessionSilenceSecondaryAudioHintTypeKey)

A user info key that you use to retrieve the silence secondary audio hint type.

### User Info Values

[`AVAudioSession.SilenceSecondaryAudioHintType`](/documentation/AVFAudio/AVAudioSession/SilenceSecondaryAudioHintType)

Constants that indicate whether optional secondary audio muting should begin or end.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)