java - How to play HTML5 video in webview in android? -


how play html5 video in webview in android?

embed video tag below in yoru webview

<video id="video" autobuffer width="320" height="240">   <source src="movie.mp4">   <source src="movie.ogg"> browser not support video tag. </video> 

set event below click.

var video = document.getelementbyid('video'); video.addeventlistener('click',function(){   video.play(); },false); 

though using type="video/mp4" accepted html5 standard, andorid browsers seem mess it. don't use it.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -