From bb08f51d78a549f4e75d7415adc6a025d91f2f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81lvaro=20Velad=20Galva=CC=81n?= Date: Wed, 13 Nov 2024 13:02:41 +0100 Subject: [PATCH] fix(UI): Use trickPlay method to control the playback rate --- ui/playback_rate_selection.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/playback_rate_selection.js b/ui/playback_rate_selection.js index 2580a666e9..4f79fb906a 100644 --- a/ui/playback_rate_selection.js +++ b/ui/playback_rate_selection.js @@ -120,8 +120,12 @@ shaka.ui.PlaybackRateSelection = class extends shaka.ui.SettingsMenu { button.appendChild(span); this.eventManager.listen(button, 'click', () => { - this.video.playbackRate = this.playbackRates_.get(rateStr); - this.video.defaultPlaybackRate = this.playbackRates_.get(rateStr); + const rate = this.playbackRates_.get(rateStr); + if (rate == 1) { + this.player.cancelTrickPlay(); + } else { + this.player.trickPlay(rate, /* useTrickPlayTrack= */ false); + } }); this.menu.appendChild(button);