diff --git a/src/player.js b/src/player.js index c5324d8..4fb0957 100644 --- a/src/player.js +++ b/src/player.js @@ -294,6 +294,7 @@ export function playCurrent() { const gen = ++_playGen; S._trackChanging = true; + _resetProgressUI(); if(navigator.mediaSession) navigator.mediaSession.playbackState = 'playing'; updatePlayerUI(s, true); onNpSongChange(s.id); @@ -473,7 +474,7 @@ function _setSkipping() { } function _resetProgressUI() { - _nativePos = 0; + if (HAS_BRIDGE) _nativePos = 0; document.getElementById('progress-fill').style.width = '0%'; document.getElementById('time-cur').textContent = formatDur(0); if (S.npOpen) { @@ -497,7 +498,7 @@ export function prevSong() { _nsBridge('prev'); return; } - if(S.audio.currentTime > 3) { S.audio.currentTime = 0; return; } + if(S.audio.currentTime > 3) { _resetProgressUI(); S.audio.currentTime = 0; return; } if(S.qIdx > 0) { S.qIdx--; playCurrent(); } }