Incorrect docs for NETWORK_ERROR
For example playlist-loader.js will trigger this object
{
type: ErrorTypes.NETWORK_ERROR,
details,
fatal,
url: loader.url,
loader,
context,
networkDetails
}
https://github.com/video-dev/hls.js/blob/741d531f69501f2d7e12fe10d8454245d4ec9161/src/loader/playlist-loader.js#L460
But in docs we have this notations:
// Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}
https://github.com/video-dev/hls.js/blob/f44dd24dd15a95baea8fa2e8d1f7ef11a09f07f6/src/errors.js#L23
And in https://github.com/video-dev/hls.js/blob/master/docs/API.md#network-errors we have
data: { type : NETWORK_ERROR, details : Hls.ErrorDetails.MANIFEST_LOAD_ERROR, fatal : true, url : manifest URL, response : { code: error code, text: error text }, loader : URL loader }
In real work we have networkDetails instead of response field in ErrorData.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is happening to me too. For all errors, I log in the console, and this is the data:
{
context: {
type: "manifest",
level: 0,
id: null,
loader: XhrLoader,
url: "https://playlist.m3u"
},
details: "manifestLoadError",
fatal: true,
loader: XhrLoader,
networkDetails: XMLHttpRequest,
type: "networkError",
url: undefined
}
This seems to not be synced with https://github.com/video-dev/hls.js/blob/master/docs/API.md#errors.