Skip to content

Commit

Permalink
bug fix for "Unable to set audio speed after pausing" (#5451)
Browse files Browse the repository at this point in the history
* bug fix for
Unable to set audio speed after pausing

* bug fix for
Unable to set audio speed after pausing
  • Loading branch information
VIPlearner authored Nov 12, 2024
1 parent 00eb6fe commit 023a997
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ internal class StreamMediaPlayer(
currentSpeed + SPEED_INCREMENT
}

if (playerState == PlayerState.PLAYING && mediaPlayer.isSpeedSettable()) {
if ((playerState == PlayerState.PLAYING || playerState == PlayerState.PAUSE) &&
mediaPlayer.isSpeedSettable()
) {
playingSpeed = newSpeed
mediaPlayer.speed = newSpeed
if (playerState == PlayerState.PLAYING) {
mediaPlayer.speed = newSpeed
}
publishSpeed(currentAudioHash, newSpeed)
}
}
Expand Down

0 comments on commit 023a997

Please sign in to comment.