0

I am using cuePlaylist() so getting previous and next buttons as default functionality of Youtube player

I am also allowing user to tap on any of the list item (listview contains youtube playlist videos)

But when I am passing VIDEO_ID along with PLAYLIST_ID in that case I am getting There was a problem with the network[400]

 // PLAYLIST_ID : PLP7qPet500dfglA7FFTxBmB_snxCaMHDJ
 // strVideoID : 7OEprLI1rIM

 String sn = strVideoID+PLAYLIST_ID; 
 youTubePlayer.cuePlaylist(sn);

And using loadVideo(...) I am able to play that particular video but not getting PREV and NEXT buttons.

 youTubePlayer.loadVideo(strVideoID);
Sophie
  • 2,594
  • 10
  • 41
  • 75

1 Answers1

1

You should always check the documentation first, https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer

I think following method can fit to your needs

loadPlaylist (String playlistId, int startIndex, int timeMillis)

Ref: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer#loadPlaylist%28java.lang.String,%20int,%20int%29

Umar Qureshi
  • 5,985
  • 2
  • 30
  • 40
  • @Sophie as i don't have this scenario implemented so i didn't tested the method but from documentation it seems to fit for your scenario, can you share results of using mYoutubePlayer.loadPlaylist(PLAYLIST_ID, 7, 0); , what issue you face? – Umar Qureshi Dec 14 '15 at 13:51
  • last and final issue, check here: http://stackoverflow.com/questions/34329549/youtube-exit-full-screen-mode-textview-visibility-issue – Sophie Dec 17 '15 at 09:03