Network error event
What do you want to do with Hls.js?
What event should i handle to resume playing stream video when internet connection has been recovered after loss? On internet connection loss i get an error:
- type: 'networkError', details: 'levelLoadError'. - for live streaming
- type: 'networkError', details: 'fragLoadError'. - for records Currently i use startLoad() method on fatal error for hls to continue send requests till internet connection recovers.
What have you tried so far?
No response
Hi @MaximumRGB,
If the error event is not fatal then you don't need to do anything: HLS.js will keep trying.
Fatal network error events (event.fatal === true) occur when the multi-variant playlist fails to load, and after all playlist or segment request retries have been exhausted. Calling startLoad() should resume loading in these cases.
You might want to check the browser's navigator.onLine and associated online/offline events. Usually these only signal that the network has been disabled. Also consider modifying the HLS.js configuration in these cases (specifically these delay settings and the ones above them).