1

I want to play Youtube video in my WebView. I know this is a duplicate question on StackOverflow but still I didn't get solution for it.

I use android 2.2 and higher. I tried HTML5 but it's not supported in my device.
I was googling from last 5 days.

CMA
  • 2,758
  • 5
  • 28
  • 40
Hardik Joshi
  • 9,477
  • 12
  • 61
  • 113
  • check the links given at answer given by me at http://stackoverflow.com/questions/10208439/html5-video-doesnt-play-with-android/10209684#10209684 it works for me that example download that example using svn and check it – Khan Jun 21 '12 at 05:53
  • But HTML5 supported in android 3.0 and up. – Hardik Joshi Jun 21 '12 at 06:09
  • @ you want play video from links right it works i have checked that in my project first download sample and check it it show different option for playing video like 3gp,mp4 etc also from links and after that in class replace the link by your links it works i have checked eith version 2.3.1 with htmlstring containg description and video and image gallary too – Khan Jun 21 '12 at 06:13
  • I found only apk file not source on your link. – Hardik Joshi Jun 21 '12 at 06:14
  • I write following code for load URL in my webview. `webview.loadUrl("http://www.youtube.com/watch?v="+data.split("v=")[1].split("&")[0]);` – Hardik Joshi Jun 21 '12 at 06:17
  • But it open Youtube.com web brower and video play on youtube not in my application. I want to play it withing my application(my webview). Give me any source code for this same please. – Hardik Joshi Jun 21 '12 at 06:18
  • @go to link source where links is given for source – Khan Jun 21 '12 at 06:22
  • I dont get source from your link it contains only apk file. Please give me any other source. – Hardik Joshi Jun 21 '12 at 06:43
  • you get source from this links http://html5webview.googlecode.com/svn/trunk/ from given at as on my links – Khan Jun 21 '12 at 06:48
  • But HTML5 Webview is not supported in my android 2.2 platform. – Hardik Joshi Jun 21 '12 at 07:15
  • @hardikjoshi pls share how u solved this issue? – Parag Chauhan Oct 02 '12 at 16:00
  • @parag i use http://blog.blundell-apps.com/click-item-in-a-listview-to-show-youtube-video/ – Hardik Joshi Oct 03 '12 at 04:19

1 Answers1

0

I would recommend Google's own android api for youtube found at https://developers.google.com/youtube/android/player/

Julian
  • 71
  • 1
  • 6