My application's music/media player is defined in my app as:
@State var musicPlayer = MPMusicPlayerController.applicationMusicPlayer
I want to change the playback rate and increase it slightly, but I'm unsure how to do this. The documentation is here which states it's part of the MPMediaPlayback protocol but I'm unsure how I can get this to work together.
I tried doing the following:
self.musicPlayer.currentPlaybackRate(1.2)
But I just get the following error:
Cannot call value of non-function type 'Float'
When I play a song (self.musicPlayer.play()
), how can I set the playback rate at the same time please?