private void checkForContentComplete() { if (contentDurationMs != C.TIME_UNSET && pendingContentPositionMs == C.TIME_UNSET && player.getContentPosition() + END_OF_CONTENT_POSITION_THRESHOLD_MS >= contentDurationMs && !sentContentComplete) { adsLoader.contentComplete(); if (DEBUG) { Log.d(TAG, "adsLoader.contentComplete"); } sentContentComplete = true; // After sending content complete IMA will not poll the content position, so set the expected // ad group index. expectedAdGroupIndex = adPlaybackState.getAdGroupIndexForPositionUs(C.msToUs(contentDurationMs)); } }
&& player.getPlaybackState() == Player.STATE_READY) { builder .setWhen(System.currentTimeMillis() - player.getContentPosition()) .setShowWhen(true) .setUsesChronometer(true);
position = currentWindowTimeBarOffsetMs + player.getContentPosition(); bufferedPosition = currentWindowTimeBarOffsetMs + player.getContentBufferedPosition(); if (timeBar != null) {
eventPositionMs = player.getContentPosition(); } else {
bufferedPosition = position; if (player.isPlayingAd()) { position += player.getContentPosition(); bufferedPosition = position; } else {