diff --git a/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt b/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
index 3b52611fa..ff0bb269d 100644
--- a/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
+++ b/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
@@ -14,12 +14,10 @@ import org.schabi.newpipe.ktx.AnimationType
import org.schabi.newpipe.ktx.animate
import org.schabi.newpipe.player.Player
import org.schabi.newpipe.player.helper.AudioReactor
-import org.schabi.newpipe.player.helper.PlaybackParameterDialog
import org.schabi.newpipe.player.helper.PlayerHelper
import org.schabi.newpipe.player.ui.MainPlayerUi
import org.schabi.newpipe.util.ThemeHelper.getAndroidDimenPx
import kotlin.math.abs
-import kotlin.math.roundToInt
/**
* GestureListener for the player
@@ -104,7 +102,6 @@ class MainPlayerGestureListener(
binding.volumeRelativeLayout.animate(true, 200, AnimationType.SCALE_AND_ALPHA)
}
binding.brightnessRelativeLayout.isVisible = false
- binding.playbackSpeedRelativeLayout.isVisible = false
}
private fun onScrollBrightness(distanceY: Float) {
@@ -150,42 +147,6 @@ class MainPlayerGestureListener(
binding.brightnessRelativeLayout.animate(true, 200, AnimationType.SCALE_AND_ALPHA)
}
binding.volumeRelativeLayout.isVisible = false
- binding.playbackSpeedRelativeLayout.isVisible = false
- }
-
- private fun onScrollPlaybackSpeed(distanceY: Float) {
- val bar: ProgressBar = binding.playbackSpeedProgressBar
- val maxPlaybackSpeed: Float = PlaybackParameterDialog.getMaxPitchOrSpeed()
- val minPlaybackSpeed: Float = PlaybackParameterDialog.getMinPitchOrSpeed()
- val playbackSpeedStep: Float = PlaybackParameterDialog.getCurrentStepSize(player.context) / maxPlaybackSpeed
-
- // If we just started sliding, change the progress bar to match the current playback speed
- if (!binding.playbackSpeedRelativeLayout.isVisible) {
- val playbackSpeedPercent: Float = player.playbackSpeed / maxPlaybackSpeed
- bar.progress = (playbackSpeedPercent * bar.max).toInt()
- }
-
- // Update progress bar
- bar.incrementProgressBy(distanceY.toInt())
-
- // Update playback speed
- val currentProgressPercent: Float = (bar.progress / bar.max.toFloat() / playbackSpeedStep).roundToInt() * playbackSpeedStep
- val currentPlaybackSpeed: Float = (currentProgressPercent * maxPlaybackSpeed).coerceIn(minPlaybackSpeed, maxPlaybackSpeed)
-
- player.playbackSpeed = currentPlaybackSpeed
- if (DEBUG) {
- Log.d(TAG, "onScroll().playbackSpeedControl, currentPlaybackSpeed = $currentPlaybackSpeed")
- }
-
- // Update player center image
- binding.playbackSpeedTextView.text = PlayerHelper.formatSpeed(currentPlaybackSpeed.toDouble())
-
- // Make sure the correct layout is visible
- if (!binding.playbackSpeedRelativeLayout.isVisible) {
- binding.playbackSpeedRelativeLayout.animate(true, 200, AnimationType.SCALE_AND_ALPHA)
- }
- binding.brightnessRelativeLayout.isVisible = false
- binding.volumeRelativeLayout.isVisible = false
}
override fun onScrollEnd(event: MotionEvent) {
@@ -196,9 +157,6 @@ class MainPlayerGestureListener(
if (binding.brightnessRelativeLayout.isVisible) {
binding.brightnessRelativeLayout.animate(false, 200, AnimationType.SCALE_AND_ALPHA, 200)
}
- if (binding.playbackSpeedRelativeLayout.isVisible) {
- binding.playbackSpeedRelativeLayout.animate(false, 200, AnimationType.SCALE_AND_ALPHA, 200)
- }
}
override fun onScroll(
@@ -232,35 +190,23 @@ class MainPlayerGestureListener(
isMoving = true
- // -- Brightness Volume and Tempo control --
- if (getDisplayPortion(initialEvent) == DisplayPortion.RIGHT) {
+ // -- Brightness and Volume control --
+ if (getDisplayHalfPortion(initialEvent) == DisplayPortion.RIGHT_HALF) {
when (PlayerHelper.getActionForRightGestureSide(player.context)) {
player.context.getString(R.string.volume_control_key) ->
onScrollVolume(distanceY)
player.context.getString(R.string.brightness_control_key) ->
onScrollBrightness(distanceY)
- player.context.getString(R.string.playback_speed_control_key) ->
- onScrollPlaybackSpeed(distanceY)
}
- } else if (getDisplayPortion(initialEvent) == DisplayPortion.LEFT) {
+ } else {
when (PlayerHelper.getActionForLeftGestureSide(player.context)) {
player.context.getString(R.string.volume_control_key) ->
onScrollVolume(distanceY)
player.context.getString(R.string.brightness_control_key) ->
onScrollBrightness(distanceY)
- player.context.getString(R.string.playback_speed_control_key) ->
- onScrollPlaybackSpeed(distanceY)
- }
- } else {
- when (PlayerHelper.getActionForMiddleGestureSide(player.context)) {
- player.context.getString(R.string.volume_control_key) ->
- onScrollVolume(distanceY)
- player.context.getString(R.string.brightness_control_key) ->
- onScrollBrightness(distanceY)
- player.context.getString(R.string.playback_speed_control_key) ->
- onScrollPlaybackSpeed(distanceY)
}
}
+
return true
}
diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
index 8514d1d49..43581d300 100644
--- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
+++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
@@ -590,19 +590,6 @@ public class PlaybackParameterDialog extends DialogFragment {
return PlayerHelper.formatPitch(percent);
}
- public static float getCurrentStepSize(final Context context) {
- return PreferenceManager.getDefaultSharedPreferences(context)
- .getFloat(context.getString(R.string.adjustment_step_key), (float) DEFAULT_STEP);
- }
-
- public static float getMinPitchOrSpeed() {
- return (float) MIN_PITCH_OR_SPEED;
- }
-
- public static float getMaxPitchOrSpeed() {
- return (float) MAX_PITCH_OR_SPEED;
- }
-
public interface Callback {
void onPlaybackParameterChanged(float playbackTempo, float playbackPitch,
boolean playbackSkipSilence);
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 6a51bdbea..a110a80d6 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
@@ -234,12 +234,6 @@ public final class PlayerHelper {
context.getString(R.string.default_right_gesture_control_value));
}
- public static String getActionForMiddleGestureSide(@NonNull final Context context) {
- return getPreferences(context)
- .getString(context.getString(R.string.middle_gesture_control_key),
- context.getString(R.string.default_middle_gesture_control_value));
- }
-
public static String getActionForLeftGestureSide(@NonNull final Context context) {
return getPreferences(context)
.getString(context.getString(R.string.left_gesture_control_key),
diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java
index 3a61ff16d..03f90a344 100644
--- a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java
+++ b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java
@@ -555,7 +555,6 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
binding.volumeProgressBar.setMax(maxGestureLength);
binding.brightnessProgressBar.setMax(maxGestureLength);
- binding.playbackSpeedProgressBar.setMax(maxGestureLength);
setInitialGestureValues();
binding.itemsListPanel.getLayoutParams().height =
diff --git a/app/src/main/res/layout/player.xml b/app/src/main/res/layout/player.xml
index d491d03a2..bad22dd1e 100644
--- a/app/src/main/res/layout/player.xml
+++ b/app/src/main/res/layout/player.xml
@@ -758,34 +758,6 @@
tools:src="@drawable/ic_brightness_high" />
-
-
-
-
-
-
-
Demnächst
Vollständig angeschaut
Teilweise angeschaut
- Geste für den linken Teil des Player-Bildschirms auswählen
- Mittlere Gestenaktion
- Geste für den rechten Teil des Player-Bildschirms auswählen
+ Geste für die linke Hälfte des Player-Bildschirms auswählen
+ Geste für die rechte Hälfte des Player-Bildschirms auswählen
Keine
Rechte Gestenaktion
Linke Gestenaktion
@@ -827,5 +826,4 @@
\nMöchtest du wirklich fortfahren?
Die Einstellungen in dem zu importierenden Export verwenden ein angreifbares Format, das seit NewPipe 0.27.0 veraltet ist. Stellen Sie sicher, dass der zu importierende Export aus einer vertrauenswürdigen Quelle stammt, und verwenden Sie in Zukunft nur noch Exporte, die aus NewPipe 0.27.0 oder neuer stammen. Die Unterstützung für den Import von Einstellungen in diesem angreifbaren Format wird bald vollständig entfernt werden, und dann werden alte Versionen von NewPipe nicht mehr in der Lage sein, Einstellungen von Exporten aus neuen Versionen zu importieren.
Sekundär
- Geste für den mittleren Teil des Player-Bildschirms auswählen
\ No newline at end of file
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index 693166d32..6858e5d62 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -204,48 +204,28 @@
@string/brightness_control_key
brightness_control
volume_control
- playback_speed_control
none_control
- @string/brightness
- @string/volume
- - @string/playback_tempo
- @string/none
- @string/brightness_control_key
- @string/volume_control_key
- - @string/playback_speed_control_key
- - @string/none_control_key
-
-
- middle_gesture_control
- @string/playback_speed_control_key
-
- - @string/brightness
- - @string/volume
- - @string/playback_tempo
- - @string/none
-
-
- - @string/brightness_control_key
- - @string/volume_control_key
- - @string/playback_speed_control_key
- @string/none_control_key
right_gesture_control
@string/volume_control_key
- - @string/brightness
- @string/volume
- - @string/playback_tempo
+ - @string/brightness
- @string/none
- - @string/brightness_control_key
- @string/volume_control_key
- - @string/playback_speed_control_key
+ - @string/brightness_control_key
- @string/none_control_key
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index aed6bc26f..0f862ef52 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -106,11 +106,9 @@
Auto-enqueue next stream
Continue ending (non-repeating) playback queue by appending a related stream
Auto-enqueuing
- Choose gesture for left part of player screen
+ Choose gesture for left half of player screen
Left gesture action
- Choose gesture for middle part of player screen
- Middle gesture action
- Choose gesture for right part of player screen
+ Choose gesture for right half of player screen
Right gesture action
Brightness
Volume
diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml
index 3d13e0b71..727ce4df4 100644
--- a/app/src/main/res/xml/video_audio_settings.xml
+++ b/app/src/main/res/xml/video_audio_settings.xml
@@ -198,16 +198,6 @@
app:singleLineTitle="false"
app:iconSpaceReserved="false" />
-
-