Short Reconnect / Discontinuity for HLS
Hi Livego team,
Excellent work with this product! I have been able to use it heavily and we are planning to launch it at scale (hundreds of concurrent livestreamers!).
One issue we currently have with it though is for short reconnects. When there is a short reconnect, the VirWriter hits an error on SendPacket when it does a new TranStart for the reconnect. This causes the HLS connection to be closed/removed. Even if the flag to not remove is true, the HLS Source just remains stagnant and gets no updates. There is no "restart" for the transfers. I am in the process of implementing this (obviously can share it with the community as well if you would like the contribution). However, I wanted to check with the team here, to make sure I understand the problem and if you are aware of this problem first.
In addition to this topic, there is the DISCONTINUITY topic for m3u8 files. Whenever a stream is reconnected, it is standard for their to be an insert between ts segments of #EXT-X-DISCONTINUITY so the player knows how to handle the gap in timestamps. I am planning to add that in once the short reconnect issue is resolved. Was there any direction you would provide on this that maybe you have already looked into? Again I will surely share the changes, and if I can align it with your preferred designs that would be ideal if shared.
Lastly, when a reconnect happens, the seq for the HLS source gets reset. So if there is a reconnect on a 6 hour stream the seq will get reset to 1. This will then confuse players into thinking that it has all the TS files it needs and will not try to get more of them until the time lapses the seq it last saw. This I think is a minor fix once the short reconnect issue is resolved though (VideoJS Example).
Source: gwuhaolin/livego