views:

33

answers:

1

I using the following basic commands to view a movie stored on a server in the movie player:

MPMoviePlayerViewController *mMoviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:getMovieURLRequest.URL];
[self presentModalViewController:mMoviePlayer animated:YES];

The problem is, I am getting a 401 authentication error when I try to access the file. I have used NSURLRequest in the past where I can insert HTTP Headers for Basic Authentication, but I don't see how I can do that here with the MPMoviePlayerViewController since it only accepts the NSURL parameter in the init?

Any ideas or help is much appreciated.

Rob

A: 

You can probably pre-populate the authentication info in the shared NSURLCredentialStorage object so it's already there when the MPMoviePlayerViewController issues its own request via the URL loading system.

millenomi