简体   繁体   中英

Stream and download large videos on iOS devices over http

Is it possible to access large video files (up to 300 MB) that are stored on a http server? The user should be able either to download the video file (mp4) on the device (iPhone and iPad) and access it anytime he wants or to simply stream the video without saving any data on the device.

What is a good way to manage these issues? Are there any any good tutorials on that?

Thanks in advance, Bautzi

NSString *urlStr = [NSURL URLWithString:@"http://www.linktoyourmovie.mp4"];
NSURL *url = [NSURL URLWithString:urlStr];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
moviePlayer.view.frame = CGRectMake(0, 0, 300, 400);  
[self.view addSubview:moviePlayer.view];
[moviePlayer play];
[moviePlayer release];

That's how to stream the video without saving it on the device. Hopefully someone else can help with that issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM