only disable source if it's fatal

This commit is contained in:
Pas 2025-12-01 12:39:10 -07:00
parent 216c7832eb
commit a39c020b34

View file

@ -38,8 +38,15 @@ export function PlaybackErrorPart(props: PlaybackErrorPartProps) {
// Mark the failed source and handle UI when a playback error occurs // Mark the failed source and handle UI when a playback error occurs
useEffect(() => { useEffect(() => {
if (playbackError && currentSourceId) { if (playbackError && currentSourceId) {
// Mark this source as failed // Only mark source as failed for fatal errors
addFailedSource(currentSourceId); const isFatalError =
playbackError.type === "hls"
? (playbackError.hls?.fatal ?? false)
: playbackError.type === "htmlvideo";
if (isFatalError) {
addFailedSource(currentSourceId);
}
if (!hasOpenedSettings.current && !enableAutoResumeOnPlaybackError) { if (!hasOpenedSettings.current && !enableAutoResumeOnPlaybackError) {
hasOpenedSettings.current = true; hasOpenedSettings.current = true;