Done button event MPMoviePlayerController

前端 未结 7 775
闹比i
闹比i 2020-12-06 09:20

On my iPhone i\'m playing video/audio files in fullscreen mode. When the video/audio file reached its end then the following method is triggered:

- (void) mo         


        
7条回答
  •  醉话见心
    2020-12-06 09:56

    Wow, so many wrong approaches. The answer is this simple:

        moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:filePath]];
    
        [self.navigationController presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
    

    Check this link if you have a minute: https://developer.apple.com/library/prerelease/ios/documentation/MediaPlayer/Reference/UIViewController_MediaPlayer_Additions/index.html

    Happy coding! Z.

提交回复
热议问题