0

I've got a WebView with an embedded HTML5 element. PluginState is set to ON, JavaScript is enabled. When the video should play, the audio stream plays, but the video is a black square on anything older than KitKat. Everything's perfect on KitKat and up. Any ideas?

Things I've tried:

1) Setting layer type to hardware/software
2) Using @JavascriptInterface to try to autoplay (due to pre-KK requiring user input for MediaElements)
3) Various encodings (H.264, WebM)

Joshua Steiner
  • 129
  • 1
  • 6

1 Answers1

1

If a parent view in the hierarchy has a software layer type, and its child has a hardware layer type, the child's mode is software, not hardware. A prerequisite for WebView media playback is being in hardware layer mode.

Joshua Steiner
  • 129
  • 1
  • 6