Questions tagged [mpvolumeview]

MPVolumeView is a class from MediaPlayer framework in iOS. Used to present the user with a slider control for setting the system audio output volume, and a button for choosing the audio output route.

When first displayed, the slider’s position reflects the current system audio output volume. As the user drags the slider, the changes update the volume. If the user presses the device volume buttons while sound is playing, the slider moves to reflect the new volume.

If there is an Apple TV or other AirPlay-enabled device in range, the route button allows the user to choose it. If there is only one audio output route available, the route button is not displayed.

When an audio output route that does not support volume control, such as A2DP, is active, the volume slider is replaced with the route name.

145 questions
2
votes
1 answer

MPVolume view showing different options

I am using bluetooth sound in my app. I've used MPVolumeview to route between different options. Sometimes it shows 2 options like Bluetooth and iPhone and sometimes showing 3 options like Bluetooth,iPHone,Speaker without doing anything specific or…
Dragon
  • 21
  • 3
2
votes
1 answer

iOS 4.0 Volume Fade

No matter what I do I seem to run into problems. I'm trying to create a fade over time on an actively playing streamed audio. So far the only players that seem to handle audio streaming properly are the MPMoviePlayerController and AVPlayer.…
Alex
  • 41
  • 6
2
votes
0 answers

Hide volume HUD view in MPVolumeView

I use MPVolumeView and UISlider to control my device audio and below is my code: extension MPVolumeView { var volumeSlider: UISlider { self.showsRouteButton = false self.showsVolumeSlider = true var slider = UISlider() …
user8896788
2
votes
0 answers

MPVolumeView Route button error on second touch in IOS 11

MPMediaControlsRemoteViewController Dismissing because view service terminated I am getting this error in the simulator on iOS 11 when I touch the Route button (MPVolumeView). The error doesn't appear in the debug log on the first touch, but does…
greencardigan
  • 393
  • 1
  • 3
  • 13
2
votes
1 answer

Volume UI Should not appear when using on screen volume slider- iOS

Volume UI should not appear during use of volume slider of the application.
Alok
  • 24,880
  • 6
  • 40
  • 67
2
votes
0 answers

AVAudioSession current route output/MPVolumeView wireless route active

I can't find the way to get the name of the audio session current route output because AVAudioSession gives you a list of outputs for its current route, therefore there can be more than one, and using MPVolumeView, you can know if there is a…
Daniel
  • 683
  • 1
  • 9
  • 20
2
votes
1 answer

Detect long and short press of volume button - iOS

I have been looking around like crazies. I need to do custom actions on volume button long and short press (like snapchat, short press take picture, long press record video) but have failed. I have used…
Hyder
  • 1,163
  • 2
  • 13
  • 37
2
votes
1 answer

MPVolumeView does not show route button on launch

iOS 9.1 - iPhone 6S MPVolumeView's route button (airplay) is not showing when app launches even when there are wireless routes available. I have tried querying my MPVolumeView after it has been created to check for wireless routes and I get 0. I'm…
CodemanDoEl
  • 472
  • 1
  • 4
  • 18
2
votes
1 answer

In iOS9.0, the MPVolumeSlider value is not holding proper value, It always 0.0

The following code works fine in iOS 8.0 devices, but in iOS9.0 always getting slider value as 0.000, let volumeView = MPVolumeView() for subview in volumeView.subviews { if…
iBala
  • 41
  • 4
2
votes
1 answer

Swift - Animate MPVolumeView Slider Thumb

When a user changes the volume using the hardware volume buttons, I want my MPVolumeView Slider Thumb to animate itself to the position. How can I do that?
evenwerk
  • 947
  • 1
  • 12
  • 28
2
votes
2 answers

Change MPVolumeView iPad Popover size

I’m using an MPVolumeView. I have this code in viewDidLoad method MPVolumeView *volumeView = [[MPVolumeView alloc] init]; volumeView.center = self.view.center; volumeView.showsVolumeSlider = NO; [self.view addSubview:volumeView]; And even when…
Guerrix
  • 198
  • 1
  • 3
  • 13
2
votes
1 answer

Hide volume Hud when the device volume is set programmatically using Swift

I'm using this method to set the volume device programmatically: self.mpVolumeView.frame = CGRectMake(0, 0, self.view.bounds.width * 0.82, CGFloat(50)) self.mpVolumeView.showsRouteButton = false self.mpVolumeView.showsVolumeSlider =…
DrCachetes
  • 954
  • 1
  • 9
  • 30
2
votes
0 answers

MPVolumeView iPad popover direction

I’m using an MPVolumeView to pop up available AirPlay devices, and the AirPlay button happens to be in the far lower-right corner of my UI. When I tap it, the AirPlay popover that appears is really, really short (like enough for the title and one…
Luke
  • 9,512
  • 15
  • 82
  • 146
2
votes
1 answer

MPVolumeView equivalent for Android

Does anyone know if there is an equivalent to MPVolumeView available in Android? Basically, it's a a built in component in iOS that can present users with a system volume slider, and / or (what I'm really after in Android) a list of available…
Ted
  • 2,525
  • 2
  • 37
  • 54
2
votes
1 answer

MPVolumeView's slider setVolumeThumbImage:forState: not working on iOS5

oI use a MPVolumeView to display a volume slider. I've customized it with [myVolumeView setVolumeThumbImage:[UIImage imageNamed:@"sound_slider_knob.png"] forState:UIControlStateNormal]; [myVolumeView setVolumeThumbImage:[UIImage…
Nicolas Roy
  • 3,773
  • 5
  • 27
  • 42