Hi all,
I am trying to start the playback of the current queue in the system music player using:
let player = SystemMusicPlayer.shared
try await player.play()
But there is no playback, what am I doing wrong? Please keep in mind that there are already songs in the queue. I am simply unable start the playback.
Hello @ashinthetray,
Oh, I see. This behaves as designed actually.
If SystemMusicPlayer allowed another app to begin playing without setting the queue, then that other app would have access to the currentEntry that was set by the user elsewhere. This would be a serious privacy concern, as it would allow any third-party app to see what the user was playing.
Imagine if a user were listening to a religious song, or maybe some kind of revolutionary song; allowing a third party app to programmatically get that information might put such a user in great jeopardy.
So in order for SystemMusicPlayer's play() method to work, you first absolutely need to set the queue from within your app.
I hope this helps.
Best regards,