iPhone视频控制和双视频播放
我需要一种在我的应用程序中控制视频非全屏的方法。我已经尝试过 MPMoviePlayerController 和使用 UIWebViews 的解决方案。
我找到了一种使用 MPMoviePlayerController 的解决方案,可以防止视频全屏显示(通过抓取关键窗口并在 UIWindow 对象上设置转换)。但是,MPMoviePlayerController 似乎没有提供暂停和恢复播放的方法。如果我使用 stop 方法,视频将隐藏(如 api 中指定)。另外,我需要能够在播放期间设置播放位置(手动搜索等)。我在应用程序商店中看到过这样做的应用程序,但我不确定它们是否是在 Apple 禁止私有方法调用之前部署的。
有人有与此相关的任何提示或技巧吗? (请记住,我的应用程序需要被应用程序商店接受)
由于许可限制,我对 FFMpeg 解决方案不感兴趣。
我还想同时播放两个视频,并希望得到一些关于此的提示(但是,我认为目前不可能,因为 MPMoviePlayerController 一次只会播放一个视频)。
I need a way of controlling video non-fullscreen in my application. I've played around with both MPMoviePlayerController and a solution using UIWebViews.
I have found one solution using MPMoviePlayerController where I can prevent the video from going full screen (by grabbing the key window and set a transform on the UIWindow object). However, the MPMoviePlayerController doesn't seem to provide a method for pausing and resuming the playback. If I use the stop method, the video will hide (as specified in the api). Also, I need to be able to set the playback position during playback (manual seeking etc). I have seen apps that does this in the app store, but I'm not sure if they were deployed before Apple banned private method calls.
Does anyone have any tips or tricks related to this? (keep in mind that my app need to be accepted for the app store)
I'm not interested in FFMpeg solutions, due to licensing restrictions.
I'd also like to have playback of two videos at the same time, and would like some tips on this as well (however, I consider it not possible at the moment as MPMoviePlayerController will only play one video at the time).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 iOS 3.2 及更高版本中,您可以创建内联视频播放器。只需将 MPMoviePlayerController 的 view 属性作为子视图添加到内容视图中,设置框架和 URL 源(本地/远程)即可。您有一个非全屏视频播放器。查看 MPMoviePlayerController 的文档以了解更多详细信息。 (http://developer.apple.com /iphone/library/documentation/mediaplayer/reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html)
In iOS 3.2 and greater you can create in-line video players. Just add the MPMoviePlayerController's view property as a subview to your content view, set the frame and the URL source (local/remote) and voila. You have a non-fullscreen video player. Check out the documentation for MPMoviePlayerController for more details. (http://developer.apple.com/iphone/library/documentation/mediaplayer/reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html)