4

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

It never occurred to me until now that maybe MPMoviePlayerController might not support higher than 480x320, but the docs do say that.

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

I know this most likely sounds like another @2x solution, but that does not seem to be working either.

Any suggestions for getting this High-res video playing for both screens? I can post code if needed.


For reference, here's 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"]]];
}
TahoeWolverine
  • 1,749
  • 2
  • 23
  • 31

1 Answers1

2

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

Moshe
  • 57,511
  • 78
  • 272
  • 425
  • Looking back at this question, I guess I didn't specify it very well. The issue I was seeing was that the high-res video was not playing, but I have come to accept that unless you have the retina display, high-res videos are not going to play. The fact that it played on the simulator is most likely a fluke just like many other things, where the computer supports playing it, so it does. I will use code checking of the sort if (scale == 2) videoFile = high-res else videoFile = low-res. – TahoeWolverine Nov 10 '10 at 20:41
  • There are upper limits on the hardware of older devices, each is slightly different. The results is simply that video does not play if it exceeds the limits. – MoDJ Jun 26 '13 at 17:42