mpmovieplayercontroller

How to present MPMoviePlayerViewController from a UITabBarController?

风格不统一 提交于 2019-12-01 21:17:08
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? Figured it out. I guess things get wonky because MPMoviePlayerViewController has a method added as a category to UIViewController called

Keep playing sound with MPMoviePlayerController and locked screen?

五迷三道 提交于 2019-12-01 20:40:50
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? Sounds like you haven't set your audio session category . Set the AVAudioSession 's category property to AVAudioSessionCategoryPlayback to indicate that the app's major purpose is to play back audio, and it therefore should ignore the screen

IOS 6 Issue with MPMoviePlayerController

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 19:30:41
问题 Please check the below code: (void) moviePlayerDidExitFullscreen:(NSNotification*)notification { MPMoviePlayerController *player = [notification object]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidExitFullscreenNotification object:player]; [player setControlStyle:MPMovieControlStyleNone]; if (isPlaying) { [self stopCurrentMoviePlayer]; } } The issue is that this works perfectly in IOS 5, but not working in IOS 6 updates iPad3. The movie player is not

IOS 6 Issue with MPMoviePlayerController

女生的网名这么多〃 提交于 2019-12-01 18:35:14
Please check the below code: (void) moviePlayerDidExitFullscreen:(NSNotification*)notification { MPMoviePlayerController *player = [notification object]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidExitFullscreenNotification object:player]; [player setControlStyle:MPMovieControlStyleNone]; if (isPlaying) { [self stopCurrentMoviePlayer]; } } The issue is that this works perfectly in IOS 5, but not working in IOS 6 updates iPad3. The movie player is not closing after the video is complete and I need to click done button every time to close the Movie Player. Can

MPMoviePlayerController seek forward in fullscreen mode until end is stuck

懵懂的女人 提交于 2019-12-01 17:04:21
There seems to be a problem with the MPMoviePlayerController where once you're in fullscreen mode and you hold down the fast forward button, letting it seek forward (playing at fast speed) all the way to the end of the video. Thereafter the you just get a black screen and it's stuck. In other words it does not respond to any taps gestures and you can not get out of this situation. Has anyone else encountered this problem? Is there anyway to work around it in code? Chengjiong It seems it's an iOS bug since fast backward to the very beginning won't cause the black screen but fast forward to the

MPMoviePlayerController seek forward in fullscreen mode until end is stuck

我的梦境 提交于 2019-12-01 16:14:06
问题 There seems to be a problem with the MPMoviePlayerController where once you're in fullscreen mode and you hold down the fast forward button, letting it seek forward (playing at fast speed) all the way to the end of the video. Thereafter the you just get a black screen and it's stuck. In other words it does not respond to any taps gestures and you can not get out of this situation. Has anyone else encountered this problem? Is there anyway to work around it in code? 回答1: It seems it's an iOS

Swift - Can't Dismiss MPMoviePlayerViewController

早过忘川 提交于 2019-12-01 15:59:46
I have a video which opens in an MPMoviePlayerController in my app. It all works great except for the Done button which should close the player. The first time that the video is played the Done button works great. But if you pause it when you are watching it, then hit Done the second time you try to play the video, the Done button doesn't work. I have made a screen recording here to make it a bit simpler to understand: http://1drv.ms/1Jcdodc Can anyone help? This is my code that I am using: import UIKit import MediaPlayer class MainContent: UIViewController { //Movie Player variables var

Error '!dat' trying to set the (null) audio devices' sample rate

守給你的承諾、 提交于 2019-12-01 05:42:38
I am trying to play an audio clip (using AVAudioPlayer) and a video clip (using MPMoviePlayerController), both of which were working. I then checked the files into SVN and pulled them down on another Mac. Now when I run the app (iPad app) when it tries to play either the audio or video, both give the error: Error '!dat' trying to set the (null) audio devices' sample rate Figuring that SVN corrupted the files, (even though the Mac's QuickLook will play them fine), I replaced them with the versions on the Mac where they still work. However I am still getting the error. All code is exactly the

MPMoviePlayerViewController becomes black when enters background

走远了吗. 提交于 2019-12-01 05:31:19
I have problem with MPMoviePlayerViewController , when app enters background and then I launch it again or go another viewControllers the movie became black ! I have movie which plays in the background of my menus , here is my code : EIDTED CODE : -(void)viewDidLoad { [self moviePlayer2]; } - (void) moviePlayer2 { NSString *path = [[NSBundle mainBundle] pathForResource:@"cloud" ofType:@"mp4"]; player = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; player.view.userInteractionEnabled = YES; player.moviePlayer.repeatMode = YES; player.moviePlayer

Extremely weird behavior of navigationBar and MPMoviePlayerController. Bug in iOS or my error?

三世轮回 提交于 2019-12-01 04:47:54
I have a MPMoviePlayerController object that plays a video fullscreen in either portrait or landscape. If I rotate orientation while the video is playing and do the rotation within a few seconds after the video starts playing and the video status bar is visible, when the video ends my navigation bar is perfect. But if I wait until the video status bar disappears a few seconds into the video playing and then rotate orientation, when the video ends my navigationBar is partially hidden behind the status bar, like pushed up. Have you ever seen something like this? I am able to recreate this bug