diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java
index a07afcea9..6452a9850 100644
--- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java
+++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java
@@ -178,7 +178,6 @@ public abstract class BasePlayer implements
// Player
//////////////////////////////////////////////////////////////////////////*/
- protected final static int FAST_FORWARD_REWIND_AMOUNT_MILLIS = 10000; // 10 Seconds
protected final static int PLAY_PREV_ACTIVATION_LIMIT_MILLIS = 5000; // 5 seconds
protected final static int PROGRESS_LOOP_INTERVAL_MILLIS = 500;
protected final static int RECOVERY_SKIP_THRESHOLD_MILLIS = 3000; // 3 seconds
@@ -954,12 +953,19 @@ public abstract class BasePlayer implements
public void onFastRewind() {
if (DEBUG) Log.d(TAG, "onFastRewind() called");
- seekBy(-FAST_FORWARD_REWIND_AMOUNT_MILLIS);
+ seekBy(-getSeekDuration());
}
public void onFastForward() {
if (DEBUG) Log.d(TAG, "onFastForward() called");
- seekBy(FAST_FORWARD_REWIND_AMOUNT_MILLIS);
+ seekBy(getSeekDuration());
+ }
+
+ private int getSeekDuration() {
+ final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ final String key = context.getString(R.string.seek_duration_key);
+ final String value = prefs.getString(key, context.getString(R.string.seek_duration_default_value));
+ return Integer.parseInt(value);
}
public void onPlayPrevious() {
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index 8dcc2ce31..6aaaa0630 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -28,6 +28,25 @@
screen_brightness_key
screen_brightness_timestamp_key
+ seek_duration
+ 10000
+
+ - 5 seconds
+ - 10 seconds
+ - 15 seconds
+ - 20 seconds
+ - 25 seconds
+ - 30 seconds
+
+
+ - 5000
+ - 10000
+ - 15000
+ - 20000
+ - 25000
+ - 30000
+
+
minimize_on_exit_key
@string/minimize_on_exit_none_key
minimize_on_exit_none_key
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2cdf139df..19013322d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -70,6 +70,7 @@
Remember last size and position of popup
Use fast inexact seek
Inexact seek allows the player to seek to positions faster with reduced precision
+ Fast-forward/-rewind seek duration
Load thumbnails
Show comments
Disable to stop showing comments
diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml
index 4e1b1f8b2..0ff43ce90 100644
--- a/app/src/main/res/xml/video_audio_settings.xml
+++ b/app/src/main/res/xml/video_audio_settings.xml
@@ -146,5 +146,14 @@
android:key="@string/use_inexact_seek_key"
android:summary="@string/use_inexact_seek_summary"
android:title="@string/use_inexact_seek_title"/>
+
+