Videos stretched on Transformer Prime tablet when launched from webview
<p>I have a small app that launches a webview control and hence a website.  I have videos on the site and they work fine on Android phones, iPad and iPhone.</p>

<p>The problem is when I click on a link that launches an mp4 file.  The video player loads the mp4 file but the video is stretched across the whole screen.  It's completely unusable.</p>

<p>Like I said, it works fine on my Android phone (Galaxy Nexus), but not on my Transformer Prime tablet.</p>

<p>Here is the code:</p>

<pre><code>public class MiracleMoleculeActivity extends Activity {
WebView webview;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    webview = (WebView) findViewById(R.id.webview);
    webview.setWebChromeClient(new WebChromeClient());
    webview.setWebViewClient(new MyWebViewClient());
    //webview.clearCache(true);
    //webview.clearHistory();
    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setPluginsEnabled(true);
    webview.getSettings().setBuiltInZoomControls(false); 
    webview.getSettings().setSupportZoom(false);
    webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);   
    webview.getSettings().setAllowFileAccess(true);
    webview.getSettings().setDomStorageEnabled(true);
    webview.loadUrl("http://mobilityinitiative-test.com/");


}

public class MyWebViewClient extends WebViewClient {        
    /* (non-Javadoc)
     * @see android.webkit.WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String)
     */
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if (url.endsWith(".mp4")) 
        {
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setDataAndType(Uri.parse(url), "video/*");

            view.getContext().startActivity(intent);
            return true;
        } 
        else {
            return super.shouldOverrideUrlLoading(view, url);
        }
    }

}
</code></pre>

<p>}</p>
