Search Results

Search found 123 results on 5 pages for 'mpmovieplayercontroller'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • MPMoviePlayerController iPhone 3G & .mov file format

    - by Matt
    Just posting a question to the world... My app is currently setup to play video files. The app is setup to play .mov files and when tested on a 3GS, iPhone 4, and an iPad, it works great. But when playing on an iPhone 3G, the file does not play. Is this based on different compression standards that the 3G can't handle? I liked the .mov extension as it was compressed nicely to stream to the device. I have now converted the video files to .m4v so it will play on the 3G, but the file is now 3 times the size. Thanks in advance for any answers I get!!

    Read the article

  • Strange crashes when using MPMoviePlayerController in iPad and iPad simulator with iOS 4.2.

    - by Dave L
    I'm getting crashes when trying to play a movie using MPMoviePlayerController on the iPad and in the iPad simulator using iOS 4.2. I am building using xcode 3.2.5 and the 4.2 SDK. When running on an iPad using iOS 3.2 or in the iPad simulator 3.2, the same code works fine, but on an iPad running 4.2 or in the iPad simulator 4.2, it crashes. The crash is due to an exception for calling an unknown selector down somewhere deep in the cocoa libraries, something tries to call a selector called "setHitRectInsets:" on a UIButton object. Also, the crash happens after control has returned to the main event loop. Anybody have any idea what might be causing this? Here is the code (roughly, some extraneous stuff deleted that doesn't seem to have any effect) that is crashing: NSString *fullMovieFilename = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"m4v"]; NSURL *movieURL = [NSURL fileURLWithPath:fullMovieFilename]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; moviePlayer.controlStyle = MPMovieControlStyleNone; // crash happens regardless of the setting here [moviePlayer.view setFrame:self.view.bounds]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES]; // crash happens whether i use fullscreen or not [moviePlayer play]; The same code also works just find if I build using Xcode 3.2.3 and the 4.0 SDK. The crash stack trace looks like this: 2011-03-04 23:08:22.017 MyApp[31610:207] -[UIButton setHitRectInsets:]: unrecognized selector sent to instance 0x990bc60 2011-03-04 23:08:22.020 MyApp[31610:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton setHitRectInsets:]: unrecognized selector sent to instance 0x990bc60' *** Call stack at first throw: ( 0 CoreFoundation 0x0151abe9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x0166f5c2 objc_exception_throw + 47 2 CoreFoundation 0x0151c6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x0148c366 ___forwarding___ + 966 4 CoreFoundation 0x0148bf22 _CF_forwarding_prep_0 + 50 5 MediaPlayer 0x011b5bdb -[MPTransportControls createButtonForPart:] + 380 6 MediaPlayer 0x011b65d5 -[MPTransportControls _updateAdditions:removals:forPart:] + 110 7 MediaPlayer 0x011b4d78 -[MPTransportControls _reloadViewWithAnimation:] + 299 8 MediaPlayer 0x011b621a -[MPTransportControls setVisibleParts:] + 49 9 MediaPlayer 0x011b6e4a -[MPTransportControls initWithFrame:] + 173 10 MediaPlayer 0x011f9188 -[MPInlineTransportControls initWithFrame:] + 78 11 MediaPlayer 0x011f193a -[MPInlineVideoOverlay layoutSubviews] + 158 12 QuartzCore 0x00d6e451 -[CALayer layoutSublayers] + 181 13 QuartzCore 0x00d6e17c CALayerLayoutIfNeeded + 220 14 QuartzCore 0x00d6e088 -[CALayer layoutIfNeeded] + 111 15 MediaPlayer 0x011f130c -[MPInlineVideoOverlay setAllowsWirelessPlayback:] + 46 16 MediaPlayer 0x011f5b0d -[MPInlineVideoViewController _overlayView] + 526 17 MediaPlayer 0x011f6359 -[MPInlineVideoViewController _layoutForItemTypeAvailable] + 1350 18 Foundation 0x000e56c1 _nsnote_callback + 145 19 CoreFoundation 0x014f2f99 __CFXNotificationPost_old + 745 20 CoreFoundation 0x0147233a _CFXNotificationPostNotification + 186 21 Foundation 0x000db266 -[NSNotificationCenter postNotificationName:object:userInfo:] + 134 22 Foundation 0x000e75a9 -[NSNotificationCenter postNotificationName:object:] + 56 23 MediaPlayer 0x01184dd6 -[MPAVItem _updateForNaturalSizeChange] + 278 24 MediaPlayer 0x011818e4 __-[MPAVItem blockForDirectAVControllerNotificationReferencingItem:]_block_invoke_1 + 82 25 MediaPlayer 0x011899ba -[MPAVController _postMPAVControllerSizeDidChangeNotificationWithItem:] + 138 26 Foundation 0x000e56c1 _nsnote_callback + 145 27 CoreFoundation 0x014f2f99 __CFXNotificationPost_old + 745 28 CoreFoundation 0x0147233a _CFXNotificationPostNotification + 186 29 Foundation 0x000db266 -[NSNotificationCenter postNotificationName:object:userInfo:] + 134 30 Celestial 0x052a35b2 -[NSObject(NSObject_AVShared) postNotificationWithDescription:] + 176 31 Celestial 0x052ab214 -[AVController fpItemNotification:sender:] + 735 32 Celestial 0x052b5305 -[AVPlaybackItem fpItemNotificationInfo:] + 640 33 Celestial 0x052a3d5c -[AVObjectRegistry safeInvokeWithDescription:] + 211 34 Foundation 0x000fa9a6 __NSThreadPerformPerform + 251 35 CoreFoundation 0x014fc01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 36 CoreFoundation 0x0145a28b __CFRunLoopDoSources0 + 571 37 CoreFoundation 0x01459786 __CFRunLoopRun + 470 38 CoreFoundation 0x01459240 CFRunLoopRunSpecific + 208 39 CoreFoundation 0x01459161 CFRunLoopRunInMode + 97 40 GraphicsServices 0x01e4f268 GSEventRunModal + 217 41 GraphicsServices 0x01e4f32d GSEventRun + 115 42 UIKit 0x0038a42e UIApplicationMain + 1160 43 MyApp 0x0000837a main + 102 44 MpApp 0x00002009 start + 53 ) terminate called after throwing an instance of 'NSException' Been fighting with this for several days, and have searched the internet quite a bit for anybody having similar problems, all with no luck. Any suggestions would be greatly appreciated.

    Read the article

  • Why can't I retrieve UIDeviceOrientation correctly while playing a movie in MPMoviePlayerController?

    - by Zelldweller
    Everything works fine while I'm not playing anything (I'm calling beginnotifications, etc, and using the orientation to rotate my view). But after I start playing with MPMoviePlayerController every time I try a... UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; ...orientation gets a UIDeviceOrientationUnknown. Any clue? When the movie stops everything works alright again. I need this orientation to rotate the player's window, because Im using Iphone OS 3.1 so I can't directly use the view property inside MPMovie player controller.

    Read the article

  • How to know when the MPMoviePlayerController has been paused in iPhone?

    - by iPhoney
    I want to add an overlay view for my video when the video is paused by the user. Is there any way to get the pause notification from MPMoviePlayerController? According to Apple Doc, there should be ways to do this but I can't find which notification should I use for this purpose. Quote: In addition to being notified when playback finishes, interested clients can be notified in the following situations: -When the movie player begins playing, is paused, or begins seeking forward ... For more information, see the Notifications section in this reference.

    Read the article

  • iphone - creating a reference to a MPMoviePlayerController

    - by Mike
    At some point in my code I am creating a MPMoviePlayerController object and playing it. As I need to reference this object at some other methods in my code that runs asynchronously, I need to store a pointer to the movie object etc., so I can use that. Declaring MPMoviePlayerController * myMovie on the header file is out of question, because the compiler will give me an error saying "expected specifier-qualifier-list before 'MPMoviePlayerController'". If it was a view I could do something like [self.view viewWithTag:99]; to get the object, but the MPMoviePlayerController does not allow this. How can I obtain the movie object or store a reference to it, so I can call the object in other methods? thanks for any help.

    Read the article

  • MPMoviePlayerController doesn't implement MPMediaPlayback protocol as advertised?

    - by goren
    I'm trying to use the MPMediaPlayback protocol's currentPlaybackRate() to slow down a video. I'm confused though as the class MPMoviePlayerController states that: You can control most aspects of playback programmatically using the methods and properties of the MPMediaPlayback protocol, to which this class conforms. Except just above in the header here: http://developer.apple.com/iphone/library/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html it doesn't seem to. All I want to do is slow down the playback rate for a video.

    Read the article

  • Some problem with MPMoviePlayerController using in ipad application

    - by Miraaj
    Hi all I am using MPMoviePlayerController in Ipad application. Video is not showing but audio comes, same code working well for Iphone NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"video" ofType:@"mp4"]; movieURL = [NSURL fileURLWithPath:moviePath]; MPMoviePlayerController *IntroMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; [IntroMovie play]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlaybackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; Please suggest me Thanks Miraaj

    Read the article

  • MPMoviePlayerController doesn't implement MPMediaPlayback protocal as advertised?

    - by goren
    I'm trying to use the MPMediaPlayback protocol's currentPlaybackRate() to slow down a video. I'm confused though as the class MPMoviePlayerController states that: You can control most aspects of playback programmatically using the methods and properties of the MPMediaPlayback protocol, to which this class conforms. Except just above in the header here: http://developer.apple.com/iphone/library/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html it doesn't seem to. All I want to do is slow down the playback rate for a video.

    Read the article

  • Problem streaming video on iPhone, only audio is playing

    - by Sheehan Alam
    I am trying to stream a video using MPMoviePlayerController but only audio is working. How can I get the video to appear? - (void)loadView { NSString *url = @"http://d1xt8xjto3lfs9.cloudfront.net/060810/afternoonupdate060810.mov"; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]]; [moviePlayer play]; }

    Read the article

  • MPMoviePlayerController problems on iPad

    - by Infinity
    Hello guys! I'm trying to use the MPMoviePlayerController class on the iPad. here's my code: multimediaPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; multimediaPlayer.movieControlMode = MPMovieControlModeDefault; [multimediaPlayer play]; and this works very well on the iPhone but it don't want to run on the iPad. I hear the sound of the video, but the movie doesn't playing. Why it can be this problem?

    Read the article

  • MPMoviePlayerController problem when play a movie

    - by Momeks
    hi .. i put a movie when my application will lunch . just like gameloft games . so when application has lunched , movie plays fine but before the move plays .. my FirstViewController xib file show first then moview start to play ! why ? here is my code : - (void)applicationDidFinishLaunching:(UIApplication *)application { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"movie" ofType:@"m4v"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *IntroMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; IntroMovie.movieControlMode = MPMovieControlModeHidden; [IntroMovie play]; }

    Read the article

  • MPMoviePlayerController switching movies causes white flash

    - by bennythemink
    Hi guys, 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? <code> - (void) setUpMovie:(NSString*)title { NSString *url = [[NSBundle mainBundle] pathForResource:title ofType:@"mp4"]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]]; [[player view] setFrame:self.movieView.bounds]; [self.movieView addSubview:player.view]; if ([title isEqualToString:@"Bo_idle_02"]) { [player setRepeatMode:MPMovieRepeatModeOne]; } else { [player setRepeatMode:MPMovieRepeatModeNone]; } [player setControlStyle:MPMovieControlStyleNone]; [player play]; } - (void) startDanceAnimation { [self setUpMovie:@"Bo_dance_02"]; return; } </code>

    Read the article

  • MPMoviePlayerController stutter

    - by Paul
    Code : NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4v"]; MPMoviePlayerController *video = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; [video setBackgroundColor:[UIColor blackColor]]; video.scalingMode = MPMovieScalingModeAspectFill; [[ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector(movieFinishedCallback:) name: MPMoviePlayerPlaybackDidFinishNotification object: aVideo ]; [video play]; ....movieFinishedCallback... [video release]; Result : Movie starts at frame 10 and then resets to frame 0, creating a stutter effect... Any Ideas ?

    Read the article

  • Why won't my movie play using MPMoviePlayerController?

    - by Nosrettap
    I'm trying to get a basic movie to play in an iPhone app; however, I can't seem to get it to work. Here's my entire code: #import <MediaPlayer/MediaPlayer.h> #import "ViewController.h" @implementation ViewController - (IBAction)playMoviePressed:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer]; moviePlayer.controlStyle = MPMovieControlStyleDefault; moviePlayer.shouldAutoplay = YES; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES]; [moviePlayer prepareToPlay]; [moviePlayer play]; } @end I have one button on screen that calls playMoviePressed when it is tapped. I know that this method is getting called. I have also tried this with .mov and .mp4 local files that I have dragged into xcode.

    Read the article

  • MPMoviePlayerController problem at start

    - by Infinity
    Hello guys! I have a problem with MPMoviePlayerController, because when I start it in fullscreen it exists, but the song is still playing. I added the MPMoviePlayerDidExitFullscreenNotification notification and it says that when the video starts playin it exists the full screen. Here's my code: _multimediaPlayer = [[MPMoviePlayerController alloc] init]; _multimediaPlayer.controlStyle = MPMovieControlStyleDefault; _multimediaPlayer.initialPlaybackTime = 0; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlayerDidExitFullscreen:) name:MPMoviePlayerDidExitFullscreenNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlayerPlaybackStateChanged:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil]; NSString *path = [NSString stringWithFormat:@"%@/mag_%d/%@", [FMUtils documentsFolderPathWithFile:nil], _magID, _pageObject.fileName]; if ([FMUtils fileExistsAtPath:path]) { _multimediaPlayer.contentURL = [NSURL fileURLWithPath:path]; } else { _multimediaPlayer.contentURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", self.dataURL, _pageObject.fileName]]; } CGSize objectViewSize = self.frame.size; _multimediaPlayer.view.frame = CGRectMake(0, 0, objectViewSize.width, objectViewSize.height); [self addSubview:_multimediaPlayer.view]; if (_pageObject.blink) { [_multimediaPlayer setFullscreen:YES animated:YES]; } [_multimediaPlayer play]; Most of the time it happens when the video is not downloaded and it needs to stream it. Do you have any idea why is this happen?

    Read the article

  • How to enable iPhone auto lock during MPMoviePlayer playback?

    - by obiwahn
    When I play a video with MPMoviePlayerController in my app my iPhone does not auto lock (tested OS 3.0 & 3.1.2). However, the application.idleTimerDisabled = NO, so this setting is not affected by MPMoviePlayerController. How can I get my iPhone to sleep normally (e.g. after 3 min screen dims, then goes dark) when my app is running and playing a video?

    Read the article

  • iphone - MPMoviePlayerController currentPlaybackTime problem

    - by Mike
    I have a MPMoviePlayerController in my project. Some times, when I order the controller to go to a specific frame, for example [myMovie setCurrentPlaybackTime:16.32]; it goes not to this position, but to a point before the specified point. I think it goes to the nearest keyframe. How can I force the video to stop doing this and go to the precise location? Is there any hope of solving this? thanks for any help.

    Read the article

  • MPMoviePlayerController on large videos causes massive memory spike, and a level 1 memory warning

    - by Shizam
    When viewing images my application hums along nicely with low memory consumption, once I try to watch a video using MPMoviePlayerController memory usage spikes way up, dwarfing the previous memory graph and if I play the video it causes a 'memory warning. Level=1' message. The video files (mp4) aren't even that big, 40MB or so, and it doesn't matter if I play the file streamed from a URL or loaded from a local file, actually the memory spike is even worse if I try to stream it. Here is the code I use to create the player: if (_photo.videoPath != nil) { _movieViewController=[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:_photo.videoPath]]; } else { _movieViewController=[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:_photo.videoURL]]; } [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoMetaListener:) name:MPMovieDurationAvailableNotification object:_movieViewController.moviePlayer]; _movieViewController.moviePlayer.scalingMode=MPMovieScalingModeAspectFit; _movieViewController.moviePlayer.shouldAutoplay = YES; _movieViewController.moviePlayer.controlStyle = MPMovieControlStyleEmbedded; Anybody else running into issues playing video? Also I checked for leaks, there are none reported.

    Read the article

  • iphone - button outside MPMoviePlayerController window not responding

    - by Mike
    I have created a MPMoviePlayerController to play a movie. As the movie likes to play landscape in full screen, when the movie is about to play, I grab its window and resize it to be smaller. At the same time, I add a view to the movie's window and this view contains several buttons, that are supposed to be around the movie. As the movie's window is reduced in size, I have to scale the buttons' view up, so the buttons do not reduce in size. I ended with this What you can see here is this: four buttons (green rectangles), the reduced movie's window and the application's window, that now is visible because the movie's window was reduced. The problem is that the buttons just work if you click on their regions inside the movie's window (A). If you click them on the region outside (B) they don't work. WHen you click on B, TouchesMoved on the main view controller receives the touch and the button doesn't do its action. How can this be solved? thanks for any help

    Read the article

  • UIWebView/MPMoviePlayerController and the "Done" button

    - by David Sowsy
    I am using the UIWebView to load both streaming audio and video. I have properly set up the UIWebView delegate and I am receiving webViewDidStartLoading and webViewFinishedLoading events perfectly. The webview launches a full screen window (likely a MPMoviePlayerController) Apple's MoviePlayer example gets the array of Windows to determine which window the moviePlayerWindow is for adding custom drawing/getting at the GUI components. I believe this to be a bad practice/hack. My expectation is that I should be able to figure out when that button was clicked by either a delegate method or an NSNotification. It may also be the case that I have to poke around subviews or controllers with isKindOf calls, but I don't think those are correct approaches. Are my expectations incorrect, and if so, why? What is the correct way to bind an action to that "Done" button?

    Read the article

  • Taking video from video camera and displaying it with MPMoviePlayerController IPhone SDK

    - by Daniel
    Has anyone tried taking a video from the camera and then using the video player provided to play it? When you take the video in portrait mode, sometimes the movie will play (when the player puts it in landscape mode) and when it puts it in portrait mode you cannot view the movie all you hear is sound,sometimes in landscape mode is flickers and does not play right, has anyone encountered this and found a way to fix it? My code to play the video looks like this: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSURL *urls=[info objectForKey:@"UIImagePickerControllerMediaURL"] ; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[info urls]]; if (moviePlayer) { [moviePlayer play]; } } I checked settings on the docs nothing seems like it would fix this...Thanks

    Read the article

  • How do I make my NSNotification trigger a selector?

    - by marty
    Here's the code: - (void)viewDidLoad { [super viewDidLoad]; NSURL *musicURL = [NSURL URLWithString:@"http://live-three2.dmd2.ch/buureradio/buureradio.m3u"]; if([musicURL scheme]) { MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:musicURL]; if (mp) { // save the music player object self.musicPlayer = mp; [mp release]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popBack:) name:@"MPMoviePlayerDidExitFullscreenNotification" object:nil]; // Play the music! [self.musicPlayer play]; } } } -(void)popBack:(NSNotification *)note { [self.navigationController popToRootViewControllerAnimated:YES]; } The selector method never gets called. I just want to pop back to the root menu when the "Done" button is pressed on the movie player. I put an NSLog in the selector to check if it was even being called, nothing. The music plays fine. Any thoughts?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >