Replies
I found the problem, now I need to find the solution...
For some reason when the audio is playing MusicKit is spamming API calls for something called "universal-activity-service", it doesn't happen on my other project where I use plain JS, but for some reason it does happen in ReactJS...
I'd love to know if someone has a clue on how to prevent the API calls spam...
EDIT:
Found the solution... I had a test script accidentally still in the project..
The test script checked in the timeDidChange event if the audio should and is playing and if it should and isn't it'd start playing (and it's playing and shouldn't it'd pause it), and because it was a test script that shoulda been deleted it tried to compare boolean to undefined which is always false which mean that every timeDidChange callback (approx. once per second) it executed music.player.play() which then executed the "universal-activity-service" API calls which is probably for MusicKit's server to keep track on the user's playback state... and that's why there was an API call spam