Skip to content

Commit

Permalink
Merge pull request #6421 from TeamNewPipe/fix/playback_speed
Browse files Browse the repository at this point in the history
Fix playback speed not being updated in PlayQueueAcitvity
  • Loading branch information
Stypox authored Jun 5, 2021
2 parents 332b90d + 98fdbec commit 9bf4eff
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.widget.PopupMenu;
import android.widget.SeekBar;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
Expand Down Expand Up @@ -456,6 +457,7 @@ public void onPlaybackParameterChanged(final float playbackTempo, final float pl
final boolean playbackSkipSilence) {
if (player != null) {
player.setPlaybackParameters(playbackTempo, playbackPitch, playbackSkipSilence);
onPlaybackParameterChanged(player.getPlaybackParameters());
}
}

Expand Down Expand Up @@ -639,7 +641,7 @@ private void onPlayModeChanged(final int repeatMode, final boolean shuffled) {
queueControlBinding.controlShuffle.setImageAlpha(shuffleAlpha);
}

private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
private void onPlaybackParameterChanged(@Nullable final PlaybackParameters parameters) {
if (parameters != null) {
if (menu != null && player != null) {
final MenuItem item = menu.findItem(R.id.action_playback_speed);
Expand Down

0 comments on commit 9bf4eff

Please sign in to comment.