• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

App Inventor How to play video fullscreen with landscape in Android WebView?

Person I have an application that I have a html5 player I have also a code that makes my webview accept that this html 5 enables the full screen player option. It even needs to be with screen rotation enabled to be able to see landscape but I want it to be landscape when I click the full screen option. How do I do it?

code down:
class Browser_home extends WebViewClient {

Browser_home() {
mInterstitialAd.show ();
}

@override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
mInterstitialAd.show ();
super.onPageStarted(view, url, favicon);

}

@override
public void onPageFinished(WebView view, String url) {
mInterstitialAd.show ();
setTitle(view.getTitle());
super.onPageFinished(view, url);



}
}





private class MyChrome extends WebChromeClient {

private View mCustomView;
private WebChromeClient.CustomViewCallback mCustomViewCallback;
protected FrameLayout mFullscreenContainer;
private int mOriginalOrientation;
private int mOriginalSystemUiVisibility;


MyChrome() {mInterstitialAd.show ();}

public Bitmap getDefaultVideoPoster()
{
if (mCustomView == null) {
mInterstitialAd.show ();
return null;

}
mInterstitialAd.show ();
return BitmapFactory.decodeResource(getApplicationContext().getResources(), 2130837573);
}

public void onHideCustomView()
{
mInterstitialAd.show ();
((FrameLayout)getWindow().getDecorView()).removeView(this.mCustomView);
this.mCustomView = null;
getWindow().getDecorView().setSystemUiVisibility(this.mOriginalSystemUiVisibility);
setRequestedOrientation(this.mOriginalOrientation);
this.mCustomViewCallback.onCustomViewHidden();
this.mCustomViewCallback = null;

}

public void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback paramCustomViewCallback)
{
if (this.mCustomView != null)
{
mInterstitialAd.show ();
onHideCustomView();

return;
}
mInterstitialAd.show ();
this.mCustomView = paramView;
this.mOriginalSystemUiVisibility = getWindow().getDecorView().getSystemUiVisibility();
this.mOriginalOrientation = getRequestedOrientation();
this.mCustomViewCallback = paramCustomViewCallback;
((FrameLayout)getWindow().getDecorView()).addView(this.mCustomView, new FrameLayout.LayoutParams(-1, -1));
getWindow().getDecorView().setSystemUiVisibility(3846);

}

}
 
Back
Top Bottom