how to play live streaming video using mpmovieplayer in iphone sdk?
how to play live streaming video using mpmovieplayer in iphone sd开发者_如何转开发k ?
MPMoviePlayerController *mediaPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:str_url]];
mediaPlayer.scalingMode = MPMovieScalingModeAspectFill;
[mediaPlayer play];
Store your video file in the apache server path /var/www/html/audiofile.mp4
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: [NSURL URLWithString:@"http://IPaddress of server/audiofile.mp4"]];
[player play];
This way is supported only in apache server. Otherwise you should use mediasegmenter with the http live streaming method.
精彩评论