示例#1
0
  public void processText(String text) {
    if (textListener == null || selectedTracks[RENDER_CLOSED_CAPTION_INDEX] == DISABLED_TRACK) {
      return;
    }

    textListener.onText(text);
  }
示例#2
0
  public void selectTrack(int type, int index) {
    if (selectedTracks[type] == index) {
      return;
    }

    selectedTracks[type] = index;
    if (type == RENDER_VIDEO_INDEX) {
      pushSurfaceAndVideoTrack(false);
    } else {
      pushTrackSelection(type, true);
      if (type == RENDER_CLOSED_CAPTION_INDEX && index == DISABLED_TRACK && textListener != null) {
        textListener.onText(null);
      }
    }
  }