【发布时间】:2010-10-04 11:23:01
【问题描述】:
我正在使用以下代码从 url 播放视频,但是当视频加载时仅播放音频并且模拟器上没有显示视频..现在我无法在 iphone 4.0 上测试它设备...模拟器有问题还是 MPMoviePlayerViewController 方法不对??
NSString *videoFilepath = @"http://www.migital.com/Hemant/1.3gp";
NSURL *videoURL = [NSURL URLWithString:videoFilepath ];
MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playbackFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:movie];
[self presentMoviePlayerViewControllerAnimated:movie];
【问题讨论】:
标签: ios4 mpmovieplayercontroller