From b8dbb3f0733288fac580b9f09ae8399a7bbd24a2 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 28 Apr 2022 11:32:33 +0200 Subject: [PATCH] Use 64 KiB as the default progressive load interval This ensures a small value is used by default, solving buffering issues at the beginning of videos --- .../org/schabi/newpipe/player/helper/PlayerHelper.java | 2 +- app/src/main/res/values/settings_keys.xml | 9 +++++---- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index 513e94419..b73c6cf7f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -426,7 +426,7 @@ public final class PlayerHelper { context.getString(R.string.progressive_load_interval_key), context.getString(R.string.progressive_load_interval_default_value)); - if (context.getString(R.string.progressive_load_interval_default_value) + if (context.getString(R.string.progressive_load_interval_exoplayer_default_value) .equals(preferredIntervalBytes)) { return ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES; } diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index d72be0ccf..bf42aaf0e 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -56,20 +56,21 @@ progressive_load_interval - default + 64 + exoplayer_default 1 KiB 16 KiB 64 KiB 256 KiB - @string/progressive_load_interval_default + @string/progressive_load_interval_exoplayer_default 1 16 - 64 + @string/progressive_load_interval_default_value 256 - default + @string/progressive_load_interval_exoplayer_default_value minimize_on_exit_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 792e6414b..0af08a8ad 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -733,7 +733,7 @@ On Off - ExoPlayer default + ExoPlayer default Notifications are disabled Get notified