cprcrack / VideoEnabledWebView

Android's WebView and WebChromeClient class extensions that enable fully working HTML5 video support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fullscreen landscape video does not fill screen

mtl3jx opened this issue · comments

I have found this code extremely helpful, I was just wondering if you might know why I'm having this issue.

The activity my video enabled WebView is housed in is required to be in portrait mode. I want the full screen video layout to be in landscape. I tried "faking" this by rotating the container for the full screen video layout, however this gives me two issues.

  1. Rotated video does not fill the entire screen.
  2. The YouTube video player controls disappear.

Any ideas why this is happening / how to fix? Thanks!

<RelativeLayout
   android:id="@+id/videoLayout"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:rotation="90" />

31781924_10155676575017075_9085845766697648128_n

activityVideoView.addView(videoViewContainer, new ViewGroup.LayoutParams(100, 100);

You will find this in the VideoEnabledWebChromeClient.java.