One Logo Pool Ball
MusicKit · IOS API REFERENCE

ApplicationMusicPlayer

class · iOS 15.0+ · SDK 27.1

class ApplicationMusicPlayer

An object your app uses to play music in a way that doesn’t affect the Music app’s state. The application music player plays music specifically for your app, and doesn’t affect the Music app’s state. If your app includes a background audio mode in your `Info.plist` file, the application music player continues playing the current music item when your app moves to the background.

Members (5)

get · iOS 18.0+

transition

TypeScript
get transition(): MusicPlayer_Transition
Swift declaration
var transition: MusicPlayer.Transition { get set }

The transition between items for the application music player. By default, the `transition` is `.none` where there is no transition between playing items. Your application should set the desired transition before setting the queue. The player cannot apply transitions in all scenarios. For example, the player does not apply a transition between two consecutive tracks in an album.

set · iOS 18.0+

transition

TypeScript
set transition(value: MusicPlayer_Transition)
Swift declaration
var transition: MusicPlayer.Transition { get set }

The transition between items for the application music player. By default, the `transition` is `.none` where there is no transition between playing items. Your application should set the desired transition before setting the queue. The player cannot apply transitions in all scenarios. For example, the player does not apply a transition between two consecutive tracks in an album.

get · iOS 15.0+

queue

TypeScript
get queue(): ApplicationMusicPlayer_Queue
Swift declaration
var queue: ApplicationMusicPlayer.Queue { get set }

The playback queue for the application music player.

set · iOS 15.0+

queue

TypeScript
set queue(value: ApplicationMusicPlayer_Queue)
Swift declaration
var queue: ApplicationMusicPlayer.Queue { get set }

The playback queue for the application music player.

get · iOS 15.0+

shared

TypeScript
static get shared(): ApplicationMusicPlayer
Swift declaration
static let shared: ApplicationMusicPlayer

The shared application music player, which plays music specifically for your app.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →