Commit 149958fb by jaewan Committed by Oliver Woodman

Change return type of getMaxSeekToPreviousPosition() to long

This matches the type of all position related APIs.

PiperOrigin-RevId: 390558523
parent 24b0cf8c
...@@ -459,7 +459,7 @@ public final class CastPlayer extends BasePlayer { ...@@ -459,7 +459,7 @@ public final class CastPlayer extends BasePlayer {
} }
@Override @Override
public int getMaxSeekToPreviousPosition() { public long getMaxSeekToPreviousPosition() {
return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS; return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
} }
......
...@@ -665,7 +665,7 @@ public final class C { ...@@ -665,7 +665,7 @@ public final class C {
public static final int DEFAULT_BUFFER_SEGMENT_SIZE = 64 * 1024; public static final int DEFAULT_BUFFER_SEGMENT_SIZE = 64 * 1024;
/** A default seek back increment, in milliseconds. */ /** A default seek back increment, in milliseconds. */
public static final long DEFAULT_SEEK_BACK_INCREMENT_MS = 5000; public static final long DEFAULT_SEEK_BACK_INCREMENT_MS = 5_000;
/** A default seek forward increment, in milliseconds. */ /** A default seek forward increment, in milliseconds. */
public static final long DEFAULT_SEEK_FORWARD_INCREMENT_MS = 15_000; public static final long DEFAULT_SEEK_FORWARD_INCREMENT_MS = 15_000;
...@@ -673,7 +673,7 @@ public final class C { ...@@ -673,7 +673,7 @@ public final class C {
* A default maximum position for which a seek to previous will seek to the previous window, in * A default maximum position for which a seek to previous will seek to the previous window, in
* milliseconds. * milliseconds.
*/ */
public static final int DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS = 3000; public static final long DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS = 3_000;
/** "cenc" scheme type name as defined in ISO/IEC 23001-7:2016. */ /** "cenc" scheme type name as defined in ISO/IEC 23001-7:2016. */
@SuppressWarnings("ConstantField") @SuppressWarnings("ConstantField")
......
...@@ -299,7 +299,7 @@ public class ForwardingPlayer implements Player { ...@@ -299,7 +299,7 @@ public class ForwardingPlayer implements Player {
} }
@Override @Override
public int getMaxSeekToPreviousPosition() { public long getMaxSeekToPreviousPosition() {
return player.getMaxSeekToPreviousPosition(); return player.getMaxSeekToPreviousPosition();
} }
...@@ -752,7 +752,7 @@ public class ForwardingPlayer implements Player { ...@@ -752,7 +752,7 @@ public class ForwardingPlayer implements Player {
} }
@Override @Override
public void onMaxSeekToPreviousPositionChanged(int maxSeekToPreviousPositionMs) { public void onMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) {
eventListener.onMaxSeekToPreviousPositionChanged(maxSeekToPreviousPositionMs); eventListener.onMaxSeekToPreviousPositionChanged(maxSeekToPreviousPositionMs);
} }
......
...@@ -338,7 +338,7 @@ public interface Player { ...@@ -338,7 +338,7 @@ public interface Player {
* @param maxSeekToPreviousPositionMs The maximum position for which {@link #seekToPrevious()} * @param maxSeekToPreviousPositionMs The maximum position for which {@link #seekToPrevious()}
* seeks to the previous position, in milliseconds. * seeks to the previous position, in milliseconds.
*/ */
default void onMaxSeekToPreviousPositionChanged(int maxSeekToPreviousPositionMs) {} default void onMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) {}
/** /**
* @deprecated Seeks are processed without delay. Listen to {@link * @deprecated Seeks are processed without delay. Listen to {@link
...@@ -1785,9 +1785,9 @@ public interface Player { ...@@ -1785,9 +1785,9 @@ public interface Player {
* in milliseconds. * in milliseconds.
* *
* @return The maximum seek to previous position, in milliseconds. * @return The maximum seek to previous position, in milliseconds.
* @see Listener#onMaxSeekToPreviousPositionChanged(int) * @see Listener#onMaxSeekToPreviousPositionChanged(long)
*/ */
int getMaxSeekToPreviousPosition(); long getMaxSeekToPreviousPosition();
/** /**
* Seeks to an earlier position in the current or previous window (if available). More precisely: * Seeks to an earlier position in the current or previous window (if available). More precisely:
......
...@@ -724,7 +724,7 @@ import java.util.concurrent.CopyOnWriteArraySet; ...@@ -724,7 +724,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
} }
@Override @Override
public int getMaxSeekToPreviousPosition() { public long getMaxSeekToPreviousPosition() {
return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS; return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
} }
......
...@@ -1380,7 +1380,7 @@ public class SimpleExoPlayer extends BasePlayer ...@@ -1380,7 +1380,7 @@ public class SimpleExoPlayer extends BasePlayer
} }
@Override @Override
public int getMaxSeekToPreviousPosition() { public long getMaxSeekToPreviousPosition() {
verifyApplicationThread(); verifyApplicationThread();
return player.getMaxSeekToPreviousPosition(); return player.getMaxSeekToPreviousPosition();
} }
......
...@@ -769,7 +769,7 @@ public class AnalyticsCollector ...@@ -769,7 +769,7 @@ public class AnalyticsCollector
} }
@Override @Override
public void onMaxSeekToPreviousPositionChanged(int maxSeekToPreviousPositionMs) { public void onMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime(); EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent( sendEvent(
eventTime, eventTime,
......
...@@ -623,7 +623,7 @@ public interface AnalyticsListener { ...@@ -623,7 +623,7 @@ public interface AnalyticsListener {
* @param maxSeekToPreviousPositionMs The maximum seek to previous position, in milliseconds. * @param maxSeekToPreviousPositionMs The maximum seek to previous position, in milliseconds.
*/ */
default void onMaxSeekToPreviousPositionChanged( default void onMaxSeekToPreviousPositionChanged(
EventTime eventTime, int maxSeekToPreviousPositionMs) {} EventTime eventTime, long maxSeekToPreviousPositionMs) {}
/** /**
* Called when the repeat mode changed. * Called when the repeat mode changed.
......
...@@ -305,7 +305,7 @@ public class StubExoPlayer extends BasePlayer implements ExoPlayer { ...@@ -305,7 +305,7 @@ public class StubExoPlayer extends BasePlayer implements ExoPlayer {
} }
@Override @Override
public int getMaxSeekToPreviousPosition() { public long getMaxSeekToPreviousPosition() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
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