Skip to content

Commit

Permalink
Improve DEBUG VideoProgressUpdate logging
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 330918689
  • Loading branch information
andrewlewis authored and ojw28 committed Sep 11, 2020
1 parent 52a1c79 commit a67bebc
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,15 @@ public void onAdsManagerLoaded(AdsManagerLoadedEvent adsManagerLoadedEvent) {
public VideoProgressUpdate getContentProgress() {
VideoProgressUpdate videoProgressUpdate = getContentVideoProgressUpdate();
if (DEBUG) {
Log.d(TAG, "Content progress: " + videoProgressUpdate);
if (VideoProgressUpdate.VIDEO_TIME_NOT_READY.equals(videoProgressUpdate)) {
Log.d(TAG, "Content progress: not ready");
} else {
Log.d(
TAG,
Util.formatInvariant(
"Content progress: %.1f of %.1f s",
videoProgressUpdate.getCurrentTime(), videoProgressUpdate.getDuration()));
}
}

if (waitingForPreloadElapsedRealtimeMs != C.TIME_UNSET) {
Expand Down

0 comments on commit a67bebc

Please sign in to comment.