Error Playing video from server with MPMoviePlayerController
- by skiria
I try to play a video on the server with this code. I have a error.
//Play the video from server
- (IBAction)playVideo:(id)sender;
{
NSLog(@"URLVIDEO %@", aVideo.urlVideo);
MPMoviePlayerController *VideoPlayer = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL URLWithString:aVideo.urlVideo]];
[VideoPlayer play];
}
//Error on con console
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Content URL must not be nil.'
aVideo.urlVideo is a NSString and it's correct when I copy the result on the NSLog on the browser.