I am making an RSS reader application and I am retrieving RSS data from a URL, and RSS data may contain a link to a YouTube video.
Here is an example of what a youtube vide link looks like:
div class="video-shortcode"><iframe title="YouTube video player" width="600" height="350" src="http://www.youtube.com/embed/HXrcUyCVA6c" frameborder="0" allowfullscreen></iframe></div>
And when I launch my application, there is no video, everything is black, and I can not play it.
How can I play videos in WebView?
EDIT: Here is the result:

Here is my code:
// set webview properties WebSettings ws = desc.getSettings(); ws.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); ws.getPluginState(); ws.setPluginState(PluginState.ON); ws.setJavaScriptEnabled(true); ws.setUserAgent(0); ws.setJavaScriptCanOpenWindowsAutomatically(true); desc.setWebChromeClient(new WebChromeClient() { }); desc.loadDataWithBaseURL("http://www.balkanandroid.com/", feed .getItem(pos).getContent(), "text/html", "UTF-8", null);
I have android: hardwareAccelerated = "true" in my AndroidManifest.xml.
source share