Skip to content

Commit

Permalink
API.md : clarify max buffer length configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Jan 6, 2016
1 parent 06c888d commit c2d3b9f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion API.md
Expand Up @@ -184,6 +184,7 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O
debug : false,
autoStartLoad : true,
maxBufferLength : 30,
maxMaxBufferLength : 600,
maxBufferSize : 60*1000*1000,
liveSyncDurationCount : 3,
liveMaxLatencyDurationCount: 10,
Expand Down Expand Up @@ -232,10 +233,24 @@ a logger object could also be provided for custom logging : ```config.debug=cust
(default 30s)
maximum buffer Length in seconds. if buffer length is/become less than this value, a new fragment will be loaded.
this is the guaranteed buffer length hls.js will try to reach, regardless of maxBufferSize.
#### ```maxBufferSize```
(default 60 MB)
maximum buffer size in bytes. if buffer size upfront is bigger than this value, no fragment will be loaded.
'minimum' maximum buffer size in bytes. if buffer size upfront is bigger than this value, no fragment will be loaded.
#### ```maxMaxBufferLength```
(default 600s)
maximum buffer Length in seconds. hls.js will never exceed this value. even if maxBufferSize is not reached yet.
hls.js tries to buffer up to a maximum number of bytes (60 MB by default) rather than to buffer up to a maximum nb of seconds.
this is to mimic the browser behaviour (the buffer eviction algorithm is starting after the browser detects that video buffer size reaches a limit in bytes)
config.maxBufferLength is the minimum guaranteed buffer length that hls.js will try to achieve, even if that value exceeds the amount of bytes 60 MB of memory.
maxMaxBufferLength acts as a capping value, as if bitrate is really low, you could need more than one hour of buffer to fill 60 MB....
#### ```liveSyncDurationCount```
(default 3)
Expand Down

0 comments on commit c2d3b9f

Please sign in to comment.