Bordertown Labs Blog

Notes from Bordertown Labs with posts regarding software development for the iPhone, Ruby on Rails, tips and code.

» Contact with inquiries.


Visualize your geodata in augmented reality with 3DAR by Spot Metrix.


Jul 2nd, 2010 @ 2:51 pm

Developer Forums: MPMoviePlayer seems to play the audio but no video.

The MPMoviePlayerController was changed (since OS 3.2). It now contains a ‘view’ property that you must add to your view hierarchy, don’t forget to set the frame size as well. EDIT: Sorry, that was a bit premature. Here’s how I play movies on the iPhone now.

if ([UIViewController instancesRespondToSelector:@selector(presentMoviePlayerViewControllerAnimated:)]) 
{
    // >= SDK 3.2
    MPMoviePlayerViewController *movieVC = // init
    ...
    [someController presentMoviePlayerViewControllerAnimated:movieVC];
}
else
{
    // pre SDK 3.2
    MPMoviePlayerController *moviePlayer = // init
    ...
    [moviePlayer play];
}




Comments (View)

 


 
blog comments powered by Disqus

Archive · RSS · Theme by Autumn