My Android app has a WebView that includes video and audio. When the application runs on Android 2.3.x, video streams and sound are played.
I changed the application to work on HoneyComb (3.1) on the Samsung Tab 10.1 tablet, the video does not broadcast and the sound does not play. Video streams when the URL is entered in the Tab browser.
This is the java code:
mWebView.setWebChromeClient(new WebChromeClient()); mWebView.setWebViewClient(new WebViewClient()); mWebView.getSettings().setAllowFileAccess(true) mFileName = fileName_items[item_position]; mFullPath = "file:///android_asset/"+mFileName+".html"; mWebView.loadUrl(mFullPath);
In HTML, I tried both the embed tag and the video tag. The inserted tag does not show anything, while the video tag shows controls, and I can switch the play / pause, but the video is not displayed.
<video controls="controls" style="align:center;" height="300" width="300"> <source src="http://www.at.com/videos/an1.mp4" type="video/mp4"> </video> <embed type="video/mp4" src="http://www.at.com/videos/an1.mp4" width="340" height="140" />
source share