3

I have WebView with embedded Youtube player. It has to be inside ScrollView as it is a part of an article user can scroll. Now with hardware acceleration disabled WebView displays only black rectangles. With acceleration enabled I can see the image, but with scrolling WebView flickers or partially disappears. I'm using the most recent SDK, ASUS eeePad with Android 3.2 and ACER Iconia with Android 3.1. I'm enabling JavaScript and plugins, and I'm embedding YouTube with the following code:

<iframe class=\"youtube-player\" type=\"text/html\" width=\"" + width +
"\" height=\"" + height + "\" src=\"http://www.youtube.com/embed/" + id +
"\" frameborder=\"0\">

Here's the screenshot :

enter image description here

http://imageshack.us/photo/my-images/651/iconiayoutube.png/

Any ideas, how I can make it work?

edwin
  • 7,985
  • 10
  • 51
  • 82
Zielony
  • 16,239
  • 6
  • 34
  • 39

1 Answers1

0

I doubt <iframe> tag belong to HTML5 . If it's so , then it will support from android version 4.1 only

Try to use <Video> or <Object> tag instead of it

Also try to set Webchrome Client or WebViewClient for the webview

NOTE: Since Emulators are virtual devices testing of online streaming of Video and Audio will not yield any result. So test always in Devices

Community
  • 1
  • 1
edwin
  • 7,985
  • 10
  • 51
  • 82