Created
September 12, 2020 23:07
-
-
Save ojw28/958e587934fbf92418c20c2f15fff627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Play a list of URIs as a playlist. | |
List<MediaItem> mediaItems = new ArrayList<>(); | |
for (int i = 0; i < videoUris.length; i++) { | |
mediaItems.add(MediaItem.fromUri(videoUris[i])); | |
} | |
// Set the playlist, prepare and play. | |
player.setMediaItems(mediaItems); | |
player.prepare(); | |
player.play() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment