如何使视频资源视网膜显示符合要求? [英] How do I make video resources retina display compliant?

查看:70
本文介绍了如何使视频资源视网膜显示符合要求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在2秒电影播放时加载。目前,该应用程序已在商店外,除了此视频外,所有静态内容视网膜显示都符合要求。我有一个用于视网膜显示器的960x640 mp4 h.264编码视频,它适用于iPhone(是的,高分辨率,而不是480x320)和iPhone4模拟器。但它似乎没有在运行iOS4的iPod Touch第三代上播放。我还没有能够在物理视网膜显示器上进行测试。

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.

直到现在我才发现可能MPMoviePlayerController可能不支持高于480x320,但文档请说。

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

我知道这很可能听起来像另一个@ 2x解决方案,但这似乎也不起作用。

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

任何有关获得此优惠的建议res视频播放两个屏幕?如果需要,我可以发布代码。

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;

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"]]];
}


推荐答案

我建议使用代码检查这里为您的媒体播放器提供正确的视频文件。

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

这篇关于如何使视频资源视网膜显示符合要求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆