What do you want to do with Hls.js?
I want to restrict buffer size. Basically be able to say something like keep a max of 30s (or MB value) in buffer and flush the rest.
What have you tried so far?
I have tried to restrict using maxMaxBufferLength which doesn't seem to work. I have set maxMaxBufferLength to 30s and still I see about 210s buffered for 6MBps bitrate. I am experimenting with a live stream of 2s segments.
I am using this.hls.media.buffered.start() & this.hls.media.buffered.end() methods to determine how much is buffered currently. I do this on every _Hls.Events.FRAG_BUFFERED_ event.
Any help is much appreciated. Thanks!
@ivatsa you want to use maxBufferLength (as opposed to maxMaxBufferLength)
My current config option looks like this:
config.maxMaxBufferLength = 30;
config.maxBufferSize = 5 x 1024 x 1024;
config.maxBufferLength = 30;
This doesn't seems to have any effect. I still see buffer building up to ~210s on Chrome and ~138s on FF.
Hls.version = "0.11.0"
OS: Mac OSX 10.13.5
Thanks
@ivatsa Did you manage to solve it?
@ivatsa any chance you solved it?
Don't remember much now but I don't think I made much progress there back then :-/
Most helpful comment
My current config option looks like this:
config.maxMaxBufferLength = 30;
config.maxBufferSize = 5 x 1024 x 1024;
config.maxBufferLength = 30;
This doesn't seems to have any effect. I still see buffer building up to ~210s on Chrome and ~138s on FF.
Hls.version = "0.11.0"
OS: Mac OSX 10.13.5
Thanks