Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

WebView: Navigated Event doesn't fire with Youtube

$
0
0

I simply want to build a web browser with Xamarin Forms that reflects the URL in the browser bar. As a reference is Chrome on an Android phone, which does that just beautifully.
Here my problem: My code works fine with most websites. But seems to have a problem with Youtube. With a youtube site it doesn't reflect the video link in the browser bar. I can click what I want in the web view, the Navigated Event doesn't get fired anymore. Any suggestions? Any workarounds?

Here my code:
XAML:



C# code:
public WebBrowserPage ()
{
InitializeComponent ();
simpleBrowser.Source = urlEntry.Text;
}

    async void OnNavigated(object sender, WebNavigationEventArgs e)
    {
        Debug.WriteLine("URL received after navigated: {0}", e.Url);
        urlEntry.Text = e.Url;
    }

    async void OnNavigationBarChanged(object sender, EventArgs e)
    {
        simpleBrowser.Source = urlEntry.Text;
    }

Any help would be appreciated.
Thanks,
Roger


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>