开发者

how to play live streaming video using mpmovieplayer in iphone sdk?

开发者 https://www.devze.com 2023-01-17 02:43 出处:网络
how to play live streaming video using mpmovieplayer in iphone sd开发者_如何转开发k ? MPMoviePlayerController *mediaPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:st

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消