Playing apple music from AVFoundation for visualization

Hi I am working on a music app where I can do some sound analysis, my end goal is to integrate Apple Music API in my app where users can search songs. When the song is played I want to show a type of soundwave/spectrogram. For sound visualization I have AVFoundation but the Music API returns only song ID which could be played using Apple MediaPlayer framework only. Is there any API for doing sound analysis or can I play the Apple music songs using AVFoundation.

Post not yet marked as solved Up vote post of FJaffri Down vote post of FJaffri
152 views

Replies

Hello @FJaffri,

Playing Apple Music content using AVFoundation is not supported.

The recommended APIs for playing Apple Music content are ApplicationMusicPlayer and SystemMusicPlayer in MusicKit.

However, it would help us to have specific information about your use-case so we can try to think about the best approach to enable the functionality you want to build in a way that is compatible with our contractual obligations for DRM content.

Capturing this information in a ticket on Feedback Assistant is the best way forward for this enhancement request.

Thank you very much in advance.

Best regards,