mpvolumeview

AirPlay support, MPMoviePlayerController and MPVolumeView relation

只谈情不闲聊 提交于 2019-12-17 22:54:08
问题 I am developing an iPhone application that has support for video play. I am using MPMoviePlayerController with custom controls for playing the video. For this purpose I have set control style of MPMoviePlayerController to MPMovieControlStyleNone. I would like to support AirPlay feature for the video being played. As per the documentation, we have to set the 'allowsAirPlay' property of MPMoviePlayerController to YES to enable AirPlay feature. How can I display the AirPlay button on my player

MPVolumeView does not show route button on launch

大城市里の小女人 提交于 2019-12-17 20:41:05
问题 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 only able to get 1 (and have the route button appear) by disabling and enabling WiFi to trigger a notification. The MPVolumeView in my app is to control the volume of videos played from UIWebView. Also, whenever I activate a wireless route for

iOS: Missing audio routes/sources in MPVolumeView

放肆的年华 提交于 2019-12-13 19:53:09
问题 I work on an audio app (using audio units). One of the requirements is to be able to change the audio route from the UI (Earpiece, Speaker, Connected Bluetooth device etc.). I use the MPVolumeView for this. Recently I have a bug with the list of routes that are displayed in the action sheet that is opened when tapping the route button in the volume view. I think that the problem appears only in iOS6, but not sure about that. The result is random: sometimes it displays only iPhone sometimes it

Can i control slider value programaticaly?

穿精又带淫゛_ 提交于 2019-12-13 05:41:46
问题 I have used following code for (UIView *view in [volumeView subviews]){ if ([[[view class] description] isEqualToString:@"MPVolumeSlider"]) { volumeViewSlider = (UISlider *) view; } } //[volumeViewSlider setBackgroundColor:[UIColor colorWithRed:1.00 green:0.0 blue:0.0 alpha:1.0]]; UIImage *stetchLeftTrack = [[UIImage imageNamed:@"leftslide.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0]; UIImage *stetchRightTrack = [[UIImage imageNamed:@"rightslide.png"]

Adding MPVolumeview programmatically in app

此生再无相见时 提交于 2019-12-12 21:01:44
问题 Trying to add MPVolumeView programmtically in app by using the following code MPVolumeView *_volumeView = [ [MPVolumeView alloc] init]; [_volumeView setShowsVolumeSlider:YES]; [_volumeView setShowsRouteButton:YES]; [_volumeView sizeToFit]; [view addSubview:_volumeView]; but getting so many Semantic issue that use of undeclared identifier MPVolumeView and Invalid operands to binary expression @property (nonatomic, strong) MPVolumeView *volumeView; Getting message in red for the above statement

Default MPVolumeView Style

别等时光非礼了梦想. 提交于 2019-12-11 11:39:54
问题 Why iOS 6 SDK still uses old MPVolumeView control's style. I want to use default style like in Apple's Default Music application. Old one: New one: Is there any way to use new one in my project? Thank you! 回答1: There is an another way to do this without using an UISlider control. UIImage *minImage = [UIImage imageNamed:@"bar-bg"]; UIImage *maxImage = [UIImage imageNamed:@"bar-bg-active"]; UIImage *tumbImage= [UIImage imageNamed:@"circle"]; // 276 x 14 px images used for min and max // so i

Hide volume HUD view in MPVolumeView

…衆ロ難τιáo~ 提交于 2019-12-11 00:27:41
问题 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() for subview in self.subviews { if subview.isKind(of: UISlider.self){ slider = subview as! UISlider slider.isContinuous = false slider.minimumTrackTintColor = UIColor.outlineStrokeColor slider.setThumbImage(#imageLiteral(resourceName: "volume"), for: .normal) slider

How to add the MPVolumeView via Xcode Designer?

╄→尐↘猪︶ㄣ 提交于 2019-12-07 07:13:28
问题 I originally added an MPVolumeView dynamically on to a page... #import "MediaPlayer/MPVolumeView.h" . . -(IBAction) handleVolumeButtonClicked:(id) sender { if (volumeView == nil) { volumeView = [[MPVolumeView alloc] initWithFrame:CGRectMake(25, 378, 270, 30)]; [self.view addSubview:volumeView]; [volumeView release]; } else { [volumeView removeFromSuperview]; volumeView = nil; } } But for some reason I started getting reports of the application crashing when dynamically adding the volume

How to add the MPVolumeView via Xcode Designer?

放肆的年华 提交于 2019-12-05 16:10:40
I originally added an MPVolumeView dynamically on to a page... #import "MediaPlayer/MPVolumeView.h" . . -(IBAction) handleVolumeButtonClicked:(id) sender { if (volumeView == nil) { volumeView = [[MPVolumeView alloc] initWithFrame:CGRectMake(25, 378, 270, 30)]; [self.view addSubview:volumeView]; [volumeView release]; } else { [volumeView removeFromSuperview]; volumeView = nil; } } But for some reason I started getting reports of the application crashing when dynamically adding the volume component. To work around this, I decided to try and add the component to the view via the XCode designer,

iPhone how hide volume overlay when press volume key

↘锁芯ラ 提交于 2019-12-03 21:07:51
I have do lots to solve it,like add MPVolumeView,someone says that system volume HUD will hide if you add a instance of MPVolumeView in current,but that not work i add obsever to observe the volume's change,and take picture but now i lost in how hide the volume HUD I had tried the solution that add MPVolumeView instance but won't WORK please give me another way to solve it Any suggestions would be appreciated. Julian Król You need to put volume overlay like this: MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame: CGRectZero]; [self.view addSubview: volumeView]; Now the custom