In my application I need to load a web page. this page includes a video player. this is my code:
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://astroapps.static.appxtream.com/resepi_video.php?mediaId=209375&height=400&width=240");
Also I have activated hardware acceleration in manifest file.
<activity android:name = ".WebVideoPlayer" android:hardwareAccelerated="true"/>
When I launch application, screen shows a background while it doesn’t play when i click it. When I copy/paste above link in browser of computer it displays the video. What is my mistake?
Any suggestion would be appreciated. Thanks
I am confused. Hans and Rocel point out, the video seems to require the Flash player (at least in the browser). But the movie player source says to use HTML5 when on Android. So which is it? Can you get just the video itself, without all the wrapper layers?
More:
Is this a bug in the Movideo player? It says it prefers Flash to Android (in which case the above contributors’ advice to install Flash would be right on the money), but the array appears to be backward.
More:
Okay, I know this much: When viewed in the browser, there is a
<div>that holds data about the video player. This then gets instantiated and played in the following<script>.In the (PC/Mac) web browser, this
<div>contains the information necessary to specify a Flash video player.On the Android device, this
<div>is simply empty. The code in the video player that is supposed to insert the<div>body into the DOM if the enclosing web page doesn’t work.That, in short, is why your video doesn’t play.
How did I learn all this?
I opened the URL you provided in the Chrome web browser on Android.
Then I followed the instructions to turn on remote debugging and inspected the HTML of the Android version, and compared it to the desktop version.