hls.js修改buff缓冲区时间 m3u8文件 MaxBufferLength参数
增大缓冲区问题解决
maxBufferLength:30,从30改成60,
maxBufferSize:6e7,这个可以不用动,,,感觉没作用,
这在github搜问题搜到的,好像是说建议保持默认的60MB内存缓冲区和30秒缓冲长度
// compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s
if (levelBitrate) {
maxBufLen = Math.max(8 * config.maxBufferSize / levelBitrate, config.maxBufferLength);
} else {
maxBufLen = config.maxBufferLength;
}
maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);
视乎chrome会限制165MB缓冲数量,大约70秒左右。
https://github.com/video-dev/hls.js/issues/2989
{:3027:}
页:
[1]