Sunday, June 3, 2012

[android-developers] Problem with video in WebView

Hello,

I am new in android, and I am developing an app, where I want to watch a movie in a webview, using HTML 5, but the video doesn't appear, when I run the app I can see only the video controls... 

The code in html that I am using is:

code = "<!DOCTYPE html>" +

"<html>" +

"<head>" +

"<title>Simple Movie Player</title>" +

"</head>" +

"<body>" +

"<video src=\""+ uri.toString() + "\"" +

" controls>" +

"</video>" +

"</body>" +

"</html>";

The uri is from a video in the internal storage. I load this html code in a webview by this command:

 webview.loadDataWithBaseURL(null, code, null, "utf-8", null);

Can anyone help me? I am trying very hard to do this!


Thanks in advance,

Angelica




--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate