mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
7aeb476812
commit
dc0ee7580e
2 changed files with 5 additions and 3 deletions
|
|
@ -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 {
|
||||||
@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) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue