WebView in Android Studio that works just like in the browser

1

I have a WebView in a project in Android Studio , this WebView contains or loads an online radio page ( streaming ) made in listen2myradio ... The WebView loads correctly I can listen to the broadcast and all right. The problem is that when I run the page from a computer the music starts playing automatically. On the other hand, from the WebView I have to press the play button to start playing ... Is there a way for the music to play automatically when loading the > WebView as in the browser?

Code that has the WebView :

webView.setInitialScale(1);
webView.setWebChromeClient(new WebChromeClient());
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setPluginState(WebSettings.PluginState.ON);

webView.setWebViewClient(new WebViewClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);

DisplayMetrics displaymetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);

webView.loadUrl(URL);
    
asked by Matias Vidal 04.06.2017 в 03:18
source

0 answers