com.google.android.youtube.player.YouTubePlayer.getCurrentTimeMillis()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(199)

本文整理了Java中com.google.android.youtube.player.YouTubePlayer.getCurrentTimeMillis()方法的一些代码示例,展示了YouTubePlayer.getCurrentTimeMillis()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YouTubePlayer.getCurrentTimeMillis()方法的具体详情如下:
包路径:com.google.android.youtube.player.YouTubePlayer
类名称:YouTubePlayer
方法名:getCurrentTimeMillis

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()));
  }
}

相关文章