play()
Initiates playback of the current item.
Declaration
func play()Mentioned in
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.