<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/kAudioSessionCategory_MediaPlayback",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@Ea@kAudioSessionCategory_AmbientSound@kAudioSessionCategory_MediaPlayback"
  },
  "title" : "kAudioSessionCategory_MediaPlayback"
}
-->

# kAudioSessionCategory_MediaPlayback

For playing recorded music or other sounds that are central to the successful use of your app.

```
var kAudioSessionCategory_MediaPlayback: Int { get }
```

## Discussion

When using this category, your app audio continues with the Silent switch set to silent or when the screen locks. (The switch is called the *Ring/Silent switch* on iPhone.)

This category normally prevents audio from other apps from mixing with your app’s audio. To allow mixing for this category, use the [`kAudioSessionProperty_OverrideCategoryMixWithOthers`](/documentation/AudioToolbox/kAudioSessionProperty_OverrideCategoryMixWithOthers) property.

This category is equivalent to the <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playback> category provided in the AVFoundation framework.

---

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)