Commit 3818d732 by tonihei Committed by Oliver Woodman

Use ExoPlayer's AnalyticsListener and AnalyticsCollector.

This combines all the different listeners in ExoVideosPlayerV2 into one and
moves the PlaybackLogger class towards ExoPlayer's AnalyticsCollector with
the same purpose.

In the future this allows two things:
 1. Gradually move LogginClient implementations to AnalyticsListener to
    prevent custom event forwarding.
 2. Using ExoPlayer's QoE extension (which is also an AnalyticsListener).

PiperOrigin-RevId: 232321182
parent 7a4cf96f
......@@ -129,12 +129,13 @@ public class AnalyticsCollector
/**
* Sets the player for which data will be collected. Must only be called if no player has been set
* yet.
* yet or the current player is idle.
*
* @param player The {@link Player} for which data will be collected.
*/
public void setPlayer(Player player) {
Assertions.checkState(this.player == null);
Assertions.checkState(
this.player == null || mediaPeriodQueueTracker.mediaPeriodInfoQueue.isEmpty());
this.player = Assertions.checkNotNull(player);
}
......
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