本文整理了Java中com.google.android.youtube.player.YouTubePlayer.getCurrentTimeMillis()
方法的一些代码示例,展示了YouTubePlayer.getCurrentTimeMillis()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YouTubePlayer.getCurrentTimeMillis()
方法的具体详情如下:
包路径:com.google.android.youtube.player.YouTubePlayer
类名称:YouTubePlayer
方法名:getCurrentTimeMillis
暂无
代码示例来源:origin: eneim/toro
void updateResumePosition() {
if (youTubePlayer != null) {
playbackInfo.setResumePosition(youTubePlayer.getCurrentTimeMillis());
}
}
代码示例来源:origin: eneim/toro
InitData getLatestData() {
if (initData == null) return null;
if (player != null) {
try {
initData.playbackInfo.setResumePosition(player.getCurrentTimeMillis());
} catch (IllegalStateException er) {
er.printStackTrace();
}
}
PlaybackInfo info = new PlaybackInfo(initData.playbackInfo);
return new InitData(initData.adapterOrder, initData.videoId, info, initData.returnOrientation);
}
代码示例来源:origin: flipkart-incubator/android-inline-youtube-view
@Override
public void onBuffering(boolean isBuffering) {
if (listener != null && youTubePlayer != null) {
listener.onBuffering((youTubePlayer.getCurrentTimeMillis()), isBuffering);
}
}
代码示例来源:origin: flipkart-incubator/android-inline-youtube-view
@Override
public void onPlaying() {
if (listener != null && youTubePlayer != null && !PlayerStateList.PLAYING.equals(playerState)) {
playerState = PlayerStateList.PLAYING;
listener.onPlay(youTubePlayer.getCurrentTimeMillis());
}
}
代码示例来源:origin: flipkart-incubator/android-inline-youtube-view
private void handleOnPauseEvent() {
if (listener != null && youTubePlayer != null && (PlayerStateList.PLAYING.equals(playerState)
|| PlayerStateList.BUFFERING.equals(playerState))) {
playerState = PlayerStateList.PAUSED;
listener.onPause((youTubePlayer.getCurrentTimeMillis()));
}
}
代码示例来源:origin: flipkart-incubator/android-inline-youtube-view
private void handleStopEvent() {
if (listener != null && youTubePlayer != null && (PlayerStateList.PLAYING.equals(playerState)
|| PlayerStateList.BUFFERING.equals(playerState) || PlayerStateList.PAUSED.equals(playerState))) {
playerState = PlayerStateList.STOPPED;
listener.onStop((youTubePlayer.getCurrentTimeMillis()), (youTubePlayer.getDurationMillis()));
}
}
内容来源于网络,如有侵权,请联系作者删除!