com.google.android.exoplayer.text.Cue Java Examples

The following examples show how to use com.google.android.exoplayer.text.Cue. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventProxy.java    From exoplayer-textureview with Apache License 2.0 5 votes vote down vote up
/** TextRenderer */
@Override
public void onCues(List<Cue> cues) {
    if (captionListener != null && !player.isDisabledTrack(Player.TYPE_TEXT)) {
        captionListener.onCues(cues);
    }
}
 
Example #2
Source File: VideoPlayer.java    From iview-android-tv with MIT License 5 votes vote down vote up
public void selectTrack(int type, int index) {
    if (selectedTracks[type] == index) {
        return;
    }
    selectedTracks[type] = index;
    pushTrackSelection(type, true);
    if (type == TYPE_TEXT && index == DISABLED_TRACK && captionListener != null) {
        captionListener.onCues(Collections.<Cue>emptyList());
    }
}
 
Example #3
Source File: VideoPlayer.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    if (captionListener != null && selectedTracks[TYPE_TEXT] != DISABLED_TRACK) {
        captionListener.onCues(cues);
    }
}
 
Example #4
Source File: DemoPlayer.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #5
Source File: DemoPlayer.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #6
Source File: EventProxy.java    From exoplayer-textureview with Apache License 2.0 4 votes vote down vote up
void invokeOnCues(List<Cue> cues) {
    if (captionListener != null) {
        captionListener.onCues(cues);
    }
}
 
Example #7
Source File: Player.java    From exoplayer-textureview with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
    player.setSelectedTrack(type, index);
    if (type == TYPE_TEXT && index < 0) {
        eventProxy.invokeOnCues(Collections.<Cue>emptyList());
    }
}
 
Example #8
Source File: VideoPlayerView.java    From iview-android-tv with MIT License 4 votes vote down vote up
public void setCues(List<Cue> cues) {
    subtitleLayout.setCues(cues);
}
 
Example #9
Source File: VideoPlayerActivity.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    videoPlayerView.setCues(cues);
}
 
Example #10
Source File: PlayerActivity.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    subtitleLayout.setCues(cues);
}
 
Example #11
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #12
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #13
Source File: VideoPlayerActivity.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    subtitleLayout.setCues(cues);
}
 
Example #14
Source File: DemoPlayer.java    From androidtv-sample-inputs with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
    player.setSelectedTrack(type, index);
    if (type == TYPE_TEXT && index < 0 && captionListener != null) {
        captionListener.onCues(Collections.<Cue>emptyList());
    }
}
 
Example #15
Source File: DemoPlayer.java    From androidtv-sample-inputs with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
        captionListener.onCues(cues);
    }
}
 
Example #16
Source File: RichTvInputService.java    From androidtv-sample-inputs with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    if (mSubtitleView != null) {
        mSubtitleView.setCues(cues);
    }
}
 
Example #17
Source File: ExoplayerWrapper.java    From google-media-framework-android with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #18
Source File: ExoplayerWrapper.java    From google-media-framework-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #19
Source File: DemoPlayer.java    From WliveTV with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #20
Source File: DemoPlayer.java    From AndroidTvDemo with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #21
Source File: DemoPlayer.java    From AndroidTvDemo with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #22
Source File: DemoPlayer.java    From ShareBox with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #23
Source File: DemoPlayer.java    From ShareBox with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #24
Source File: DemoPlayer.java    From talk-android with MIT License 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #25
Source File: DemoPlayer.java    From talk-android with MIT License 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #26
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}
 
Example #27
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
  if (captionListener != null && getSelectedTrack(TYPE_TEXT) != TRACK_DISABLED) {
    captionListener.onCues(cues);
  }
}
 
Example #28
Source File: VideoPlayerActivity.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onCues(List<Cue> cues) {
    subtitleLayout.setCues(cues);
}
 
Example #29
Source File: TvInputPlayer.java    From ChannelSurfer with MIT License 4 votes vote down vote up
@Override
public void onCues(List<Cue> list) {
}
 
Example #30
Source File: DemoPlayer.java    From WliveTV with Apache License 2.0 4 votes vote down vote up
public void setSelectedTrack(int type, int index) {
  player.setSelectedTrack(type, index);
  if (type == TYPE_TEXT && index < 0 && captionListener != null) {
    captionListener.onCues(Collections.<Cue>emptyList());
  }
}