play video in Webview on Floating window play only sound


I’m trying to implements a webview in a floating window like this library Standout ,everything work well but I get only 1 error is when i play a video in internet, it only play the sound , the screen is black. I have set

mWebView.setWebChromeClient(new WebChromeClient());
mWebView.setWebViewClient(new WebViewClient());
mWebView.getSettings().setDomStorageEnabled(true); < screenshot. it’s only plays sound without video. Thanks in Advance.


try add WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED flag when add WebView into WindowManager

Answered By – shaobin0604

Leave a Comment