mpmovieplayercontroller

Turn off console logging for specific objects

眉间皱痕 提交于 2019-12-18 13:01:35
问题 It's some kind of annoying: Since I started using the MPMoviePlayerController the console is overfilled with information from MPAVController. Eg: [MPAVController] Autoplay: _streamLikelyToKeepUp: 1 -> 1 [MPAVController] Autoplay: Disabling autoplay This is some kind of annoying because I always have to search for my own logged information. Is there a way to turn off logging for specific objects or frameworks? 回答1: I don't think such filtering is possible out of the box. But it's possible to

MPMoviePlayerController adding UIButton to view that fades with controls

余生长醉 提交于 2019-12-18 12:42:14
问题 I am trying to add a UIButton to the view of a MPMoviePlayerController along with the standard controls. The button appears over the video and works as expected receiving touch events, but I would like to have it fade in and out with the standard controls in response to user touches. I know I could accomplish this by rolling my own custom player controls, but it seems silly since I am just trying to add one button. EDIT If you recursively traverse the view hierarchy of the

MPMoviePlayerController switching movies causes white flash

懵懂的女人 提交于 2019-12-18 11:33:54
问题 I have a small UIView that displays a repeated movie. When the user taps a button another movie is loaded and displayed in the same UIView. The problem is that there is a half second "flash" between the removing of the first movie and the displaying of the second. Is there any to remove this? - (void) setUpMovie:(NSString*)title { NSString *url = [[NSBundle mainBundle] pathForResource:title ofType:@"mp4"]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:

AVPlayerItem replaceCurrentItemWithPlayerItem Blocking

谁说我不能喝 提交于 2019-12-18 10:41:15
问题 First a little context about the application... - There's a lot of heavy UI operation's involving video players (mostly scrolling) - The videos are dynamic and change based on our current page . - so the video's have to be dynamic and keep changing and also the UI needs to be responsive I was initially using a MPMoviePlayerController but then due to certain requirements i had to fall back on the AVPlayer I made my own wrapper for the AVPlayer . To change the content in the videoPlayer this is

How to hide control before MPMoviePlayerController movie is played?

五迷三道 提交于 2019-12-18 10:36:40
问题 Assume iOS 3.2 or later. What is the proper sequence of command to play a move with the controls initially hidden. When the movie is playing, the user has the option to tag on screen and show controls. Thanks! My (control not hidden) code: - (void)playMovie { NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Test" ofType:@"m4v"]]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; // Register to receive a notification

how to provide only one view with landscape for MPMoviePlayerController in IOS6

社会主义新天地 提交于 2019-12-18 09:48:19
问题 i had spend 2 hours finding the correct code to fix my orientation problem this are my movieplayer code. i need this particular view to be shown in landscape. in appdelegate i set all orientation and in my rootviewcontroller i set is as portrait only and in my movieplayer view as landscape but not luck. can anybody give me some comment on how to fix the issues please ? - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window { return

How to resume a movie that's being played with presentMoviePlayerViewControllerAnimated

帅比萌擦擦* 提交于 2019-12-18 09:23:54
问题 I'm uisng this code to display a movie: MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL]; mp.moviePlayer.movieSourceType = MPMovieSourceTypeUnknown; [self presentMoviePlayerViewControllerAnimated:mp]; [mp.moviePlayer play]; The code is working fine. However when the application goes to the background while playing a movie, when the app comes back in the foreground the movieplayer is not displayed. (I see the view of the controller that called

_itemFailedToPlayToEnd error when playing video in MPMoviePlayerController

不打扰是莪最后的温柔 提交于 2019-12-18 08:57:54
问题 I am trying to play video using MPMoviePlayerController , and am having following error, _itemFailedToPlayToEnd: { kind = 1; new = 2; old = 0; } Below is my code, NSURL *fileURL = [NSURL URLWithString:_videoUrl]; NSLog(@" fileURL: %@",fileURL); _moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:fileURL]; _moviePlayer.movieSourceType = MPMovieSourceTypeStreaming; UIWindow *backgroundWindow = [[UIApplication sharedApplication] keyWindow]; [_moviePlayer.view setFrame

Reverting to portrait after Done pressed on movie player?

♀尐吖头ヾ 提交于 2019-12-18 07:16:12
问题 I've got a MPMoviePlayer working. It is designed to show a postage-stamp size movie as a subview in the view. When the phone is rotated into landscape, it goes into full screen mode. And when the phone is in portrait it goes into postage-stamp portrait mode. The only problem is when I press Done when in landscape mode, it stays in landscape, with the postage stamp sized movie, rather than kick back into portrait.. Here's some of my code: -(void)willRotateToInterfaceOrientation:

iphone - force MPMoviePlayerController to play video in landscape mode

房东的猫 提交于 2019-12-18 04:23:33
问题 I have an app that is portrait mode only, but when the user plays a video I want it to play in fullscreen landscape mode (the video player doesn't look good in portrait mode). I'm playing it like this: [self.view addSubview:myMoviePlayer.view]; [self.myMoviePlayer setFullscreen:YES animated:YES]; [self.myMoviePlayer play]; What's the best way to accomplish this? 回答1: Read this article: http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and