---
title: kAudioSessionCategory_MediaPlayback
framework: audiotoolbox
role: symbol
role_heading: Global Variable
path: audiotoolbox/kaudiosessioncategory_mediaplayback
---

# kAudioSessionCategory_MediaPlayback

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

## Declaration

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

## Discussion

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 property. This category is equivalent to the playback category provided in the AVFoundation framework.

## See Also

### Constants

- [kAudioSessionCategory_AmbientSound](audiotoolbox/kaudiosessioncategory_ambientsound.md)
- [kAudioSessionCategory_SoloAmbientSound](audiotoolbox/kaudiosessioncategory_soloambientsound.md)
- [kAudioSessionCategory_RecordAudio](audiotoolbox/kaudiosessioncategory_recordaudio.md)
- [kAudioSessionCategory_PlayAndRecord](audiotoolbox/kaudiosessioncategory_playandrecord.md)
- [kAudioSessionCategory_AudioProcessing](audiotoolbox/kaudiosessioncategory_audioprocessing.md)
