How to set up shuffle in SystemMusicPlayer.shared

// withArtist is Artist.
let player = SystemMusicPlayer.shared
player.queue = [withArtist.fullAlbums!.first!]
player.state.shuffleMode = .songs
try await player.play()

I can't set the shuffle mode with the above code.

I would like to know how to set it.

Hello @shi-n,

The snippet of code you're showing here is correct. We expect this to work.

Could you file a new ticket in Feedback Assistant with a sysdiagnose? This will help us investigate this issue further.

Best regards,

I'm seeing a similar issue with Repeat Mode - if Repeat Mode is enabled before I get the system player, every song I play plays twice even when I set repeat mode to MPMusicRepeatModeNone. The only way to clear this issue is to bring up the system music app, press the repeat icon (which shows as off) to cycle through to OFF. Once I do that, each song in my app plays once.

Hello @shi-n, @ashinthetray and @Giebler,

Thanks for your feedback.

We are actively investigating this issue with setting the repeatMode and shuffleMode of MusicPlayer.State.

Best regards,

Hello @shi-n, @ashinthetray and @Giebler,

We have included a fix for this issue in iOS 15.4 Beta 1.

I hope this helps.

Best regards,

How to set up shuffle in SystemMusicPlayer.shared
 
 
Q