I hava a WebView with embedded YouTube video. The video plays perfectly, and everything about it works, except when you click "Watch on Youtube".
I want the “Watch on YouTube” button to open the YouTube video in the default browser, but it currently does nothing.
I have a WebPolicyDelegate installed on a WebView , but not one of them:
- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener`
neither
- (void)webView:(WebView *)webView decidePolicyForNewWindowAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request newFrameName:(NSString *)frameName decisionListener:(id<WebPolicyDecisionListener>)listener
Called when the "Watch on YouTube" button is clicked.
How can I detect that the Watch on YouTube button is clicked so that I can open it in my default browser?
source share