Improve DEBUG VideoProgressUpdate logging

PiperOrigin-RevId: 330918689
This commit is contained in:
andrewlewis 2020-09-10 13:52:23 +01:00 committed by Oliver Woodman
parent 52a1c791f7
commit a67bebc1c9

View File

@ -1696,7 +1696,15 @@ public final class ImaAdsLoader
public VideoProgressUpdate getContentProgress() { public VideoProgressUpdate getContentProgress() {
VideoProgressUpdate videoProgressUpdate = getContentVideoProgressUpdate(); VideoProgressUpdate videoProgressUpdate = getContentVideoProgressUpdate();
if (DEBUG) { 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) { if (waitingForPreloadElapsedRealtimeMs != C.TIME_UNSET) {