JW Player inside Android WebView, i can't see video -
my android app open web page inside webview contains url video reproduced jw player. when try open video clicking on url, video player appear don't see image, hear audio. webview setup inside activity:
webview container = (webview) findviewbyid(r.id.container); container.setlayertype(view.layer_type_software, null); container.getsettings().setjavascriptenabled(true); container.getsettings().setdomstorageenabled(true); container.getsettings().setallowfileaccessfromfileurls(true); container.getsettings().setallowuniversalaccessfromfileurls(true); container.getsettings().setpluginstate(pluginstate.on); container.getsettings().setloadsimagesautomatically(true); container.getsettings().setjavascriptcanopenwindowsautomatically( true); container.getsettings().setallowfileaccess(true); container.setwebchromeclient(new webchromeclient() { @override public void onconsolemessage(string message, int linenumber, string sourceid) { log.d("tag", message + " -- line " + linenumber + " of " + sourceid); } @override public boolean onjsalert(webview view, string url, string message, final android.webkit.jsresult result) { log.d("tag", message); new alertdialog.builder(view.getcontext()) .setmessage(message).setcancelable(true).show(); result.confirm(); return true; } }); container.setwebviewclient(new webviewclient() { @override public boolean shouldoverrideurlloading(webview view, string url) { return false; } @override public void onreceivedsslerror(webview view, sslerrorhandler handler, sslerror error) { handler.proceed(); } });
how can fix it?
Comments
Post a Comment