0

I'm working on an app based on WebView. The main goal is to watch YouTube videos. My issue is that I'm not able to see the videos on a fullscreen mode but I have to open the YouTube app... Can anyone help me please?

This is my code:

public class MainActivity extends Activity {

 private WebView mWebView; 

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);

 mWebView = (WebView) findViewById(R.id.activity_main_webview);

 WebSettings webSettings = mWebView.getSettings();
 webSettings.setJavaScriptEnabled(true);
 mWebView.loadUrl("http://www.example.com");

 }
}
  • Please have a look at [**this**](https://stackoverflow.com/questions/15768837/playing-html5-video-on-fullscreen-in-android-webview) –  Oct 20 '17 at 17:30
  • https://stackoverflow.com/questions/14763483/android-webview-with-an-embedded-youtube-video-full-screen-button-freezes-video – IntelliJ Amiya Oct 20 '17 at 17:32
  • I tried to implements but without results... – frenkowski Oct 21 '17 at 23:51

0 Answers0