I'm making a music playback app on Swift Playgrounds4. How can I play background playback?
About background playback on Swift Playgrounds4
Please check this thread.
To create an app which can play music in background, you need to create an app with Background Modes enabled for Audio.
As for now, you cannot make it within an app project of Swift Playgrounds 4. You may need to do it with Xcode on a Mac.