I have a webpage which has a html5 video and css3 animations. The web page plays perfectly in the browser in the android device.
The issue is, the animations are really laggy and glitchy and jumpy when using hardwareAccelerated, but the video plays fine. When I use the software layerType the animations play perfectly but the video doesn't play(the audio does however) as its not supported.
I've tried :
hardwareAccelerated in manifest
web_view.setLayerType(View.LAYER_TYPE_HARDWARE, null)
web_view.setLayerType(View.LAYER_TYPE_SOFTWARE, null)
CrossWalk XWalkView
I've tried these solutions too Android webview slow performance, Android webview slow , Android webview loading data performance very slow and more
I looked at the cordova webView code and tried this
webView.setInitialScale(0)
webView.isVerticalScrollBarEnabled = false
// Enable Javascript
val settings = webView.settings
settings.javaScriptEnabled = true
settings.javaScriptCanOpenWindowsAutomatically = true
settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.NORMAL
this line
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null)
fixes the animations perfectly but from the comments in Android webview slow it says html5 video is not supported.
Any suggestions on how to get the WebView to perform better? I know the url works as it is perfect in the browser