I'm designing an application for tablets that utilizes a WebView in a 
fragment on half of the screen, but I am having issues with the WebView 
when videos attempt to play.  Let me first state that the WebView is 
capable of displaying videos, hardware acceleration is on and the WebView 
has the correct settings to play videos.  The issue is that because the 
size of the WebView is reduced, videos do not play.  It appears that the 
canvas of the video is as if the video was playing from the top left corner 
as opposed to it's location in the WebView.

I have tried to set the size of the WebView statically, I have tried to 
override onMeasure, I tried to tell the canvas where to draw, I have tried 
to set setLoadWithOverviewMode and setUseWideViewPort to true, I have tried 
using different layouts, I have tried not using fragments, I have tried to 
simplify my issue every way possible with no luck. It does not appear that 
I have control over the videos canvas.  Is the Android WebView telling the 
page incorrect size and location information?

An example of my source code can be found on StackOverflow here: 
http://stackoverflow.com/​questions/9659677/reduced-​size-webview-not-showing-​videos-correctly-in-android<http://stackoverflow.com/questions/9659677/reduced-size-webview-not-showing-videos-correctly-in-android>
 

A screenshot of my issue can be seen here (Notice the apparent canvas of 
the video relative to the screen):
http://imageshack.us/photo/my-images/515/device20120323001322.png/

Can anyone help me with this issue so my WebView can display videos 
correctly?  I'm not opposed to setting static sizes and locations if 
dynamic sizing is not possible, although I would love to be able to use the 
standard Android sizing standards, I just want the videos to play in their 
correct locations.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to