Hi everyone,
1. I am using CustonRenderer to display YouTube videos using WKWebview, and i am also using NavigationDelegate functions like "DidStartProvisionalNavigation", "DidFinishNavigation", "DidFailNavigation", "DidFailProvisionalNavigation" and "DecidePolicy"
An ActivityIndicator is used to check if video is loaded.
ActivityIndicator is enabled in "DidStartProvisionalNavigation" and disabled in "DidFinishNavigation"
In "OnElementPropertyChanged" method i called LoadRequest as follows
NSUrl url1 = new NSUrl(url); NSUrlRequest request = new NSUrlRequest(url1, NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData, 30); Control.LoadRequest(request);
Problem::::::::::::::::::::::::::::::
- When "Control.LoadRequest(request);" is called then "DidStartProvisionalNavigation" is executed (which starts the ActivityIndicator) followed by "DecidePolicy"
Here if a disconnect the internet at this point then "ActivityIndicator" keeps on running (indefinitely) and even if on reconnect to internet nothing happens.
Some suggest to use "webview.isloading" in "DidFinishNavigation", but it is not called till video is not completely loaded.
Requirement::::::::::::::::::::::
It should display some message after a fixed time.
Where to check if wkwebview is not loading the contents.
How to set the time out. (Although i have done in the code shown above)
Is there some method that should be called.
Kindly suggest the solution.