android - How to open youtube videos in WebView? -


i have kinds of link
http://www.youtube.com/v/nbvsinntlcg?autohide=1&version=3&autoplay=1

and want open in webview.

but when send url opens blank page.

i tried using code

mywebview.getsettings().setjavascriptenabled (true);  mywebview. getsettings().setjavascriptcanopenwindowsautomatically (false); mywebview. getsettings().setpluginsenabled (true); mywebview. getsettings().setsupportmultiplewindows (false); mywebview. getsettings().setsupportzoom (false); mywebview. setverticalscrollbarenabled (false); mywebview. sethorizontalscrollbarenabled (false); mywebview.loadurl(url); 

in webview class

perhaps can try adding following lines code

    mywebview.getsettings().setpluginstate(pluginstate.on);     mywebview.getsettings().setallowfileaccess(true);      mywebview.getsettings().setappcachemaxsize(1024 * 8);     mywebview.getsettings().setappcacheenabled(true);      mywebview.getsettings().setusewideviewport(false);     mywebview.setwebchromeclient(new webchromeclient());     mywebview.setwebviewclient(new webviewclient());      // these settings speed page load webview     mywebview.getsettings().setrenderpriority(renderpriority.high);     mywebview.getsettings().setcachemode(websettings.load_no_cache); 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -