0

I want to develop a scenario: when i click on listview item youtube video should start playing. Listview content is fetched from JSON. JSON object has title, description and youtube url. This youtube url should initiate the youtube player. I tried few tutorials from the internet but the problem is: when youtube video is playing in portrait mode, blank white screen is displayed below the video view. I want to display the next videos thumbnails as listview there. Can any one suggest me how to do this?...

suresh ch
  • 33
  • 1
  • 10

2 Answers2

0

Possible duplicate (please don't vote my answer):

Embed Youtube video inside an Android app

and

How to play YouTube video in my Android application?

Some other resources you can use: https://developers.google.com/youtube/android/player/sample-applications

Because I do not fully understand the context of your app, you will have to decide which type of player is best for you.

Community
  • 1
  • 1
Hard Tacos
  • 370
  • 1
  • 5
  • 19
0

Create an explicit intent and set the url as an extra for the intent. You can find more information about intents here: https://developer.android.com/guide/components/intents-filters.html You can also checkout this link for intents specific to the Youtube app https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeIntents

In the future, do a google search before posting questions on stackoverflow. You need to show that you have done your own research before asking such vague questions on here.

  • Yes, i followed few tutorials and i did that. when youtube video is playing in portrait a blank space is displayed below the video frame. But i want to display the next videos youtube thumbnails as list in that space. How to do that?...I dont want user to navigate back to select the next video from listview, i want him to select from those listview of thumbnails....Thanks for the reply. – suresh ch Oct 15 '14 at 17:08
  • Please add this information in your question. If possible, also add the code that you've tried and the errors that are being shown. – varsha-venkatesh Oct 15 '14 at 17:11