MPMoviePlayerController breaks/stops after going to fullscreen in iOS6

后端 未结 11 1079
南方客
南方客 2020-12-24 07:10

I have a MPMoviewPlayerViewController embedded into an UIView object. When I start the player in the embedded mode everything works fine and as exp

11条回答
  •  被撕碎了的回忆
    2020-12-24 07:42

    Another way of dealing with this is to use the full screen notification callback:

    1) Add a notification for the movie player MPMoviePlayerDidEnterFullscreenNotification. 2) Before you play the movie, set a boolean indicating that the movie is entering fullscreen. 3) Clear the boolean to NO in your full screen callback as well as your movie finished call back. 4) In your viewWillDisappear, check if your boolean to see if your movie is entering full screen, and handle as needed.

    Also when presenting an MPMoviePlayerViewController, using the setFullScreen function after presenting can cause the movie to stop on iOS6.

提交回复
热议问题