Playing video thru Android Webview?

You must Login before you can answer or comment on any questions.

Anybody have any (successful) experience with displaying video via a webview in android

— asked 2 years ago by Gary George
1 Comment
  • if you set direct url to webView then what happens...?

    — commented 2 years ago by Mitul Bhalia

2 Answers

Nothing mate , the URL will display text etc but if try to use a html5 video tag in the remote html file it doesn't work at all feel like I've tried every option .

— answered 2 years ago by Gary George
answer permalink
2 Comments
  • Is it a youtube video ???

    — commented 2 years ago by mathew orleans

  • Nope we have the video in various formats aswel none seem to play via the webview

    — commented 2 years ago by Gary George

Try this

var media_url='http://www.youtube.com/watch?v=-RRGA25bEPU';
 
var movie= '<html><head></head><body style="margin:0"> <embed id="yt" src="'+media_url+'" type="application/x-shockwave-flash" width="200" height="200"></embed> </body></html>';
 
var webview = Ti.UI.createWebView({
  // title:'Videos'+index,
   html: movie,
   height:450,
   width:600,
   top:25,
   left:90
});
 
win.add(webview);

— answered 2 years ago by mathew orleans
answer permalink
2 Comments
  • This will not work on simulator , will work only on device .

    — commented 2 years ago by mathew orleans

  • I'm working on a Motorola Xoom , I'll try this later on today

    — commented 2 years ago by Gary George

Your Answer

Think you can help? Login to answer this question!