mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
only disable source if it's fatal
This commit is contained in:
parent
216c7832eb
commit
a39c020b34
1 changed files with 9 additions and 2 deletions
|
|
@ -38,8 +38,15 @@ export function PlaybackErrorPart(props: PlaybackErrorPartProps) {
|
|||
// Mark the failed source and handle UI when a playback error occurs
|
||||
useEffect(() => {
|
||||
if (playbackError && currentSourceId) {
|
||||
// Mark this source as failed
|
||||
addFailedSource(currentSourceId);
|
||||
// Only mark source as failed for fatal errors
|
||||
const isFatalError =
|
||||
playbackError.type === "hls"
|
||||
? (playbackError.hls?.fatal ?? false)
|
||||
: playbackError.type === "htmlvideo";
|
||||
|
||||
if (isFatalError) {
|
||||
addFailedSource(currentSourceId);
|
||||
}
|
||||
|
||||
if (!hasOpenedSettings.current && !enableAutoResumeOnPlaybackError) {
|
||||
hasOpenedSettings.current = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue