|
@ -321,14 +321,14 @@ const Player = ({ currentEntryList, muted, children }: any, ref: any) => { |
|
|
// for mpris-service's getPosition() function
|
|
|
// for mpris-service's getPosition() function
|
|
|
if (isLinux()) { |
|
|
if (isLinux()) { |
|
|
const interval = setInterval(() => { |
|
|
const interval = setInterval(() => { |
|
|
ipcRenderer.send( |
|
|
if (player.status === 'PLAYING') { |
|
|
'current-position', |
|
|
ipcRenderer.send( |
|
|
playQueue.currentPlayer === 1 |
|
|
'current-position', |
|
|
? player1Ref.current.audioEl.current.currentTime |
|
|
playQueue.currentPlayer === 1 |
|
|
: player2Ref.current.audioEl.current.currentTime |
|
|
? player1Ref.current.audioEl.current.currentTime |
|
|
); |
|
|
: player2Ref.current.audioEl.current.currentTime |
|
|
|
|
|
); |
|
|
if (player.status === 'PAUSED') { |
|
|
} else { |
|
|
clearInterval(interval); |
|
|
clearInterval(interval); |
|
|
} |
|
|
} |
|
|
}, 500); |
|
|
}, 500); |
|
|