<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMusicPlayerController/systemMusicPlayer",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMusicPlayerController(cpy)systemMusicPlayer"
  },
  "title" : "systemMusicPlayer"
}
-->

# systemMusicPlayer

Returns the system music player, which controls the Music app’s state.

```
class var systemMusicPlayer: any MPMusicPlayerController & MPSystemMusicPlayerController { get }
```

## Return Value

The system music player.

## Discussion

The System music player employs the Music app on your behalf. On instantiation, it takes on the current Music app state and controls that state as your app runs. Specifically, the shared state includes the following:

- Repeat mode (see [`MPMusicRepeatMode`](/documentation/MediaPlayer/MPMusicRepeatMode))
- Shuffle mode (see [`MPMusicShuffleMode`](/documentation/MediaPlayer/MPMusicShuffleMode))
- Now-playing item (see [`nowPlayingItem`](/documentation/MediaPlayer/MPMusicPlayerController/nowPlayingItem))
- Playback state (see [`playbackState`](/documentation/MediaPlayer/MPMusicPlayerController/playbackState))

Other aspects of the Music app’s state aren’t shared. Music that’s playing continues to play when your app moves to the background.

---

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)