如何在MPMoviePlayerController上播放https:// url视频

时间:2014-08-26 08:27:37

标签: ios objective-c iphone ipad

    I have a https:// base video url, Please let me know how to play video through MPMoviePlayerController.
I use following code:



MPMoviePlayerViewController * moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieUrl];
    [target presentMoviePlayerViewControllerAnimated:moviePlayer];

但它不起作用。并发送ssl错误。

1 个答案:

答案 0 :(得分:0)

我认为 movieUrl of the MPmovieplayer 是“字符串

NSURL *url = [NSURL URLWithString:movieurl];

MPMoviePlayerViewController *moviePlayer = 
[[MPMoviePlayerViewController alloc] initWithContentURL:url];