mpmovieplayer

MPMoviePlayerViewController won't play movie, start and closes immediately

↘锁芯ラ 提交于 2019-12-06 16:24:16
I'm trying to play a video with MPMoviePlayerViewController, I present the MPMoviePlayerViewController but after 1 second he is dismissing itself. This is my code: .h: #import <MediaPlayer/MediaPlayer.h> @property (strong, nonatomic) MPMoviePlayerViewController *moviePlayerViewController; .m: - (void)playmovie { NSString *databaseName = @"NO.mp4"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDir = [documentPaths objectAtIndex:0]; NSString *databasePath = [documentDir stringByAppendingPathComponent:databaseName];

customize quicktime iphone

假如想象 提交于 2019-12-06 14:45:30
Did anyone tried to customize the window in which the quicktime is playing video? If so, can you give me a hint hoe to start implementing something like this. Thank you indeed. UPDATE: Some apps have implemented it. See it here. The phone doesn't have Quicktime, at least not in the traditional sense. Video playback is handled by a dedicated decoder on the system SoC. You cannot customize the movie player in any significant way, since doing so might cause it to fall off the hardware decode path, and it is entirely possible Apple doesn't even have a software decoder on the device. So, in other

MPVideoPlayer add/remove buttons

妖精的绣舞 提交于 2019-12-06 10:27:56
问题 Does anyone knows how to add/remove buttons from the MPVideoPlayer window? I put bellow an example form an app that does that. It is in App Store which means that it is allowed by Apple. Thank you in advance. UPDATE I think that the main way to do it is just by obtaining the UITabBarController of the MPVideoPlayer window . Example http://img338.imageshack.us/img338/5184/poz.jpg 回答1: find the keywindow then u can find the view ..... so u could be access the button of the view .. 来源: https:/

Set ContentURL of MPMoviePlayerController twice

馋奶兔 提交于 2019-12-05 19:08:27
I create an embedded MPMoviePlayerController thusly inside my loadView method: self.moviePlayerController = [[[MPMoviePlayerController alloc] init] autorelease]; // add to view, setup moviePlayerController's view frame, etc And I can later load a movie the user chooses thusly: NSURL *fileUrl = ... self.moviePlayerController.contentURL = fileUrl; and everything works great. However, if I set the contentURL again: NSURL *fileUrl2 = ... self.moviePlayerController.contentURL = fileUrl2; This does not work, even if fileUrl2 == fileUrl1. When I change the contentURL, I get the following

MPMoviePlayerController showing black screen with sound in iOS 7, works fine in iOS 6

大憨熊 提交于 2019-12-05 15:56:05
//introVideoViewController #import <AVFoundation/AVAudioSession.h> #import <AudioToolbox/AudioServices.h> #import <AVFoundation/AVAudioPlayer.h> #import <MediaPlayer/MediaPlayer.h> @property(nonatomic,strong) MPMoviePlayerController *playercontroller; Hi Guys, anybody know what in iOS 7 i can heard my video sound but not the video, it works fine in iOS 6. any comments are greatly appreciated. //introVideoViewController //prepare & init video -(void)prepareIntroVideo { NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"intro_movie" ofType:@"mp4"]]; //NSURL *url = [NSURL

How to show “Loading Movie…” message with MPMoviePlayerController

老子叫甜甜 提交于 2019-12-05 14:43:37
I'm working with the MPMoviePlayerController for the iOS platform and am not sure why the "Done" and "Loading Movie..." controls are not displaying automatically when loading a new video. My original implementation of this was to use the UIWebView control to stream the videos, and when the videos are accessed, the "Done" and "Loading Movie..." controls are displayed until the video is loaded and ready to play. I would like to reproduce the same user experience with the MPMoviePlayerController. Should I get the "Done" and "Loading Movie..." control overlays for free? If not, what do I have to

MPVideoPlayer add/remove buttons

大城市里の小女人 提交于 2019-12-04 19:14:06
Does anyone knows how to add/remove buttons from the MPVideoPlayer window? I put bellow an example form an app that does that. It is in App Store which means that it is allowed by Apple. Thank you in advance. UPDATE I think that the main way to do it is just by obtaining the UITabBarController of the MPVideoPlayer window . Example http://img338.imageshack.us/img338/5184/poz.jpg find the keywindow then u can find the view ..... so u could be access the button of the view .. 来源: https://stackoverflow.com/questions/1665719/mpvideoplayer-add-remove-buttons

How do I catch the MPMoviePlayer next button click event while in fullscreen mode on the iPad?

末鹿安然 提交于 2019-12-03 20:59:51
When the MPMoviePlayerViewController is in fullscreen mode on the iPad, it defaults to having its controls to have a previous and next button on the overlay there. In my project I need to capture the click for that overlay button and handle it accordingly. Since I'm not sure how to invoke a playlist just yet there is no next item and clicking on the button breaks the view once I exit fullscreen mode. Somehow it just doesn't know what to do and I get no errors. What I would like to know is if there a way to listen/catch that event from the fullscreen next and previous buttons? I have also tried

iOS - Video not rotating only in iOS7 over iPhone?

喜欢而已 提交于 2019-12-03 10:34:07
What i have Done? I am playing videos in an extended class of MPMoviePlayerViewController and have implemented orientation functions as follows - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ return FALSE; } else{ return TRUE; } } - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self setControlsPositions:toInterfaceOrientation]; } -(BOOL)shouldAutorotate { return YES; } What issue i am Facing? The

MPMoviePlayerController with a Custom Button on its toolbar

半世苍凉 提交于 2019-12-03 03:51:12
You might have seen video through you tube in iPhone. Normal MPMoviePlayerController has previous, next & play/pause buttons. You tube - player has additional two buttons on it. => Add to favorites on the left side. => Email this video on right side. I want to implement the same for my application. But I am failed to find out the property or methods regarding - implementing this. How do I need buttons on it? When User is watching video there should no buttons on screen. When user taps on video - a toolbar comes on top & at center A center tool bar has generally three buttons on it ,Previous -