mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
fix mpv progress interval still running after queue ends
This commit is contained in:
@@ -216,6 +216,10 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerStatus !== PlayerStatus.PLAYING) {
|
||||
return;
|
||||
}
|
||||
|
||||
const updateProgress = async () => {
|
||||
if (!mpvPlayer || !isMountedRef.current) {
|
||||
return;
|
||||
@@ -245,7 +249,7 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
|
||||
progressIntervalRef.current = null;
|
||||
}
|
||||
};
|
||||
}, [hasCurrentSong, isTransitioning, onProgress]);
|
||||
}, [hasCurrentSong, isTransitioning, onProgress, playerStatus]);
|
||||
|
||||
const { mediaAutoNext } = usePlayerActions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user