Deprecate onSeekProcessed.

PiperOrigin-RevId: 308246116
This commit is contained in:
tonihei 2020-04-24 14:49:20 +01:00 committed by Ian Baker
parent 13c668f9e0
commit e9511a56ea
4 changed files with 10 additions and 6 deletions

View File

@ -26,6 +26,8 @@
consistency.
* Deprecate and rename `onLoadingChanged` to `onIsLoadingChanged` for
consistency.
* Deprecate `onSeekProcessed` because all seek changes happen instantly
now and listening to `onPositionDiscontinuity` is sufficient.
* Add `ExoPlayer.setPauseAtEndOfMediaItems` to let the player pause at the
end of each media item
([#5660](https://github.com/google/ExoPlayer/issues/5660)).

View File

@ -582,10 +582,10 @@ public interface Player {
default void onPlaybackSpeedChanged(float playbackSpeed) {}
/**
* Called when all pending seek requests have been processed by the player. This is guaranteed
* to happen after any necessary changes to the player state were reported to {@link
* #onPlaybackStateChanged(int)}.
* @deprecated Seeks are processed without delay. Listen to {@link
* #onPositionDiscontinuity(int)} with reason {@link #DISCONTINUITY_REASON_SEEK} instead.
*/
@Deprecated
default void onSeekProcessed() {}
}

View File

@ -554,6 +554,7 @@ public class AnalyticsCollector
}
}
@SuppressWarnings("deprecation")
@Override
public final void onSeekProcessed() {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();

View File

@ -190,10 +190,11 @@ public interface AnalyticsListener {
default void onSeekStarted(EventTime eventTime) {}
/**
* Called when a seek operation was processed.
*
* @param eventTime The event time.
* @deprecated Seeks are processed without delay. Listen to {@link
* #onPositionDiscontinuity(EventTime, int)} with reason {@link
* Player#DISCONTINUITY_REASON_SEEK} instead.
*/
@Deprecated
default void onSeekProcessed(EventTime eventTime) {}
/**