---
title: play()
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: mediaplayer/mpmediaplayback/play()
---

# play()

Initiates playback of the current item.

## Declaration

```swift
func play()
```

## Mentioned in

Playing audio using the built-in music player

## Discussion

Discussion If playback was previously paused, this method resumes playback where it left off; otherwise, this method plays the first available item, from the beginning. If a media player isn’t prepared for playback when you call this method, this method first prepares the media player and then starts playback. To minimize playback delay, call the prepareToPlay() method before you call this method. To receive a notification when a movie player is ready to play, register for the MPMoviePlayerLoadStateDidChangeNotification notification. You can then check load state by accessing the movie player’s loadState property.

## See Also

### Starting and stopping playback

- [pause()](mediaplayer/mpmediaplayback/pause().md)
- [stop()](mediaplayer/mpmediaplayback/stop().md)
- [prepareToPlay()](mediaplayer/mpmediaplayback/preparetoplay().md)
- [isPreparedToPlay](mediaplayer/mpmediaplayback/ispreparedtoplay.md)
