I want to use the ApplicationMusicPlayer
in my SwiftUI App and need the song duration to build a progression bar. ApplicationMusicPlayer
only provides currentPlaybackTime
and the Song
struct in MusicKit has no duration prop. Is there an easy way to get the song duration with MusicKit or do I have to use a separate Apple Music API request to get durationInMillis
?
Hello @legendario,
Thank you very much for your question about accessing the song's duration property with MusicKit.
We are working on adding a number of properties to music item types in MusicKit.
Stay tuned.
Best regards,