Search code examples
youtubeyoutube-api

Play all videos of a playlist from yoututbe data api


I can get video id from PlaylistItems and play them using youtube player. But is there any way I can get the entire playlist to be played (one video after another like on youtube). On youtube for any playlist we have url like

https://www.youtube.com/watch?v=zqpkt80WbX0&list=RDaPevLsjcJ7c&index=6

How do we get the 'list' for any video?


Solution

  • I used the following intent-metho

    Intent videoint = YouTubeStandalonePlayer.createPlaylistIntent(MyActivity.this, KEY,
                                    playlistID, position, 0, true, false);
    startActivityForResult(videoint,STANDALONE_PLAYER_REQUEST_CODE);