Reputation: 6794
For diagnostic purposes, I need to be able to disable HTML5 in Android's WebView, without disabling Javascript (i.e. keep WebSettings.setJavaScriptEnabled(true);
)
To further clarify: I love the ability to play YouTube videos without any Flash plugin installed. It even works with setPluginsEnabled(false)
. I can do this thanks to WebView's HTML5 built-in support. Now, to test a certain function, I need to trigger DownloadListener.onDownloadStart()
with a YouTube video without disabling Javascript.
Is this possible?
Update: Since I posted this question I discovered that at least DOM storage can be disabled. I haven't found a way to disable HTML5 video yet.
Upvotes: 3
Views: 2273
Reputation: 231
I know it's very old question... Still, you may want to check this answer for an idea. The WebSettings
class has these methods for enabling/disabling HTML5 features:
Upvotes: 2
Reputation: 7334
I am not sure that this question makes much sense. You're not going to be able to "disable" an HTML5 feature in a browser that supports it. The best you can probably do is to set a non-HTML5 doctype on the webpage, but even then most rendering engines (webkit included) will still gladly support those features (<video>
tag, <canvas>
, etc) that they implement.
It sounds like what you're really trying to do is test what happens with a streaming video on a particular device (with an older?.. version of webkit that doesn't support <video>
). Is that right? In this case, I'm not aware of any version of Webkit that has ever been distributed with Android that does not have support for <video>
, but I could be wrong.
Upvotes: 1