I need to play video in html5 video tag in Android webView.
I used android method
webView.loadUrl("javascript:" + url);
previously, but decided replace it with modern method
webView.evaluateJavascript(url, null);
And I faced on issue with evaluateJavascript() method:
"Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture."
But with loadUrl() this issue was not fired.
How to play video using evaluateJavascript() and html video tag?
JavascriptInterfaceallow to call Java methods from JS side. I need vice versa - call JS methods from Java side.