Android webview embedded youtube video autoloop -


in project have webview loads dynamically generated webpage embedded youtube video this:

<iframe type="text/html" width="640" height="385" frameborder="0"  src="http://www.youtube.com/embed/6nqccgpdpxq?autoplay=1&&playlist=6nqccgpdpxq&loop=1"> </iframe> 

if check web video plays ok , loops ok well.

in android app have following code:

    webview engine = (webview) findviewbyid(r.id.web_engine);     engine.setwebchromeclient(new webchromeclient());     engine.getsettings().setpluginstate(pluginstate.on);     engine.getsettings().setjavascriptenabled(true);     engine.setinitialscale(100);     engine.getsettings().setbuiltinzoomcontrols(true);     engine.getsettings().setallowfileaccess(true);     engine.getsettings().setpluginsenabled(true);     engine.loadurl(miurl); 

and works, but

  1. autoplay not work have play hand
  2. autoloop not work, after video finish becomes black, there no menu, there no play/pause/stop video. useless , if want play again have reload entire page.

one more thing, in line:

engine.getsettings().setpluginsenabled(true); 

it says deprecated.

in manifest give internet permission access application , have hardware acceleration true.

can me this?


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -