2010-09-23 109 views

回答

2
MPMoviePlayerController *mediaPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:str_url]]; 

mediaPlayer.scalingMode = MPMovieScalingModeAspectFill;        

[mediaPlayer play]; 
0

Store中的Apache服务器路径/var/www/html/audiofile.mp4

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: [NSURL URLWithString:@"http://IPaddress of server/audiofile.mp4"]]; 
[player play]; 

这样的视频文件只在Apache服务器的支持。否则,您应该使用http实时流媒体方法使用mediasegmenter。

相关问题