title: React Native Android WebView video fullscreen (with rotation)
body: <p>I've currently implemented a native module for RN in order to be able to play html video inside a webview in fullscreen.</p>
  
  <p>To do that, I simply extend ReactWebViewManager to set a custom setWebChromeClient to the React Native Webview. </p>
  
  <pre><code>public class InTeachWebviewModule extends ReactWebViewManager {
      @Override
      public String getName() {
          return "RCTInTeachWebview";
      }
  
      @Override
      protected WebView createViewInstance(ThemedReactContext reactContext) {
          WebView root = super.createViewInstance(reactContext);
          root.setWebChromeClient(new VideoWebChromeClient(reactContext.getCurrentActivity(), root));
          return root;
      }
  }
  </code></pre>
  
  <p>And I've a simple CustomChromeClient: </p>
  
  <pre><code>public VideoWebChromeClient(Activity activity, WebView webView) {
      mWebView = webView;
      mActivity = activity;
  }
  
  @Override
  public void onShowCustomView(View view, CustomViewCallback callback) {
      if (mVideoView != null) {
          callback.onCustomViewHidden();
          return;
      }
  
      mVideoView = view;
      mCustomViewCallback = callback;
  
      view.setBackgroundColor(Color.BLACK);
  
      getRootView().addView(view, FULLSCREEN_LAYOUT_PARAMS);
  
      ((View)mWebView.getRootView()).setVisibility(View.GONE);
  }
  @Override
  public void onHideCustomView() {
      if (mVideoView == null) {
          return;
      }
      ((View)mWebView.getRootView()).setVisibility(View.VISIBLE);
      mVideoView.setVisibility(View.GONE);
  
      getRootView().removeView(mVideoView);
      mVideoView = null;
      mCustomViewCallback.onCustomViewHidden();
  }
  </code></pre>
  
  <p>It works great if there is no screen rotation, but as soon as I call <code>mActivity.setRequestedOrientation()</code> the <code>onHideCustomView</code> is called... It seems that calling <code>setRequestedOrientation()</code> refresh the all webview even if in my AndroidManifest I've </p>
  
  <pre><code>&lt;activity
      android:name=".MainActivity"
      android:label="@string/app_name"
      android:theme="@style/SplashTheme"
      android:configChanges="orientation|screenSize"&gt;
  </code></pre>
  
  <p>Is there a way to avoid the refresh? Or an other way to rotate the screen? Notice that my app is portrait only except that case. </p>