How to configure compatibility with a network of video resources?

I have an application that loads while a 2 second movie is playing. Currently, the application is in the store and has all the retina display options for static content, except for this video. I have 960x640 mp4 h.264 encoded video for the retina display, and it works well both in the iPhone (yes, and in high resolution, and not in 480x320) and iPhone4 simulators. but it just doesn't play on my iPod Touch 3rd Gen with iOS4. I have not yet been able to check on the physical display of the retina.

It still has not occurred to me that MPMoviePlayerController may not support above 480x320, but the docs say so.

http://developer.apple.com/library/ios/#documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html

I know that this most likely sounds like another @ 2x solution, but that doesn't work either.

Any suggestions for getting this high definition video playable on both screens? If necessary, I can send the code.


For reference, here is the solution:

MPMoviePlayerController * movieController;

if ([[UIScreen mainScreen] scale] == 2.0) { movieController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:@"highRes" ofType:@"mp4"]]]; } else { movieController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"lowRes" ofType:@"m4v"]]]; } 
+4
source share
1 answer

I would suggest using code verification here to provide your media player with the correct video file.

+2
source

All Articles