<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/MusicPlayer/prepareToPlay()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit0A6PlayerC13prepareToPlayyyYaKF"
  },
  "title" : "prepareToPlay()"
}
-->

# prepareToPlay()

Prepares the current queue for playback, interrupting any active
(nonmixable) audio sessions.

```
func prepareToPlay() async throws
```

## Discussion

Call this function to ensure that the player buffers
the starting entry in the queue and that the entry is ready to play.

---

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)