Skip to content

Instantly share code, notes, and snippets.

@ojw28
Last active December 20, 2016 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojw28/0a918e2e508750049d67de108baf8055 to your computer and use it in GitHub Desktop.
Save ojw28/0a918e2e508750049d67de108baf8055 to your computer and use it in GitHub Desktop.
@Override
public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {
for (int i = 0; i < trackGroups.length; i++) {
TrackGroup trackGroup = trackGroups.get(i);
for (int j = 0; j < trackGroup.length; j++) {
Metadata trackMetadata = trackGroup.getFormat(j).metadata;
if (trackMetadata != null) {
// We found metadata. Do something with it here!
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment