mpmovieplayercontroller

Play multiple videos

痞子三分冷 提交于 2019-12-02 04:47:37
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 = [[MPMoviePlayerController alloc] initWithContentURL:url]; [self.view addSubview:videoPlayer.view];

Adding a view on top of a MPMoviePlayerController

点点圈 提交于 2019-12-02 03:38:07
问题 I have a MPMoviePlayerController that plays fullscreen. Then I want to add a UIButton above the movie, but it doesn't show up. I have already tried inserting the view above the movie view like this: mpc =[[MPMoviePlayerController alloc]initWithContentURL:url]; [mpc setMovieSourceType:MPMovieSourceTypeFile]; [self.view addSubview:mpc.view]; **[self.view insertSubview:self.backButton aboveSubview:mpc.view];** [mpc setFullscreen:YES]; mpc.controlStyle = MPMovieControlStyleNone; [mpc play]; And I

iOS status bar orientation after play video fullscreen

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 03:25:39
问题 I have an issue when play youtube video on iOS 6.1.2. That is, after play vieo at full screen mode at landscape (my app just supports portrait mode), or if user press Done during playing video, the status bar will not rotate. like this: Now I register the UIMoviePlayerControllerDidExitFullscreenNotification observer to change the rotation of statusbar and it work fine on iOS 6.1 and below, but not in iOS 6.0.1 Please tell me if I make any mistake. Or any other solution to fix the statusbar

Remove/hide Full screen button from MPMoviePlayerController Standard Controls

橙三吉。 提交于 2019-12-02 03:02:02
I want to remove/hide the full screen button from MPMoviePlayerController standard controls as full screen mode is creating lot of problems and also not a requirement of my app.I just want the play , stop , forward , reverse controls . Can anybody help me? David There's no standard way to do this. Here are your options. You could set the MPMoviePlayerController's controlStyle to None and create your own custom controls. Cons: this is a lot of work. You could use the NSNotificationCenter to intercept the MPMoviePlayerWillEnterFullscreenNotification and immediately set fullScreen mode to NO.

MPMoviePlayerController: when will I know that the downloading of the file reaches 10 percent?

喜夏-厌秋 提交于 2019-12-02 02:45:01
问题 I am playing videos from our web server and I'm using the MPMoviePlayerController to play it. It first, downloaded the file while simultaneously playing it. I need to post a log back in our web server every time a video reaches the 10% mark while downloading the file. How would I know that the downloading of the file reaches 10%? By the way, I already got the file size and already computed the 10th percent of any file, All I want to know is when will I be able to know that it already

Play video in the collection view cell like the videos playing in the Facebook app Timeline

寵の児 提交于 2019-12-02 02:22:29
问题 I want to play video in the collection view cell,the requirement is like the instagram timeline and playing video is like playing videos in the facebook time line, for this I used UICollectionViewCell in witch I have some images no videos now I am images from gallery,I am taking the image using camera and I am recording the video,every time I will have any one out from the above and the out put i have add to the time line. For example, we take 3vc 1st vc is having collection view with some

Keep playing sound with MPMoviePlayerController and locked screen?

时光怂恿深爱的人放手 提交于 2019-12-02 01:00:08
问题 When you're watching a video with MPMoviePlayerController and the user presses the top button to lock the screen, the app goes to sleep and so does the sound from the video. Is there any way to prevent the lock from stopping the sound? If not, is there a way to intercept the lock, to create a "custom lock", to save some battery but keep playing the video? 回答1: Sounds like you haven't set your audio session category. Set the AVAudioSession 's category property to AVAudioSessionCategoryPlayback

How to present MPMoviePlayerViewController from a UITabBarController?

拈花ヽ惹草 提交于 2019-12-01 23:37:21
问题 I have a view controller that's been added to a UITabBarController . In this view controller I have a button that opens up a movie using MPMoviePlayerViewController . When I play the movie, the top navigation bar is still overlayed on top of the movie, effectively blocking out a portion of the screen. When this view controller isn't inside a UITabBarController , however, the movie plays fine. Anyone know what's going on? 回答1: Figured it out. I guess things get wonky because

MPMovieplayerController doesn't play next URL when in background

家住魔仙堡 提交于 2019-12-01 23:00:31
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 in advance! EDIT :On testing the app on different devices I found that the functionality is working on

Problem playing mov file in MPMoviePlayerController

安稳与你 提交于 2019-12-01 21:58:20
(Im using this with Cocos2d) This works perfectly for an mp4 video NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"intro_iphone" ofType:@"mp4"]]; mpc = [[MPMoviePlayerController alloc] initWithContentURL:url] [mpc setFullscreen:YES animated:NO]; mpc.shouldAutoplay = YES; mpc.view.backgroundColor = [UIColor whiteColor]; mpc.view.frame = CGRectMake(0.0f, 0.0f, screenSize.width, screenSize.height); [mpc setScalingMode:MPMovieScalingModeFill]; [mpc setControlStyle:MPMovieControlStyleNone]; [mpc setMovieSourceType:MPMovieSourceTypeFile]; [mpc setRepeatMode