Hello Everyone i am trying to play video based on URL that i am getting through API but i am getting Error like Access Denied.
The reason why i am playing video in UIWebView
is because Video is not the Primary feature in my Application its just for Show Tutorial to the User so i have not used MPMoviePlayerController
but if required than i can use.
But i want know the exact reason why such Error occurs in UIWebView
.
Any guide or help will be appreciated.
Thanks in Advance.
Add below method to your ViewController.m :
//This method should get called when you want to add and load the webview
- (void)loadUIWebView
{
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:currentURL]]];
[self.view addSubview:webView];
[webView release]; // No need of this line if ARC is implemented in your project
}
Using Interface Builder-
UIWebView
object to your interface.WebView
.Add the following code to your ViewController.h
.
@property (nonatomic, retain) IBOutlet UIWebView *webView;
Add the following line below the @synthesize
in your ViewController.m
@synthesize webView;
[webView release];
in the dealloc method. // No need of this line if ARC is implemented in your project
}//This method should get called when you want to add and load the webview
- (void)loadUIWebView
{
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:currentURL]]];
self.webView.hidden = NO;
}
I hope it will help you.