public void selectTrack(int type, int index) { if (selectedTracks[type] == index) { return; } selectedTracks[type] = index; pushTrackSelection(type, true); if (type == RENDER_CLOSED_CAPTION_INDEX && index == DISABLED_TRACK && captionListener != null) { captionListener.onCues(Collections.<Cue>emptyList()); } }
@Override public void onCues(List<Cue> cues) { if (captionListener != null && selectedTracks[RENDER_CLOSED_CAPTION_INDEX] != DISABLED_TRACK) { captionListener.onCues(cues); } }