Commit dc0ee758 by tonihei Committed by Oliver Woodman

Deprecate AnalyticsListener.onSeekStarted.

The new onPositionDiscontinuity callback contains sufficient information, so
that this former workaround to obtain the position before a seek is no longer
needed.

PiperOrigin-RevId: 365993937
parent 7aeb4768
......@@ -170,6 +170,7 @@ public class AnalyticsCollector
* Notify analytics collector that a seek operation will start. Should be called before the player
* adjusts its state and position to the seek.
*/
@SuppressWarnings("deprecation") // Calling deprecated listener method.
public final void notifySeekStarted() {
if (!isSeeking) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
......
......@@ -553,10 +553,11 @@ public interface AnalyticsListener {
@DiscontinuityReason int reason) {}
/**
* Called when a seek operation started.
*
* @param eventTime The event time.
* @deprecated Use {@link #onPositionDiscontinuity(EventTime, Player.PositionInfo,
* Player.PositionInfo, int)} instead, listening to changes with {@link
* Player#DISCONTINUITY_REASON_SEEK}.
*/
@Deprecated
default void onSeekStarted(EventTime eventTime) {}
/**
......
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