Our music player plays library and Apple Music catalog content with MusicKit's ApplicationMusicPlayer. On the Mac, we want a volume slider that changes only our app's playback level, like the slider in Music.app.
We found no supported way to do this:
- ApplicationMusicPlayer and MusicPlayer have no volume property.
- The audio plays in com.apple.MediaPlayer.RemotePlayerService, not in our process, so we cannot change the stream level.
- MPVolumeView and the deprecated MPMusicPlayerController.volume control the system output volume, not the app's level.
- AVPlayer cannot play Apple Music catalog content.
Questions:
- Is there a supported API to set the playback volume of ApplicationMusicPlayer on macOS or Mac Catalyst?
- If there is none, what does Apple recommend for Mac apps that need an app-level volume control for MusicKit playback?