Problem with MusicKit playbackTime

I'm trying to set a specific start time for the song, using ApplicationMusicPlayer.shared.playbackTime but is not working

musicPlayer.playbackTime = 10
try await musicPlayer.prepareToPlay()
try await musicPlayer.play()
Answered by Engineer in 788903022

You should set the playbackTime after calling prepareToPlay.

You should set the playbackTime after calling prepareToPlay.

Also, I think the play method now implicitly handles prepareToPlay, so you do not need call it anymore?

Problem with MusicKit playbackTime
 
 
Q