Merge pull request #2857 from njsmith/buffering-is-important

This commit is contained in:
Bill Thornton 2021-08-12 18:45:55 -07:00 committed by GitHub
commit 0fcb5e7b3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,7 +385,6 @@ function tryRemoveElement(elem) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
requireHlsPlayer(async () => { requireHlsPlayer(async () => {
let maxBufferLength = 30; let maxBufferLength = 30;
let maxMaxBufferLength = 600;
// Some browsers cannot handle huge fragments in high bitrate. // Some browsers cannot handle huge fragments in high bitrate.
// This issue usually happens when using HWA encoders with a high bitrate setting. // This issue usually happens when using HWA encoders with a high bitrate setting.
@ -393,7 +392,6 @@ function tryRemoveElement(elem) {
// https://github.com/video-dev/hls.js/issues/876 // https://github.com/video-dev/hls.js/issues/876
if ((browser.chrome || browser.edgeChromium || browser.firefox) && playbackManager.getMaxStreamingBitrate(this) >= 25000000) { if ((browser.chrome || browser.edgeChromium || browser.firefox) && playbackManager.getMaxStreamingBitrate(this) >= 25000000) {
maxBufferLength = 6; maxBufferLength = 6;
maxMaxBufferLength = 6;
} }
const includeCorsCredentials = await getIncludeCorsCredentials(); const includeCorsCredentials = await getIncludeCorsCredentials();
@ -401,7 +399,6 @@ function tryRemoveElement(elem) {
const hls = new Hls({ const hls = new Hls({
manifestLoadingTimeOut: 20000, manifestLoadingTimeOut: 20000,
maxBufferLength: maxBufferLength, maxBufferLength: maxBufferLength,
maxMaxBufferLength: maxMaxBufferLength,
xhrSetup(xhr) { xhrSetup(xhr) {
xhr.withCredentials = includeCorsCredentials; xhr.withCredentials = includeCorsCredentials;
} }