mpmovieplayercontroller

Keep MPMoviePlayerViewController playing when in background

时光总嘲笑我的痴心妄想 提交于 2019-12-13 04:26:50
问题 I use MPMoviePlayerViewController to playback videos in my iOS app on iPhone4 (iOS5.1), new iPad (iOS5.1), iPad (iOS4.2). I press home button twice when playing a video, the multitask dock shows and player pauses. I have tried to call player's play method in appDelegate applicationWillResignActive ,but it didn't work. Does anyone know how to do to avoid player pause ? Another question, how to show video's title on remote control panel? (swipe multitask dock to leftmost). Thanks. 回答1: I don't

Removing/Deactivating fullscreen button on MoviePlayerControl

荒凉一梦 提交于 2019-12-13 04:24:24
问题 is there a way to remove the fullscreen button from MPMoviePlayerController ? Or at least deactivate it? Yes I searched, but the older question isn't solved and I don't know if there is something like a "push" feature. 回答1: There is no way to do that. You can hide the entire control panel. Hopefully this link helps. 回答2: Actually there is no way to achieve this. You can use either: [yourPlayer setMovieControlMode:MPMovieControlModeNone]; (But it'll hide all controls) or Disable the user

MPMoviePlayerController - Detect and Differ Prev/Next buttons

拥有回忆 提交于 2019-12-13 00:49:00
问题 I've achieved detecting the click of prev/next button by following code, but still haven't found an way to distinguish the two clicks. in @implementation MyMovieController : MPMoviePlayerController [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieChangeCallBack:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil]; and define - (void) movieChangeCallBack:(NSNotification*) aNotification - (void)movieChangeCallBack:(NSNotification*) aNotification { if

MPMoviePlayerViewController Black Screen issue!

﹥>﹥吖頭↗ 提交于 2019-12-12 23:09:15
问题 I have this code trying to run a video on the iPhone 4 Simulator. The problem is that looks like it loads the player but half a second later loads a back screen on top of the whole application disabling touch and everything, and it looks like it does not play the video also, because I can't hear anything. Any ideas?! MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:videoUrl]; if (mp) { mp.moviePlayer.scalingMode = MPMovieScalingModeFill; mp.moviePlayer

Small video playback

放肆的年华 提交于 2019-12-12 21:05:56
问题 From what I have gathered from internets the MPMoviePlayerController class doesn't support small video playback. So, in an effort to beat a dead horse I was wondering what kind of methods could be used to get a small video playing in a corner of the screen without interrupting the rest of the screen. So far we've come across two solutions that may work: using a UIImageView and flopping images through it like a madman and using a large fullscreen video with all the animations we need already

Is there a way to adjust volume in MPMoviePlayer Controller by program?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 19:29:08
问题 I want to increase or decrease or even mute the volume of movie player by my program instead of the buttons in Movie player. Is there a way to do it? Thanks 回答1: Currently there is no public API to control these settings through software. If you'd like to have this kind of control I'd recommend filing a bug with the Apple developer connection. 来源: https://stackoverflow.com/questions/959908/is-there-a-way-to-adjust-volume-in-mpmovieplayer-controller-by-program

Playing MPMoviePlayerController Synchronously with AVAudioPlayer

為{幸葍}努か 提交于 2019-12-12 11:48:20
问题 I'm trying to add a movie to the intro of a game. The movie has no sound/music. I do, however, have music looping in the background. The music is somewhat specific in that the intro of the music is as long as the movie and then the tempo kicks in a bit faster. The problem I am having in that on some devices, like the iPod 4G, play the music too soon, which then basically breaks the movie sequence. This does not happen in my iPhone 4S. I have tried looking for some sort of notification of when

UIImagePickerController choosing video prevents MPMoviePlayerViewController instance from working

烈酒焚心 提交于 2019-12-12 10:59:48
问题 I have a viewcontroller where I present an UIImagePickerController in a popOver. If the user selects a video, then dismisses the popover and moves on to the next "page (viewcontroller)" and attempts to play any movies using MPMoviePlayerViewController on that page they are unable to do so. I believe that what is happening is that the player displayed in the imagepicker is somehow being retained and therefore this new video cannot play. I've properly dismissed the popover and do not receive

Playing a video with Xamarin for iOS broken after latest update

孤街醉人 提交于 2019-12-12 10:43:12
问题 The following code in Xamarin for iOS was working fine prior to the Xamarin for iOS update to v2.0.50727 This is the code in a custom renderer in a Xamarin Forms app class WatchVideoRenderer : PageRenderer { MPMoviePlayerController moviePlayer; protected override void OnElementChanged(VisualElementChangedEventArgs e) { base.OnElementChanged(e); var url = new NSUrl("http://192.168.12.4:8085/MediaUploads/1/211/520140731170618/DPM202.mp4"); moviePlayer = new MPMoviePlayerController();

How to play audio through built-in earpiece speaker

不羁岁月 提交于 2019-12-12 09:52:46
问题 I have seen some apps like WhatsApp has a feature to play audio clips only through earpiece(phone call speaker) when the user brings up the device near to ear. Otherwise its playing via normal built-in speaker. I am using MPMoviePlayer for playing audio clips. I did go through lots of similar questions and answers on the internet, and all the answers say to set the AudioSession Category to PlayAndRecord. Thats it. I did the same, but couldn't get the exact result that I want to get. // Audio