Rewind after pause - used less conservative rewind times
This commit is contained in:
parent
f7dabd9335
commit
87d27a7c0b
|
@ -34,7 +34,7 @@ public class RewindAfterPauseUtilTest extends TestCase {
|
|||
}
|
||||
|
||||
public void testCalculatePositionWithRewindLongRewind() {
|
||||
final int ORIGINAL_POSITION = 10000;
|
||||
final int ORIGINAL_POSITION = 30000;
|
||||
long lastPlayed = System.currentTimeMillis() - RewindAfterPauseUtils.ELAPSED_TIME_FOR_LONG_REWIND - 1000;
|
||||
int position = RewindAfterPauseUtils.calculatePositionWithRewind(ORIGINAL_POSITION, lastPlayed);
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ import java.util.concurrent.TimeUnit;
|
|||
*/
|
||||
public class RewindAfterPauseUtils {
|
||||
|
||||
public static final long ELAPSED_TIME_FOR_SHORT_REWIND = TimeUnit.MINUTES.toMillis(3);
|
||||
public static final long ELAPSED_TIME_FOR_SHORT_REWIND = TimeUnit.MINUTES.toMillis(1);
|
||||
public static final long ELAPSED_TIME_FOR_MEDIUM_REWIND = TimeUnit.HOURS.toMillis(1);
|
||||
public static final long ELAPSED_TIME_FOR_LONG_REWIND = TimeUnit.DAYS.toMillis(1);
|
||||
|
||||
public static final long SHORT_REWIND = TimeUnit.SECONDS.toMillis(2);
|
||||
public static final long MEDIUM_REWIND = TimeUnit.SECONDS.toMillis(5);
|
||||
public static final long LONG_REWIND = TimeUnit.SECONDS.toMillis(10);
|
||||
public static final long SHORT_REWIND = TimeUnit.SECONDS.toMillis(3);
|
||||
public static final long MEDIUM_REWIND = TimeUnit.SECONDS.toMillis(10);
|
||||
public static final long LONG_REWIND = TimeUnit.SECONDS.toMillis(20);
|
||||
|
||||
/**
|
||||
* @param currentPosition current position in a media file in ms
|
||||
|
|
Loading…
Reference in New Issue