Use proper buffered duration in AnalyticsCollector.

This replaces the workaround calculation which was needed before the
referenced bug was fixed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200217241
This commit is contained in:
tonihei 2018-06-12 08:15:20 -07:00 committed by Oliver Woodman
parent 943de70a15
commit 4dc6c85de4

View file

@ -574,8 +574,6 @@ public class AnalyticsCollector
// This event is for content in a future window. Assume default start position.
eventPositionMs = timeline.getWindow(windowIndex, window).getDefaultPositionMs();
}
// TODO(b/30792113): implement this properly (player.getTotalBufferedDuration()).
long bufferedDurationMs = player.getBufferedPosition() - player.getContentPosition();
return new EventTime(
realtimeMs,
timeline,
@ -583,7 +581,7 @@ public class AnalyticsCollector
mediaPeriodId,
eventPositionMs,
player.getCurrentPosition(),
bufferedDurationMs);
player.getTotalBufferedDuration());
}
private EventTime generateEventTime(@Nullable WindowAndMediaPeriodId mediaPeriod) {