views:

407

answers:

1

I want to play downloaded video using UIWebview. I get webkiterrordomain code=204 error. but if i play video from resources folder it run perfect.

//from resources folder run perfect

NSString *tempurl = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"video.mp4"];

//from downloaded file

 NSString *tempurl = downloaded path;



NSURL* urlLocation = [NSURL fileURLWithPath:tempurl];


[webView loadRequest:[NSURLRequest requestWithURL:urlLocation]];

Thank you.

A: 

Generate an html. Embed your video in it. Include both the html and the video file in the project resources. Then load html from webview.

ahmet emrah