Answer for long buffering in start, and then randomly buffering

HLS and HDS mandatorily create delay in the streams. This is because by definition, they require the creation of "file chunks". Players will often require 2 or 3 chunks to be available before starting to play the stream. With a default chunklength of 10 seconds, you will see delays as big as 20-30 seconds. This delay can be reduced by reducing your chunklength to 4. The only way to have less/minimal delay is to use an actual "live" protocol like RTMP, RTSP or MPEG-TS

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.