I am developing an iOS application with the function stream video from server. I think the problem come from my video url It cannot load video to simulator or iOS device, but the url working fine when I access on browser PC. Could anyone help me on this issue? Here is my code:
NSURL *videoURL = [NSURL URLWithString:@"http://192.168.1.210:12345/WallPost/Download?filename=TheEmpressOfChinaOriginalSoundtrack1422348924923.mp4"];
_moviePlayer = [[MPMoviePlayerViewController alloc] init];
_moviePlayer.moviePlayer.contentURL = videoURL;
_moviePlayer.view.frame = CGRectMake(10.0, 10.0, 300.0, 200.0);
_moviePlayer.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
[_moviePlayer.moviePlayer setControlStyle:MPMovieControlStyleDefault];
[self.view addSubview:_moviePlayer.view];
[_moviePlayer.moviePlayer setAllowsAirPlay:YES];
_moviePlayer.view.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
[_moviePlayer.moviePlayer prepareToPlay];