使用 MPMoviePlayerController 在屏幕上显示多个视频
我想要在这里实现的是一个屏幕同时显示 2 个或更多不同的视频。我知道在苹果文档中它说你不能同时播放多个视频,那很好,我不想这样做。
我想要的只是在屏幕上显示 2 个视频,当您按下它时,它就会开始播放,如果您愿意,您可以全屏显示,但一旦您按下另一个视频,旧视频就会停止,新视频就会开始。
我已经设置了三个 MPMoviePlayerController 并设置了正确的位置、大小和视频,并且 3 个框都绘制到了屏幕上,但目前,实际上只能观看最后一个绘制到屏幕上的框。
有谁知道是否有任何方法可以实现这一目标,如果是的话,我将如何去做?
谢谢,
马特
What I want to achieve here is a screen with 2 or more different videos on at a time. I know in the apple documentation it says you can't have more than one video playing at a time and thats fine, I don't want to do this.
All I want is to have the 2 videos on screen and when you press on it, it starts to play, you can go fullscreen if you want but as soon as you press on a different video, the old video stops and the new one starts.
I already have three MPMoviePlayerController set up with the correct position, size and video and the 3 boxes are all drawn to the screen but at the moment, only the last one to be drawn to screen can actually be watched.
Does anybody know if there is any way to achieve this or not and if so, how would I go about it?
Thanks,
Matt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,您同时只能拥有一名活跃的电影播放器。这是 MPMoviePlayerController 的限制。 Apple 文档中的消息:
来源:http://developer.apple。 com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html
As for as I know, you can only have one active movie player at the same time. It's a limitation from MPMoviePlayerController. Message in Apple documentation :
Source : http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html