0

I'm using MPMusicPlayerController to play a list of mp3 in my app.

The only problem is when I set the volume level, according with app configuration, appears a Volume Level pop up.

I tried to find any property in order to hide it, but I didn't find.

The code I'm using is:

if (audioPlayer)
    if ([audioPlayer isPlaying])
        [audioPlayer stop];

self.musicPlayer = [MPMusicPlayerController applicationMusicPlayer];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePlaybackStateChanged:) name:MPMusicPlayerControllerPlaybackStateDidChangeNotification object:self.musicPlayer];

[self.musicPlayer beginGeneratingPlaybackNotifications];

[self.musicPlayer setAccessibilityElementsHidden:YES];
self.musicPlayer.volume = volume;

[self.musicPlayer setQueueWithItemCollection:mediaItemCollection];

self.musicPlayer.repeatMode = MPMusicRepeatModeAll;

[self.musicPlayer play];

My question is, Any way to avoid this pop up?

Thanks.

NemeSys
  • 555
  • 1
  • 10
  • 28

1 Answers1

0

I found a workaround for this problem in other post

But, there is not a direct way to perform that without using MPVolumeView "invisible"?

Sorry :)

Community
  • 1
  • 1
NemeSys
  • 555
  • 1
  • 10
  • 28