mirror of
https://github.com/p-stream/p-stream.git
synced 2026-05-13 06:02:27 +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
|
// 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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue