问题
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);
回答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
来源:https://stackoverflow.com/questions/34260715/how-can-i-pass-video-id-along-with-playlist-id-in-cueplaylist