mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-19 13:27:42 +03:00
Restore volume when playing a song...
... or continuing to play a paused one
This commit is contained in:
parent
1922eaaab2
commit
189d0c0ab3
@ -113,6 +113,9 @@ const Player = () => {
|
||||
|
||||
const onAudioPlay = useCallback(
|
||||
(info) => {
|
||||
if (audioInstance) {
|
||||
audioInstance.volume = playerState.volume
|
||||
}
|
||||
dispatch(currentPlaying(info))
|
||||
setStartTime(Date.now())
|
||||
if (info.duration) {
|
||||
@ -136,7 +139,7 @@ const Player = () => {
|
||||
}
|
||||
}
|
||||
},
|
||||
[dispatch, showNotifications]
|
||||
[dispatch, showNotifications, audioInstance, playerState.volume]
|
||||
)
|
||||
|
||||
const onAudioPause = useCallback(
|
||||
|
Loading…
x
Reference in New Issue
Block a user