How to stop MPMoviePlayerViewController's automatic dismiss on moviePlaybackDidFinish?

后端 未结 4 2007
渐次进展
渐次进展 2020-12-17 00:45

An MPMoviePlayerViewController which is presented modally through presentMoviePlayerViewControllerAnimated: automatically dismisses itself when it\'s content fi

4条回答
  •  太阳男子
    2020-12-17 01:04

    Since "Done" button is not working anymore if I remove MPMoviePlayerPlaybackDidFinishNotification from NSNotificationCenter, I change repeat mode to MPMovieRepeatModeOne. Then, everything's working fine except the video is repeated.

    MPMoviePlayerViewController *playerVC = [[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:aVideoUrl]] autorelease];
    [playerVC.moviePlayer setRepeatMode:MPMovieRepeatModeOne];
    

提交回复
热议问题