Created
June 29, 2017 14:41
-
-
Save TOrnelas/b221ef5972e914559376e7fb6cfbc23e 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
private void playNextVideo(){ | |
for (int i = 0; i < contentArrayList.size(); i++){ | |
if (contentArrayList.get(i).isPlaying()){ | |
if (i == contentArrayList.size() - 1) | |
finish(); | |
url = "https://cdnapisec.kaltura.com/p/309/sp/0/playManifest/entryId/" + | |
contentArrayList.get(i + 1).getIdKaltura() | |
+"/format/applehttp/protocol/http/flavorParamId/301971/manifest.m3u8"; | |
contentArrayList.get(i).setIsPlaying(false) | |
contentArrayList.get(i + 1).setIsPlaying(true); | |
adapter.notifyDataSetChanged(); | |
playVideo(url, ExoPlayer2Interface.VIDEO_HLS); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment