iphone - Playing Video on UIWebView getting Access Denied -
hello trying play video based on url getting through api getting error access denied.
the reason why playing video in uiwebview
because video not primary feature in application show tutorial user have not used mpmovieplayercontroller
if required can use.
but want know exact reason why such error occurs in uiwebview
.
any guide or appreciated.
thanks in advance.
add below method viewcontroller.m :
//this method should called when want add , load 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 line if arc implemented in project }
using interface builder-
- add
uiwebview
object interface. - set "hidden" property checked (in "attributes inspector" window in interface builder). should keep hidden until want display
webview
. add following code
viewcontroller.h
.@property (nonatomic, retain) iboutlet uiwebview *webview;
add following line below
@synthesize
inviewcontroller.m
@synthesize webview;
- add
[webview release];
in dealloc method. // no need of line if arc implemented in project } - go ib , click on file's owner, , connect webview outlet webview created.
- add following method.
//this method should called when want add , load webview
- (void)loaduiwebview { [self.webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:currenturl]]]; self.webview.hidden = no; }
i hope you.
Comments
Post a Comment