【发布时间】:2012-07-16 06:46:07
【问题描述】:
我正在开发我的应用程序。它需要通过服务器在 iPhone 上播放视频。我有一个视频链接http://www.cwtmedia.se/cwtvideo.mp4。任何人都可以建议我如何在 MPMoviePlayerController 上执行此操作。我正在使用此代码,但它不起作用。
enter code here
NSURL *url = [NSURL fileURLWithPath:@"http://www.cwtmedia.se/cwtvideo.mp4"];
moviePlayer1 = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:moviePlayer1.view];
moviePlayer1.view.frame = CGRectMake(0, 0, 320, 416);
moviePlayer1.fullscreen=YES;
[moviePlayer1 setFullscreen:NO animated:YES];
moviePlayer1.controlStyle = MPMovieControlStyleFullscreen;
[moviePlayer1 play];
【问题讨论】:
-
你有没有在stackoverflow上搜索过这个问题?检查:stackoverflow.com/questions/8864405/… 和 stackoverflow.com/questions/4302383/… plz..