Merge pull request #5146 from dkacperski97/fix-previous-track

This commit is contained in:
Bill Thornton 2024-01-22 00:02:44 -05:00 committed by GitHub
commit 3a2cc6ed2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -180,7 +180,7 @@ function bindEvents(elem) {
// to the previous track, unless we are at the first track so no previous track exists.
// currentTime is in msec.
if (playbackManager.currentTime(currentPlayer) >= 5 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 1) {
if (playbackManager.currentTime(currentPlayer) >= 5 * 1000 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 0) {
playbackManager.seekPercent(0, currentPlayer);
// This is done automatically by playbackManager, however, setting this here gives instant visual feedback.
// TODO: Check why seekPercent doesn't reflect the changes inmmediately, so we can remove this workaround.

View file

@ -784,7 +784,7 @@ export default function () {
// to the previous track, unless we are at the first track so no previous track exists.
// currentTime is in msec.
if (playbackManager.currentTime(currentPlayer) >= 5 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 1) {
if (playbackManager.currentTime(currentPlayer) >= 5 * 1000 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 0) {
playbackManager.seekPercent(0, currentPlayer);
// This is done automatically by playbackManager, however, setting this here gives instant visual feedback.
// TODO: Check why seekPercent doesn't reflect the changes inmmediately, so we can remove this workaround.