Commit 4dc6c85d by tonihei Committed by Oliver Woodman

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
parent 943de70a
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment