Code example for WebChromeClient

Methods: onHideCustomView

0
            if(mCustomVideoView != null){
                mCustomVideoView.stopPlayback();
            } 
            mRootLayout.removeView(mVideoLayout);
            mViewCallback.onCustomViewHidden();
            mChromeClient.onHideCustomView();
            ((Activity) getContext()).setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE);
            mIsFullscreen = false;
        } 
 
 
    } 
 
    private void setupVideoLayout(View video){
 
        /** 
         * As we don't want the touch events to be processed by the underlying WebView, we do not set the WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE flag 
         * But then we have to handle directly back press in our View to exit fullscreen. 
         * Otherwise the back button will be handled by the topmost Window, id-est the player controller 
         */ 
        mVideoLayout = new FrameLayout(getContext()){