mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
[bugfix]: web player edge cases
Two bugs addressed in response to Safari changes: 1. Only handle `onEnded` for real streams, preventing `autoNext()` spam when the last track finishes 2. `.play()` is not necessarily a safe operation (if empty wave was started, can cause exception later). Catch this exception and discard it. This also only occurred when playing the last track
This commit is contained in:
@@ -138,7 +138,10 @@ export const useCenterControls = (args: { playersRef: any }) => {
|
||||
mpvPlayer?.volume(usePlayerStore.getState().volume);
|
||||
mpvPlayer!.play();
|
||||
} else {
|
||||
currentPlayerRef.getInternalPlayer().play();
|
||||
currentPlayerRef
|
||||
.getInternalPlayer()
|
||||
?.play()
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
play();
|
||||
|
||||
Reference in New Issue
Block a user