Now that 4.0 is public, I can edit this question and ask it again. This code works in 3.2 and any prior versions, but in 4.0 I get an alertView saying "This movie could not be played".
ivar webView
//in viewDidLoad
self.webView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
webView.scalesPageToFit = YES;
webView.delegate = self;
// in tableView didSelectRowAtIndexPath
// url contains a video from web
NSURL *url = [NSURL URLWithString:@"http://www.somevalid.td/validmovie.mp4"];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
In the log it says "setting movie path (null)"
What I just did:
I know it's not a UIWebView, but it's the only way I got video working in OS 4.0..
Good luck though and I hope this was of any use.
Greetings,
Lewion
I just tested your code and it works fine on both simulator and on a development iPhone 3GS. Could it be something with the movie file itself (maybe too high resolution for iPhone?) or something with the server.
Try to download the NSURL to a file on your device, then use Organizer to copy it to your computer and in iTunes, copy it back and see if it plays. If not, you know that the problem lies with the movie file itself.