没有控件可以播放视频吗?
我正计划为 iPhone 制作一款游戏,并且希望背景能够持续动画化。我想与其循环播放一系列图像,不如播放一段视频。我是否可以播放视频(没有弹出控件),并在其之上显示图形(实际游戏)?或者循环图像会更好吗?
(我认为SO是比游戏开发更好的地方来问这个问题)
I'm planning on making a game for the iPhone and want to have the background constantly animated. I figured rather than looping a series of images, I'd play a video. Is it possible for me to play a video (with no controls popping up), and have graphics overtop of it (the actual game)? Or would I just be better off with looping images?
(I figured SO would be a better place to ask this than Game Development)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 MPMoviePlayerController 并将控件样式设置为 none。
MPMoviePlayerController 控件样式 和 MPMoviePlayerController 控件样式列表
You can use MPMoviePlayerController and set the control style to none.
MPMoviePlayerController control style and MPMoviePlayerController control style list
是的,使用 AVFoundation,甚至是关闭控件属性的 MPMoviePlayerController。
您可以将任何您喜欢的内容叠加在视频上。 iOS4 中的性能比早期操作系统版本要好得多。
Yes, using AVFoundation, or even the MPMoviePlayerController with the controls property turned off.
You can have anything you like overlaying the video. The performance for that is much better in iOS4 than earlier OS versions.