0

I am having Webview in android & currently playing youtube video from the Url. top of the webview, there is an actionbar. I want actionbar to be hidden when video is playing & actionbar to show when video is onPause. is there any way to get the current state of video playing inside the webview. or I can call mediaControls class in webview. Here is my code for webview:

        mVideoView.getSettings().setJavaScriptEnabled(true);
        mVideoView.getSettings().setPluginsEnabled(true);
        mVideoView.getSettings().setAllowFileAccess(true);
        mVideoView.setWebChromeClient(new ChromeClient());
        mVideoView.setWebViewClient(webViewClient);
        mVideoView.loadUrl("http://www.youtube.com/embed/" + video_id);
Sahil Mahajan Mj
  • 11,033
  • 8
  • 53
  • 100
Jags
  • 143
  • 1
  • 10

1 Answers1

0

try

mVideoView.getSettings().setPluginState(PluginState.ON_DEMAND);

Manish Lomte
  • 329
  • 4
  • 17