I have an embedded html file in my file system, it works fine if I drag n drop the file to
and I have tested the HTML5 video playback from here. Works fine.
Now, if I want to show an embedded page with HTML5 video [working on browser] as an embedded file, just by changing the sample code for the HTML5 android webView player and drag n drop the index.html in assets for this project, it doesn’t work, the app crashes with this error:
sorry, the app * has stopped unexpectedly…
so I just change
It doesn’t work.
What am I missing, is there a basic example of HTML5 video embedded?
assets/www/index.html and change
Try using loadDataWithBaseURL:
String baseUrl = shouldUseCachedFiles ? "file:///android_asset/" :mUrl; mWebView.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "utf-8", baseUrl);
where the htmlContent is retrieved with an AsynchTask and loaded into the webView.