mpmovieplayercontroller

MPMoviePlayerController full screen orientation issue

心已入冬 提交于 2020-01-07 02:56:09
问题 My app supports only Landscape. I've added an MPMoviePlayerController to the view of my view controller. When I press full screen button, it works fine and it will rotate in Landscape only for iOS versions prior to iOS 5. However, in iOS 5.0+, it also supports portrait (only when I enter into full screen mode). How can I prevent portrait support in iOS 5.0 and above? 回答1: Try subclassing MPMoviePlayerViewController and overriding the shouldAutorotatoToInterfaceOrientation method to only

MPMoviePlayerController causing a MP _playbackInterruptionDidEndNotification on appDidBecomeActive

对着背影说爱祢 提交于 2020-01-07 02:17:06
问题 I have a navigation controller that pushes another view which plays video files. Everything is working fine and on the simulator there is no problem at all. The problem is when I test the application on the iPhone, the movies play well but if I press the home button on the iPhone then I launch the app again I receive the following warning in Xcode Debugging area: 2011-11-21 20:23:05.216 KMW[324:707] MP _playbackInterruptionDidEndNotification :: NSConcreteNotification 0x164e90 {name =

MPMoviePlayerController thumbnailImageAtTime:timeOption: simple case doesn't work

前提是你 提交于 2020-01-06 20:09:52
问题 I build the movie player like this ... MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url]; player.view.frame = myView.bounds; player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [player prepareToPlay]; [myView addSubview:player.view]; self.mp = player; The url points to an m3u8 web stream. It plays just fine. Then I ask for an image like this ... NSTimeInterval currentInterval = self.mp.currentPlaybackTime;

How to show MPMoviePlayerController in landscape mode

亡梦爱人 提交于 2020-01-06 09:54:13
问题 i am working on a app where I am required to show "MPMoviePlayerController" in landscape mode and portrait mode. But My whole app is required to support Portrait mode only. That is no landscape mode for any view other than for the "MPMoviePlayerController". I tried few things given over stack overflow. Nothing worked in my case. Feels Stuck in the middle. But I have seen some of the app supporting suck kind of requirements. I have to implement it for both iOS 6, 7 In my app am using

How to disable seeking forward on MPMoviePlayerController

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 14:12:13
问题 In our iPad app, we would like to not allow the users to seek forward using the scrub bar in MPMoviePlayerController for some videos. Can anyone provide any solution as to how this can be done. 回答1: I know it eliminates the other controls, but you could write your own - set MPMoviePlayerController 's controlStyle property to MPMovieControlStyleNone . 来源: https://stackoverflow.com/questions/5319726/how-to-disable-seeking-forward-on-mpmovieplayercontroller

Do not resume MPMoviePlayerController when application enters foreground

对着背影说爱祢 提交于 2020-01-05 05:02:25
问题 I am developing an iPhone application which plays the video using MPMoviePlayerController . When I switch to background(device with multi-tasking support), the video play is paused and when I bring my app to foreground video play is resumed. But, when I switch to foreground I do not want my video to be resumed. I tried to pause the MPMoviePlayerController in the method applicationWillEnterForeground. But, I think they resume implicitely after call to applicationWillEnterForeground . Is there

Stream large movie with credential through MPMoviePlayer

ε祈祈猫儿з 提交于 2020-01-04 06:29:06
问题 I've been trying to stream a movie from a url that is protected. I can download the movie then play it, but the movie is too long so this is annoying. Here is my code: -(MPMoviePlayerController *)moviePlayerController { NSURL *url = [NSURL URLWithString:@"http://ABcDE.com/secret/Movie.mov"]; _moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; NSURLCredential *credential = [[NSURLCredential alloc] initWithUser: @"user" password: @"password" persistence:

Stream large movie with credential through MPMoviePlayer

我的未来我决定 提交于 2020-01-04 06:28:21
问题 I've been trying to stream a movie from a url that is protected. I can download the movie then play it, but the movie is too long so this is annoying. Here is my code: -(MPMoviePlayerController *)moviePlayerController { NSURL *url = [NSURL URLWithString:@"http://ABcDE.com/secret/Movie.mov"]; _moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; NSURLCredential *credential = [[NSURLCredential alloc] initWithUser: @"user" password: @"password" persistence:

MPMoviePlayer playing audio but not video when seeking into a file

大憨熊 提交于 2020-01-04 01:39:20
问题 I'm trying to seek into a video file at a certain point. Lets say the video is 5 minutes long and I'm jumping in at 110 seconds. When I play from the beginning, everything plays through fine, however, when I try to seek into the file, I can hear the audio but I can't see the video. I first thought this was maybe an issue with the order I'm loading the subviews but I can still see (and use) the controls for the player. Sliding back to 0:00 starts the video. The following is code from my video

how to know that MPMoviePlayerController is playing in Iphone OS 3.0

邮差的信 提交于 2020-01-03 19:35:45
问题 I need to know if at an specific moment the MPMoviePlayerController is playing. In iphone 3.0 it is not firing the MPMoviePlayerContentPreloadDidFinishNotification. Does anyone knows any solution? Thanks in advance! 回答1: Same question (but no answer) here and several other reports can be found on other sites (e.g. here) Not ideal, but it seems targeting 3.1 solves the problem. A workaround maybe to set the MPMoviePlayerController property scalingMode to something other than the default