Skip to content

Regression due to treating HTTP status 0 differently from 404 #7471

@Frenzie

Description

@Frenzie

This change seems to result in some unfortunate behavior. It results in near immediate fatal error in case of an intermittent failure (like mobile on the train, but it could occur for a great many reasons), skipping the normal logic where it tries the next segment and by and large merrily proceeds with playback. I think status 0 should be treated identically to 404 just as before, since this touches the very core of the dependability of HLS.

I'm not convinced the HTTP status 0 should be treated any differently than regular 404 at all, but if we assume it should, I think it should be in the form of a more aggressive back-off or some such rather than as completely different behavior.

The intended behavior can probably be achieved better with navigator.onLine and the offline and online events.
https://developer.mozilla.org/en-US/docs/Web/API/Window/offline_event
https://developer.mozilla.org/en-US/docs/Web/API/Window/online_event

Originally posted by @Frenzie in #7464 (comment)

The illustration is a bit artificial, but I believe it illustrates the general problem well enough.

In 1.6.9 the CORS/network error is treated the same as 404 and playback continues, in 1.6.10 it gets stuck forever.

1.6.9 (no problem)

https://20f3b13d.hls-js-dev.pages.dev/demo/?src=https%3A%2F%2Ffrans.master.cdn03.rambla.be%2Fbbb-hls%2Fmaster-cors.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

1.6.10 (gets stuck)

https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Ffrans.master.cdn03.rambla.be%2Fbbb-hls%2Fmaster-cors.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Top priorities

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions