Swift MusicKitプログラミング その11

Swift MusicKitプログラミング その11

再生Example

Album

let player = SystemMusicPlayer.shared

player.queue = MusicPlayer.Queue(for: [withArtist.fullAlbums!.first!])

try await player.play()

Song

let player = SystemMusicPlayer.shared

player.queue = MusicPlayer.Queue(for: withArtist.topSongs!)

try await player.play()

Playlist

let player = SystemMusicPlayer.shared

player.queue = MusicPlayer.Queue(for: [withArtist.playlists!.first!])

try await player.play()

Swift

Posted by shi-n