public void processText(String text) { if (textListener == null || selectedTracks[RENDER_CLOSED_CAPTION_INDEX] == DISABLED_TRACK) { return; } textListener.onText(text); }
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); } } }