Hide Device Volume Hud View While Adjusitng Volume with Mpvolumeview Slider

Set MPVolumeView slider thumb position as device volume

Assign your slider's value to to AVAudioSession.sharedInstance().outputVolume on init or in viewDidLoad of your view controller. Remember to import AVFoundation to use AVAudioSession.

Alternatively, you can programmatically initialize your MPVolumeView instead of having it as an outlet. I believe that is the source of your issue.

How to keep the slider of MPVolumeView visible when connecting to Apple TV?

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

self.player = [AVPlayer playerWithURL:self.streamUrl];
self.player.allowsExternalPlayback = NO;


Related Topics



Leave a reply



Submit