2

I have a url which i am displaying in the webview, it coutains embedded youtube video and but i am unable to play the video, i have looked into many posts but none of them seems to help. Can you suggest me some ideas for the workaround of this problem ...

Thanks...

King RV
  • 3,760
  • 1
  • 15
  • 16
  • The embedded player at least works in a WebView on Ice Cream Sandwich, provided it is the new embed code that adapts to flash or html5. However, at least on the tablets we are using to test, a strip of the video on the right side is lost when playback starts. – Dave Cameron Aug 15 '12 at 19:46

2 Answers2

0

You should consider using a more generic intent to view a video through another app. Webviews are somewhat limited and depend a lot on platform abilities. If you used a third party app, like youtube, your app would then benefit of

  • a video player choosen by the user himself according to is/her taste
  • an up-to-date video player, more independant of android native capabilities
  • one less problem to solve. :)
Community
  • 1
  • 1
Snicolas
  • 37,840
  • 15
  • 114
  • 173
0

You can use following intent

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=b8EKth4TTrM")));
bindal
  • 1,940
  • 1
  • 20
  • 29