fix: set music playback speed only once

Fixes https://github.com/libre-tube/LibreTube/issues/5626. The playback speed for music videos was set to 1.0x on every event, instead of only once when starting the video.
This commit is contained in:
FineFindus 2024-02-18 13:15:20 +01:00
parent 48e46030b5
commit fece82e8c3
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -312,9 +312,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
saveWatchPosition() saveWatchPosition()
if (playbackState == Player.STATE_READY) { if (playbackState == Player.STATE_READY) {
if (streams.category == Streams.categoryMusic) {
exoPlayer.setPlaybackSpeed(1f)
}
} }
// set the playback speed to one if having reached the end of a livestream // set the playback speed to one if having reached the end of a livestream
@ -988,6 +985,10 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
} }
setCurrentChapterName() setCurrentChapterName()
if (streams.category == Streams.categoryMusic) {
exoPlayer.setPlaybackSpeed(1f)
}
} }
} }
} }