Skip to content

Commit

Permalink
Remove initialLoadingView when webView is error
Browse files Browse the repository at this point in the history
This will only be called when webview is completely failed to load iframe, which will be caused by no internet connection (or maybe when google is dead). Other errors will be handled by iframe API and in that case iframe is surely loaded and posts onReady: before onError: so no problem at all.
  • Loading branch information
Ono Masashi committed Dec 14, 2015
1 parent dd01965 commit fca6a54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Classes/YTPlayerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@ - (BOOL)webView:(UIWebView *)webView
return YES;
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
if (self.initialLoadingView) {
[self.initialLoadingView removeFromSuperview];
}
}

/**
* Convert a quality value from NSString to the typed enum value.
*
Expand Down

0 comments on commit fca6a54

Please sign in to comment.