i am trying to load a webpage on a web view where the page has a video in it. i am able to load the web page on the web view but the video is not playing and the audio is he
I was converting my mobile website with youtube embeds into android app....this project helped me get rid of getting the video to fullscreen in webview. All my problems were solved. You can get something from here. https://code.google.com/p/html5webview/
As @Mikko says, this is a tricky area.
One thing to check is that you have hardware acceleration enabled. I encounter the exact same symptoms the OP describes when leaving it turned off.
You can enable it at the application or at the activity level:
<application
android:icon="@drawable/icon_72"
android:logo="@drawable/icon_menu_72"
android:label="@string/app_name"
android:hardwareAccelerated="true"
>
OR
<activity
android:name=".MyActivity"
android:hardwareAccelerated="true"
>
This worked for me, problem was to do with file permissions on the locally stored video. Hope it helps!
<video width="365" height="200" src="/mnt/SDcard/media/video/abc.mp4" controls autobuffer></video>
When I encountered this problem it was due to the compression type. For android I had to use base profile compression rather than high profile compression. ffmpeg compatibility has a description.
I answered a similar question here.
Android Browser and WebView has many known problems playing HTML5 <video>
videos.
Android webview cannot render youtube video embedded via iframe
Unless you can target Android 4.0 or good modern firmwars, the current workaround is to have a thumbnail image link to a video and then this link opens the video in the native Android video player.
For more information with HTML5 video problems on Android please feel free to search stackoverflow.com.