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