开发者

Multiple MPMoviePlayerControllers and UIScrollView

Im trying to display multiple MPMoviePlayerController views within a uiscrollview. My app displays a gallery style player for movies, the same as the Photos app. Having read the documentation I understand only one video can play at once, which is fine. Unfortunately, Im seeing that even the controls are not displayed - so I cant stop one movie and play another.开发者_StackOverflow社区 Has anyone found a way around this?

The documentation states 'Although you may create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time may play its movie.', so I believe it is possible.


I did something similar recently - my solution was to create an image view showing an image that acted as a placeholder for the movie. When the user tapped the image, I created a new movieplayer instance and replaced the image view with it. If the user tapped a different image view, then I would pause the currently playing movie, remove the player and create a new movie player in the section that was tapped.

I wasn't showing any controls before the movie played, and once the movie was stopped, the controls were removed from the interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜