One Logo Pool Ball
MusicKit · IOS API REFERENCE

SystemMusicPlayer

class · iOS 15.0+ · SDK 27.1

class SystemMusicPlayer

An object your app uses to play music by controlling the Music app’s state. The system music player employs the Music app on your behalf. When your app accesses the system music player for the first time, it assumes the current Music app state and controls it as your app runs. The shared state includes the following: * Repeat mode (see ``MusicPlayer/RepeatMode``) * Shuffle mode (see ``MusicPlayer/ShuffleMode``) * Playback status (see ``MusicPlayer/PlaybackStatus``) The system music player doesn’t share other aspects of the Music app’s state. Music that’s playing continues to play when your app moves to the background.

Members (3)

get · iOS 15.0+

queue

TypeScript
get queue(): MusicPlayer_Queue
Swift declaration
var queue: MusicPlayer.Queue { get set }

The playback queue for the system music player.

set · iOS 15.0+

queue

TypeScript
set queue(value: MusicPlayer_Queue)
Swift declaration
var queue: MusicPlayer.Queue { get set }

The playback queue for the system music player.

get · iOS 15.0+

shared

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

The shared system music player, which controls the Music app’s state.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →