I want show YouTube videos in my application and for this I want use WebView
.
For use WebView
and show videos I write below codes :
WebSettings settings = content_newsWebView.getSettings();
content_newsWebView.setWebChromeClient(new WebChromeClient());
content_newsWebView.getSettings().setDomStorageEnabled(true);
content_newsWebView.getSettings().setAppCacheEnabled(true);
content_newsWebView.getSettings().setAppCachePath(getApplicationContext().getFilesDir().getAbsolutePath() + "/cache");
content_newsWebView.getSettings().setDatabaseEnabled(true);
content_newsWebView.getSettings().setDatabasePath(getApplicationContext().getFilesDir().getAbsolutePath() + "/databases");
settings.setPluginState(WebSettings.PluginState.ON);
content_newsWebView.getSettings().setJavaScriptEnabled(true);
settings.setDefaultTextEncodingName("utf-8");
content_newsWebView.loadData(response.body().getData().getDescription(), "text/html; charset=UTF-8", null);
When run application, show me video but not responsive!
Show me video biggest! Please see this image to understand my mean : Image Link
I want show responsive Youtube video in my application.
I get video link from server with this Json :
> "<p><iframe frameborder=\"0\"
> src=\"https://www.youtube.com/embed/NcoBDgJ3ZBw\"
> style=\"width:100%;min-height: 400px;\"></iframe></p>\n\n<p>The Harry
> Potter star plays an Israeli backpacker in the upcoming thriller from
> <a
> href=\"http://example.com/Celebrities/276442/greg_mclean\"><strong>Greg McLean</strong></a> (<a
> href=\"http://example.com/Movies/94393/the_belko_experiment\"><strong>The
> Belko Experiment</strong></a>, <a
> href=\"http://example.com/Movies/1397/wolf_creek\"><strong>Wolf
> Creek</strong></a>).</p>\n\n<p><a
> href=\"http://example.com/Celebrities/10139/daniel_radcliffe\"><strong>Radcliffe</strong></a>,
> 27, is a young adventurer going on a dream trip into the Amazonian
> rain forest along with two friends and a mysterious guide named
> Karl.</p>\n\n<p>Abandoned by their guide among the dangerous jungle
> creatures, Yossi (<a
> href=\"http://example.com/Celebrities/10139/daniel_radcliffe\"><strong>Radcliffe</strong></a>)
> and his friends are left with little means to survive, ending up in
> psychological battles with themselves.</p>\n\n<p>Starring <a
> href=\"http://example.com/Celebrities/64592/alex_russell\"><strong>Alex Russell</strong></a>, <a
> href=\"http://example.com/Celebrities/53829/thomas_kretschmann\"><strong>Thomas
> Kretschmann</strong></a> and <strong>Yasmin Kassim</strong>, Jungle
> premiers at Melbourne International Film Festival on Aug. 3.</p>\n"
How can I show responsive youtube video in my application?
Please help me guys, I really need your Helps.