I am developing an Android app similar to Yacine TV that streams video content using a WebView. However, on some devices running Android 12 and 13, the video player shows a black screen while the audio continues to play.
Here is a simplified version of my code:
WebView webView = findViewById(R.id.webView);webView.getSettings().setJavaScriptEnabled(true);webView.getSettings().setDomStorageEnabled(true);webView.loadUrl("https://example.com/stream-url");I have also tested using setMediaPlaybackRequiresUserGesture(false), but the issue persists.
Steps to reproduce:
Install APK (add link here if necessary for reproduction).
Open any live stream.
On certain devices, the video fails to render.
What could cause WebView to fail to render video on newer Android versions, and how can I fix it?
Things I have tried:
Enabling hardware acceleration
Testing different WebView versions
Using ExoPlayer instead of WebView
Any help would be appreciated.