lundi 29 septembre 2014

WebView embedded video playback options disappeared in iOS 8.0


Vote count:

0




I had embedded video in webview which is loaded from app bundle but now i am having one issue in iOS 8.0.


I am not able to see video playback and zoom option panel when i tap on it. I can make it fullscreen by pinch gesture and able to see option panel in full screen but not able to see it while playing normally.


It seems that uiwebview content is not in center or may be its content size is increased. I tried to found its solution online but couldn't found any solution for that. I tried everything which i found about embedding video in uiwebview but the issues is not resolved yet.


Code which i have done to integrate it:



webviewFrame = CGRectMake(335, 67, 675, 670);
webview = [[UIWebView alloc] initWithFrame:webviewFrame];
[webview setBackgroundColor:[UIColor clearColor]];
[webview setOpaque:NO];
webview.delegate=self;
webview.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
[webview setScalesPageToFit:YES];
[webview.layer setMasksToBounds:YES];
[webview.layer setCornerRadius:15.0f];
[webview.layer setBorderColor:[UIColor grayColor].CGColor];
[webview.layer setBorderWidth:2.0];

[self.view addSubview:webview];
webview.hidden=NO;
webview.delegate=self;
btn_Zoom.hidden=YES;
btnMail.hidden=YES;

UIScrollView* sv = (UIScrollView*)[webview.subviews objectAtIndex:0];
sv.scrollEnabled=NO;
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:strPath isDirectory:YES]]];


- (void)webViewDidFinishLoad:(UIWebView *)webView{
NSLog(@"finish loading");
[appDelegate hideIndicator];
self.view.userInteractionEnabled=YES;

CGSize contentSize = CGSizeMake(webView.frame.size.width,
webView.frame.size.height);
webview.scrollView.contentSize = contentSize;
[webview setScalesPageToFit:YES];
self.automaticallyAdjustsScrollViewInsets = YES;
self.edgesForExtendedLayout = YES;

}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
NSLog(@"error=%@",error);
[appDelegate hideIndicator];
self.view.userInteractionEnabled=YES;

CGSize contentSize = CGSizeMake(webView.frame.size.width,
webView.frame.size.height);
webview.scrollView.contentSize = contentSize;
[webview setScalesPageToFit:YES];
self.automaticallyAdjustsScrollViewInsets = YES;
self.edgesForExtendedLayout = YES;
}


asked 21 secs ago







WebView embedded video playback options disappeared in iOS 8.0

Aucun commentaire:

Enregistrer un commentaire