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 {
}
@Override
public int getMaxSeekToPreviousPosition() {
public long getMaxSeekToPreviousPosition() {
return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
}
......
......@@ -665,7 +665,7 @@ public final class C {
public static final int DEFAULT_BUFFER_SEGMENT_SIZE = 64 * 1024;
/** 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. */
public static final long DEFAULT_SEEK_FORWARD_INCREMENT_MS = 15_000;
......@@ -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
* 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. */
@SuppressWarnings("ConstantField")
......
......@@ -299,7 +299,7 @@ public class ForwardingPlayer implements Player {
}
@Override
public int getMaxSeekToPreviousPosition() {
public long getMaxSeekToPreviousPosition() {
return player.getMaxSeekToPreviousPosition();
}
......@@ -752,7 +752,7 @@ public class ForwardingPlayer implements Player {
}
@Override
public void onMaxSeekToPreviousPositionChanged(int maxSeekToPreviousPositionMs) {
public void onMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) {
eventListener.onMaxSeekToPreviousPositionChanged(maxSeekToPreviousPositionMs);
}
......
......@@ -338,7 +338,7 @@ public interface Player {
* @param maxSeekToPreviousPositionMs The maximum position for which {@link #seekToPrevious()}
* 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
......@@ -1785,9 +1785,9 @@ public interface Player {
* 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:
......
......@@ -724,7 +724,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
}
@Override
public int getMaxSeekToPreviousPosition() {
public long getMaxSeekToPreviousPosition() {
return C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
}
......
......@@ -1380,7 +1380,7 @@ public class SimpleExoPlayer extends BasePlayer
}
@Override
public int getMaxSeekToPreviousPosition() {
public long getMaxSeekToPreviousPosition() {
verifyApplicationThread();
return player.getMaxSeekToPreviousPosition();
}
......
......@@ -769,7 +769,7 @@ public class AnalyticsCollector
}
@Override
public void onMaxSeekToPreviousPositionChanged(int maxSeekToPreviousPositionMs) {
public void onMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(
eventTime,
......
......@@ -623,7 +623,7 @@ public interface AnalyticsListener {
* @param maxSeekToPreviousPositionMs The maximum seek to previous position, in milliseconds.
*/
default void onMaxSeekToPreviousPositionChanged(
EventTime eventTime, int maxSeekToPreviousPositionMs) {}
EventTime eventTime, long maxSeekToPreviousPositionMs) {}
/**
* Called when the repeat mode changed.
......
......@@ -305,7 +305,7 @@ public class StubExoPlayer extends BasePlayer implements ExoPlayer {
}
@Override
public int getMaxSeekToPreviousPosition() {
public long getMaxSeekToPreviousPosition() {
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