Commit 297c2bf9 by bachinger Committed by Ian Baker

Make StyledPlayerControlView use control dispatcher for speed changes

#exofixit

PiperOrigin-RevId: 346972678
parent 2ee40270
...@@ -51,7 +51,6 @@ import com.google.android.exoplayer2.ControlDispatcher; ...@@ -51,7 +51,6 @@ import com.google.android.exoplayer2.ControlDispatcher;
import com.google.android.exoplayer2.DefaultControlDispatcher; import com.google.android.exoplayer2.DefaultControlDispatcher;
import com.google.android.exoplayer2.ExoPlayerLibraryInfo; import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.PlaybackParameters;
import com.google.android.exoplayer2.PlaybackPreparer; import com.google.android.exoplayer2.PlaybackPreparer;
import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Player.Events; import com.google.android.exoplayer2.Player.Events;
...@@ -1491,7 +1490,8 @@ public class StyledPlayerControlView extends FrameLayout { ...@@ -1491,7 +1490,8 @@ public class StyledPlayerControlView extends FrameLayout {
if (player == null) { if (player == null) {
return; return;
} }
player.setPlaybackParameters(new PlaybackParameters(speed)); controlDispatcher.dispatchSetPlaybackParameters(
player, player.getPlaybackParameters().withSpeed(speed));
} }
/* package */ void requestPlayPauseFocus() { /* package */ void requestPlayPauseFocus() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment