<!--
{
  "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/MPMediaPlayback/prepareToPlay()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(pl)MPMediaPlayback(im)prepareToPlay"
  },
  "title" : "prepareToPlay()"
}
-->

# prepareToPlay()

Prepares a media player for playback.

```
func prepareToPlay()
```

## Discussion

If a media player isn’t already prepared to play when you call the [`play()`](/documentation/MediaPlayer/MPMediaPlayback/play()) method, that method automatically calls this method. However, to minimize playback delay, call this method before you call [`play()`](/documentation/MediaPlayer/MPMediaPlayback/play()).

Calling this method may interrupt the media player’s audio session. For information on interruptions and how to respond to them, see [Audio Session Programming Guide](https://developer.apple.com/library/archive/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007875).

---

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)