示例#1
0
  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());
    }
  }
示例#2
0
 @Override
 public void onCues(List<Cue> cues) {
   if (captionListener != null && selectedTracks[RENDER_CLOSED_CAPTION_INDEX] != DISABLED_TRACK) {
     captionListener.onCues(cues);
   }
 }