Customizable non-full screen video player in iPhone

[亡魂溺海] 提交于 2019-12-11 12:38:29

问题


I know that there is an MPMoviePlayerController present in iPhone to play movies from. But it isn't customizable in the real sense. Also, if I wanted to play movies is a non-full screen mode, it isn't possible today.

  1. I wanted to inquire if anyone knows about the future roadmap of iPhone SDK, is there going to be any such customizable video player upcoming?

  2. Also, is it possible to write a new video player from scratch (maybe including the codecs), then in that case which part of the SDK should be referred to and how?

Some help in this area will be really appreciated.

Thanks,

Saurabh


回答1:


I don't know of anything in the future about a customizable video player. However, if there are just a few videos you want to play in non-fullscreen mode, there is an option. UIImageView supports animation. So, if you can export your videos as images, you can have them display in an UIImageView.

For example,

//load your images here
youImageView.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"1.png"],
                                     [UIImage imageNamed:@"2.png"],
                                     [UIImage imageNamed:@"3.png"],
                                     [UIImage imageNamed:@"4.png"],
                                     [UIImage imageNamed:@"5.png"],
youImageView.animationDuration = 1; //this is the duration of the animation and can be any value
[youImageView startAnimating];



回答2:


This blog post http://www.nightirion.com/2010/01/scaling-a-movie-on-the-iphone/ mentions a method that will allow you to play non-fullscreen video. However, I'm not sure if this method will be approved by the app store verification process.



来源:https://stackoverflow.com/questions/2048074/customizable-non-full-screen-video-player-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!