Post

Replies

Boosts

Views

Activity

Apple Music (MusicKit) + AVAudioEngine
I've created an app that applies stereo EQ to songs with AVAudioUnitEQ and AVAudioEngine. It works great on MPMediaItems with no protected assets. I'd like to apply the EQ to Apple Music tracks for users that have an active subscription. In order to play tracks with AVAudioEngine, I create an AVAudioFile from the MPMediaItem assetURL. When I try to get the URL of an Apple Music track, it returns nil even though I have an active subscription. Is it possible to get the URL of an Apple Music track that an active subscriber has downloaded to their library? If so, I think I'd be all set getting it to work with AVAudioEngine. If it's not possible to get the URL, does anyone know if there's some other method to play Apple Music tracks with AVAudioEngine?
1
0
577
Apr ’23
NowPlaying State Not Updating on Apple Watch
My app plays music via AVAudioEngine. I'm using effects that prohibit me from using a built-in audio player. I'm using MPNowPlayingInfoCenter to provide information to the NowPlaying app on the Apple Watch. When I play a song, the Apple Watch displays the song metadata. When I hit pause on my phone, the Apple Watch shows that the track is no longer advancing via the progress wheel; however, it continues to display the pause button even though the music is paused. Ideally, it would switch to the play symbol when the music is paused. In the documentation it says you can use the playBackState var to set the playback state in macOS. There does not seem to be an equivalent in iOS. I figured maybe the watch would know to switch the pause symbol to the play symbol when the playback rate is 0, but it does not. All other functionality is working properly. The only thing that doesn't update on the watch is the pause / play symbol when the music toggles between play and pause by tapping my phone or from receiving remote command events. Thank you in advance for your help.
0
0
758
Apr ’23