3

I'm using an MPVolumeView to control the volume of the AVPlayer in my app. When I connect use the Airplay-button next to the volume slider to connect to an AppleTV, the slider disappears. How can this be avoided?

When I use the Music app to stream music to the same AppleTV the volume slider in the music app stays visible.

murze
  • 4,015
  • 8
  • 43
  • 70

2 Answers2

2

The solution was to set allowsExternalPlayback to NO on the AVPlayer:

self.player = [AVPlayer playerWithURL:self.streamUrl];
self.player.allowsExternalPlayback = NO;
murze
  • 4,015
  • 8
  • 43
  • 70
0

I had a similar situation. My fix was:

player.allowsAirPlayVideo = NO; // keeps volume slider from disappearing
Neal Ehardt
  • 10,334
  • 9
  • 41
  • 51