mpmovieplayercontroller

Multiple MPMoviePlayerController instances

岁酱吖の 提交于 2019-12-02 20:27:40
I'm trying to put two MPMoviePlayerController on a UIView like this for (int i = 0; i < 2; i++) { UIView* v = [[UIView alloc] initWithFrame: CGRectMake(0.0f, 300.0f * i, self.view.width, 300.0f)]; [self.view addSubview: v]; NSURL* url = [NSURL URLWithString: [urls objectAtIndex: i]]; MPMoviePlayerController* movieController = [[MPMoviePlayerController alloc] initWithContentURL: url]; movieController.movieSourceType = MPMovieSourceTypeFile; movieController.shouldAutoplay = NO; movieController.view.frame = v.bounds; [self.view addSubview: movieController.view]; } But only one view at a time is

AVAudioRecorder won't record IF movie was previously recorded & played

雨燕双飞 提交于 2019-12-02 19:38:07
My iPhone app uses "AVAudioRecorder" to make voice recordings. It also uses "UIImagePickerController" to record movies and "MPMoviePlayerController" to play movies. Everything works fine until I do all three things in a row: Record a movie using UIImagePickerController Play back the recorded movie using MPMoviePlayerController Try to make a voice recording using AVAudioRecorder When I call AVAudioRecorder's "record" method in step 3, it returns NO indicating failure, but giving no hints as to why (come on Apple!) AVAudioRecorder's audioRecorderEncodeErrorDidOccur delegate method is never

How to show buffered data on UISlider using MpMoviePlayerController in iOS?

荒凉一梦 提交于 2019-12-02 17:47:22
I am using MPMoviePlayerController to play audio and I want to show the buffered data on slider like this ... I want to show the buffer data like red section in slider. I have tried to google it. But I didn't get any solution for it. and How to make slider customize? Thanks in advance... Sourabh Sharma Yes We can Show stream data using MPMoviePlayerController by its playableDuration . I am explaining all these steps involved me to make this custom_slider for my customize player ... (You Can direct read step 4 if you only interested in programming part) These are the steps: Step 1 : (First

Pros and cons of MPMoviePlayerController versus launching UIWebView to stream movie

試著忘記壹切 提交于 2019-12-02 15:39:11
I have a client who has video content for the web in Flash format. My task is to help them show the videos in an iPhone app. I realize that step one is to get these videos into the appropriate Quicktime format for the iPhone. Then I'm going to have to help the client figure out how or where to host these files. If that's tricky I assume they can be hosted at YouTube. My chief concern, though, is which approach to take to stream the video. What are the pros and cons of MPMoviePlayerController versus launching UIWebView with the URL of the stream? Is there any difference? Is one of them more or

MPMoviePlayerController in Portrait mode?

北城余情 提交于 2019-12-02 14:09:59
问题 I would like to know if it's possible to have a MoviePlayer in portrait mode. Thanks for your help. T. 回答1: If you use [moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO]; " API your application will be rejected from Apple Store 回答2: @interface MPMoviePlayerController (extend) -(void)setOrientation:(int)orientation animated:(BOOL)value; @end moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR]; [moviePlayer setOrientation:UIDeviceOrientationPortrait

AVPlayer and MPMoviePlayerController differences [closed]

痞子三分冷 提交于 2019-12-02 13:52:33
I am developing an iPhone application that needs to play videos. So far, I learned that there are at least two API's for achieving this; AVPlayer and MPMoviePlayerController . What are the main differences? Till NOTE as of iOS9, Apple has deprecated the MPMoviePlayerController: The MPMoviePlayerController class is formally deprecated in iOS 9. (The MPMoviePlayerViewController class is also formally deprecated.) To play video content in iOS 9 and later, instead use the AVPictureInPictureController or AVPlayerViewController class from the AVKit framework, or the WKWebView class from WebKit.

Play multiple videos

♀尐吖头ヾ 提交于 2019-12-02 10:44:30
问题 I'm actually using the MPMoviePlayerController for play video in my iPad app. Actually, I can easly play 1 video but I'm trying to play in the same time 2 video, here is my code : // Look for the video in the main bundle NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"3idiots.mov" ofType:nil]; NSURL *url = [NSURL fileURLWithPath:urlStr]; NSString *urlStr2 = [[NSBundle mainBundle] pathForResource:@"3idiots.mov" ofType:nil]; NSURL *url2 = [NSURL fileURLWithPath:urlStr2]; videoPlayer

How to load MPMoviePlayerController contentUrl asynchronous when loading view?

点点圈 提交于 2019-12-02 08:44:21
问题 I try to play a video using a MPMoviePlayerController. The setup is: I push a new ViewController, then set up the view and the movie player instance in viewDidLoad and then use a NSURLSession.sharedSession().dataTaskWithURL() where I load the REST resource for the movie to give me the URL. In the completion block I set the contentUrl of the movie player instance to this url and say play. However, the movie frame stays black. If I set the contentUrl hardcoded to the url either in viewDidLoad,

repeatmode doesn't work in MPMoviePlayerViewController?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 08:08:18
How to display a recorded video as repeat as an'n' number of times like in Vine Application. Here I use the MPMoviePlayerViewController, and works great display the recorded video. But the problem is, it doesn't repeating. Here the currently using code is, NSURL *url = [NSURL fileURLWithPath:videoPath]; playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; [self presentMoviePlayerViewControllerAnimated:playerController]; [playerController.moviePlayer prepareToPlay]; playerController.view.frame = CGRectMake(200, 402, 300, 200); playerController.moviePlayer

MPMovieplayerController doesn't play next URL when in background

社会主义新天地 提交于 2019-12-02 05:26:36
问题 I am developing an iOS app in which I am streaming .mp3 files using MPMoviePlayerController. When playing of one file completes I take next url and play the file. All works great in foreground but when I move the app to background the current song plays well but when it finishes, the method which plays the next song doesn't get executed. I checked similar questions on stackoverflow but the solutions doesn't seem to work for me. Any pointer in the right direction will be very helpful. Thanks